Skip to content

Commit 68f69ff

Browse files
committed
Use screenrig as the CLI name; drop $SR.
Prepend $SCREENRIG_PLUGIN_ROOT/skills/screenrig/scripts to PATH once, then invoke screenrig. Do not export SR. Official install stays the plugin.
1 parent 6063c85 commit 68f69ff

4 files changed

Lines changed: 113 additions & 110 deletions

File tree

‎AGENTS.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ agent workflow.
5656
- Teach only implemented product commands. Canonical skill source
5757
`skills/screenrig/SKILL.md` is the operative marketplace skill. Official
5858
install is this plugin: Claude, Codex, and Grok marketplace commands, with
59-
Grok `--trust` named and `GROK_PLUGIN_ROOT` lookup. After install, resolve
60-
`$SR`, run `--json version`, `doctor`, local `compose catalog`/`compose
61-
render`, media, playlist, and `screen assign`. Compose is local stills.
59+
Grok `--trust` named and `GROK_PLUGIN_ROOT` lookup. After install, prepend
60+
`$SCREENRIG_PLUGIN_ROOT/skills/screenrig/scripts` to `PATH` once, then run
61+
`screenrig --json version`, `doctor`, local `compose catalog`/`compose
62+
render`, media, playlist, and `screen assign`. Do not export `SR`. Compose is local stills.
6263
Do not teach `agent enroll`, `screen pair`, `browser setup`, `screen
6364
provision`, `ABC-234`, or playlist text-slot template tutorials.
6465
- Keep `--json` envelopes. Never teach a token flag or pasted bearer. The

‎README.md‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ app you want, and it goes on the Player.
2727
## Install
2828

2929
The official install is this plugin. Do not install a global `screenrig` from a
30-
package registry and do not expect one on `PATH`: "CLI" names the product
31-
category, and the bundled CLI runs from the plugin's package-relative launcher.
30+
package registry. After install, prepend `$SCREENRIG_PLUGIN_ROOT/skills/screenrig/scripts`
31+
(or the runtime plugin root) to `PATH` once, then invoke `screenrig`. Do not
32+
export `SR`. "CLI" names the product category, and the bundled CLI is the
33+
plugin wrapper, not a global package.
3234

3335
Claude Code:
3436

@@ -53,11 +55,13 @@ grok plugin install screenrig --trust
5355

5456
Node.js 20.11 or newer must be active. Read the ScreenRig package root from your
5557
agent's plugin list (`claude plugin list --json`, `codex plugin list --json`) or
56-
from `GROK_PLUGIN_ROOT`, `CLAUDE_PLUGIN_ROOT`, or `CODEX_PLUGIN_ROOT`, then
57-
confirm the bundled CLI:
58+
from `GROK_PLUGIN_ROOT`, `CLAUDE_PLUGIN_ROOT`, or `CODEX_PLUGIN_ROOT`, prepend
59+
`$SCREENRIG_PLUGIN_ROOT/skills/screenrig/scripts` to `PATH` once, then confirm:
5860

5961
```sh
60-
<plugin-root>/skills/screenrig/scripts/screenrig --json version
62+
SCREENRIG_PLUGIN_ROOT="${GROK_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}}}"
63+
PATH="$SCREENRIG_PLUGIN_ROOT/skills/screenrig/scripts:$PATH"
64+
screenrig --json version
6165
```
6266

6367
That launcher is the entry point for every ScreenRig command. It runs the

‎plugins/screenrig/skills/screenrig/SKILL.md‎

Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ substitute another onboarding or transport surface for the canonical
4848
marketplace plugin.
4949

5050
Use the CLI packaged with this skill. It requires Node.js 20.11 or newer.
51-
Resolve the installed plugin root and invoke the wrapper by its
52-
package-relative path. Assign that path to `SR` and keep using `$SR` for the
53-
rest of the session:
51+
Resolve the installed plugin root, prepend its scripts directory to `PATH`
52+
once, then invoke `screenrig`. Do not export `SR`. Do not install a global
53+
package.
5454

5555
```bash
5656
SCREENRIG_PLUGIN_ROOT="${GROK_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}}}"
57-
SR="$SCREENRIG_PLUGIN_ROOT/skills/screenrig/scripts/screenrig"
58-
"$SR" --json version
57+
PATH="$SCREENRIG_PLUGIN_ROOT/skills/screenrig/scripts:$PATH"
58+
screenrig --json version
5959
```
6060

6161
Require a successful screenRIG JSON envelope from `--json version` before any
@@ -71,10 +71,9 @@ whose `id` is `screenrig@screenrig`, and use its `installPath`.
7171
entry whose `pluginId` is `screenrig@screenrig`, and use its `source.path`.
7272
4. For Grok, run `grok plugin list` and use the installed screenRIG plugin
7373
path, then export it as `GROK_PLUGIN_ROOT` for this session.
74-
5. Run
75-
`<plugin-root>/skills/screenrig/scripts/screenrig --json version` and require
76-
a successful screenRIG JSON envelope before the requested command.
77-
Assign that path to `SR`.
74+
5. Prepend `<plugin-root>/skills/screenrig/scripts` to `PATH` and run
75+
`screenrig --json version`. Require a successful screenRIG JSON envelope
76+
before the requested command. Do not export `SR`.
7877

7978
If there is no matching entry, run the exact canonical marketplace add/install
8079
commands above and repeat this lookup. If installation or lookup still fails,
@@ -90,17 +89,17 @@ do not parse prose.
9089
Work in this order. Do not skip `version` or `doctor`.
9190

9291
```bash
93-
"$SR" --json version
94-
"$SR" --json doctor
95-
"$SR" --json compose catalog
96-
"$SR" --json compose render ./example.json --output ./example.png
97-
"$SR" --json media upload ./example.png --tag ExampleStill
98-
"$SR" --json playlist create ./playlist.json
99-
"$SR" --json screen list
100-
"$SR" --json screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --if-match REVISION
92+
screenrig --json version
93+
screenrig --json doctor
94+
screenrig --json compose catalog
95+
screenrig --json compose render ./example.json --output ./example.png
96+
screenrig --json media upload ./example.png --tag ExampleStill
97+
screenrig --json playlist create ./playlist.json
98+
screenrig --json screen list
99+
screenrig --json screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --if-match REVISION
101100
```
102101

103-
1. Resolve `$SR` and require `--json version`.
102+
1. Prepend the plugin scripts directory to `PATH` and require `screenrig --json version`.
104103
2. Run `doctor`. Read `data.checks`. Name missing toolchain parts before the
105104
first `media upload`.
106105
3. Compose locally. `compose catalog` and `compose render` write stills on
@@ -166,7 +165,7 @@ Bandwidth is $0.09/GB. Storage is $0.14/GB-month. Same rates on every tier.
166165
## Doctor
167166

168167
```bash
169-
"$SR" --json doctor
168+
screenrig --json doctor
170169
```
171170

172171
Read `data.checks`. A build that reports `ffmpeg` and `ffprobe` converts media
@@ -242,14 +241,14 @@ Default `--output` follows the spec filename. The CLI `generic_filename`
242241
warning will not rename on upload.
243242

244243
```bash
245-
"$SR" --json compose catalog
246-
"$SR" --json compose render ./exec-intro-overlay-native-video.json \
244+
screenrig --json compose catalog
245+
screenrig --json compose render ./exec-intro-overlay-native-video.json \
247246
--output ./exec-intro-overlay-native-video.png
248247
# read ./exec-intro-overlay-native-video.png.layout.json
249248
# agent reads the PNG with vision; do not cat pixels into chat
250249
# iterate the JSON and re-render
251-
"$SR" --json media upload ./exec-intro-overlay-native-video.png --tag TAG
252-
"$SR" --json media list --tag TAG --kind image
250+
screenrig --json media upload ./exec-intro-overlay-native-video.png --tag TAG
251+
screenrig --json media list --tag TAG --kind image
253252
# playlist page: one image placement, rect = canvas, content_fit fill
254253
```
255254

@@ -563,7 +562,7 @@ owns it. `{"days": ["fri"], "start": "22:00", "end": "02:00"}` runs Friday
563562
22:00 through Saturday 02:00.
564563

565564
```bash
566-
"$SR" --json screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --if-match 3
565+
screenrig --json screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --if-match 3
567566
```
568567

569568
`--timezone` is an IANA identifier such as `America/Los_Angeles` or
@@ -576,9 +575,9 @@ Use a `screenrig.playlist-bundle/v1` directory to move one playlist and every
576575
referenced image or video rendition together.
577576

578577
```bash
579-
"$SR" --json playlist export pl_EXAMPLE --output ./lobby-bundle
580-
"$SR" --json playlist import ./lobby-bundle
581-
"$SR" --json playlist import ./lobby-bundle --update pl_TARGET --if-match REVISION
578+
screenrig --json playlist export pl_EXAMPLE --output ./lobby-bundle
579+
screenrig --json playlist import ./lobby-bundle
580+
screenrig --json playlist import ./lobby-bundle --update pl_TARGET --if-match REVISION
582581
```
583582

584583
The export destination must not exist. The bundle contains
@@ -600,7 +599,7 @@ reaches `window.screenrig` at runtime with no build step and no dependency to
600599
install.
601600

602601
```bash
603-
"$SR" --json app upload ./lobby-board --name "Lobby board"
602+
screenrig --json app upload ./lobby-board --name "Lobby board"
604603
```
605604

606605
`app upload` waits for the publication operation by default. Read three fields
@@ -657,9 +656,9 @@ and `iframe` placements on that page.
657656
### 4. Create the playlist and assign it to a screen
658657

659658
```bash
660-
"$SR" --json playlist create ./lobby-board.json
661-
"$SR" --json screen list
662-
"$SR" --json screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --if-match 3
659+
screenrig --json playlist create ./lobby-board.json
660+
screenrig --json screen list
661+
screenrig --json screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --if-match 3
663662
```
664663

665664
Take `--playlist-id` from `data.id` of the `playlist create` result. Take
@@ -673,15 +672,15 @@ blocks on a WebP. Do not print pixels.
673672
## Screens
674673

675674
```bash
676-
"$SR" --json screen list
677-
"$SR" --json screen show scr_EXAMPLE
678-
"$SR" --json screen update scr_EXAMPLE --name "Lobby" --playlist-id pl_EXAMPLE --if-match REVISION
679-
"$SR" --json screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --if-match REVISION
680-
"$SR" --json screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --if-match REVISION
681-
"$SR" --json screen archive scr_EXAMPLE --if-match REVISION
682-
"$SR" --json screen unarchive scr_EXAMPLE --if-match REVISION
683-
"$SR" --json screen toast scr_EXAMPLE --text "Updated lobby loop" --level info
684-
"$SR" --json screen screenshot scr_EXAMPLE --output ./lobby.webp
675+
screenrig --json screen list
676+
screenrig --json screen show scr_EXAMPLE
677+
screenrig --json screen update scr_EXAMPLE --name "Lobby" --playlist-id pl_EXAMPLE --if-match REVISION
678+
screenrig --json screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE --if-match REVISION
679+
screenrig --json screen set-timezone scr_EXAMPLE --timezone America/Los_Angeles --if-match REVISION
680+
screenrig --json screen archive scr_EXAMPLE --if-match REVISION
681+
screenrig --json screen unarchive scr_EXAMPLE --if-match REVISION
682+
screenrig --json screen toast scr_EXAMPLE --text "Updated lobby loop" --level info
683+
screenrig --json screen screenshot scr_EXAMPLE --output ./lobby.webp
685684
```
686685

687686
`screen list` omits archived screens. `screen list --state archived` lists
@@ -717,10 +716,10 @@ value must be an object. screenRIG does not read or use it and never sends it
717716
to players.
718717

719718
```bash
720-
"$SR" --json comment set screen scr_EXAMPLE --json-value '{"note":"lobby hours"}'
721-
"$SR" --json comment show screen scr_EXAMPLE
722-
"$SR" --json comment set playlist pl_EXAMPLE --page poster --file ./note.json
723-
"$SR" --json comment delete screen scr_EXAMPLE
719+
screenrig --json comment set screen scr_EXAMPLE --json-value '{"note":"lobby hours"}'
720+
screenrig --json comment show screen scr_EXAMPLE
721+
screenrig --json comment set playlist pl_EXAMPLE --page poster --file ./note.json
722+
screenrig --json comment delete screen scr_EXAMPLE
724723
```
725724

726725
`--json-value` is a JSON object. `--file` reads a JSON object from disk.
@@ -732,10 +731,10 @@ Unset show is `{ "comments": null }`.
732731
Application K/V is binary-safe. Use exactly one value mode.
733732

734733
```bash
735-
"$SR" --json kv set --application-id app_EXAMPLE lobby --json-value '{"open":true}'
736-
"$SR" --json kv get --application-id app_EXAMPLE lobby
737-
"$SR" --json kv list --application-id app_EXAMPLE
738-
"$SR" --json kv delete --application-id app_EXAMPLE lobby --if-match REVISION
734+
screenrig --json kv set --application-id app_EXAMPLE lobby --json-value '{"open":true}'
735+
screenrig --json kv get --application-id app_EXAMPLE lobby
736+
screenrig --json kv list --application-id app_EXAMPLE
737+
screenrig --json kv delete --application-id app_EXAMPLE lobby --if-match REVISION
739738
```
740739

741740
## Events
@@ -760,10 +759,10 @@ supplied cursor.
760759
## Feedback
761760

762761
```bash
763-
"$SR" --json feedback bug "Playlist stalls after assign" \
762+
screenrig --json feedback bug "Playlist stalls after assign" \
764763
--body-file ./report.md --command "screen assign"
765-
"$SR" --json feedback feature "Add a dry-run flag" --body "Preview a change first."
766-
"$SR" --json feedback list [--kind bug|feature]
764+
screenrig --json feedback feature "Add a dry-run flag" --body "Preview a change first."
765+
screenrig --json feedback list [--kind bug|feature]
767766
```
768767

769768
`--body` is inline text. `--body-file` reads a file. A title is at most 120

0 commit comments

Comments
 (0)