@runalabs/rill-cli 0.1.9 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +35 -16
  2. package/dist/cli.js +963 -506
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -25,14 +25,7 @@ The following local-recording instructions remain available through `record star
25
25
 
26
26
  ## Install and verify
27
27
 
28
- Browser recording runs on macOS and Linux. Install Node.js 22+, Google Chrome or Chromium, and ffmpeg on `PATH`.
29
-
30
- ```sh
31
- # macOS
32
- brew install ffmpeg
33
- # Debian / Ubuntu
34
- sudo apt install ffmpeg
35
- ```
28
+ Browser recording runs on macOS and Linux. Install Node.js 22+ and Google Chrome or Chromium. Rill encodes recordings remotely by default; local FFmpeg is optional. Chrome stays on your machine and can access localhost. Raw frames upload after recording stops.
36
29
 
37
30
  Then install the scoped package:
38
31
 
@@ -43,7 +36,7 @@ rill login
43
36
  rill doctor
44
37
  ```
45
38
 
46
- Do not use `npx rill`: the unscoped package belongs to a different product. Doctor checks Node, API reachability, CLI compatibility, authentication, Chrome, and ffmpeg. Resolve failed checks before starting a run.
39
+ Do not use `npx rill`: the unscoped package belongs to a different product. Doctor checks Node, API reachability, CLI compatibility, authentication, Chrome, and remote encoding availability. Resolve failed checks before starting a run.
47
40
 
48
41
  ## Authenticate
49
42
 
@@ -67,7 +60,7 @@ rill record stop <recording-id>
67
60
  rill inspect https://userill.dev/s/<share-secret>
68
61
  ```
69
62
 
70
- Start returns `recordingId`, `cdpUrl`, `status`, `bodyCaptureEnabled`, and `maxDurationSeconds`. Stop finalizes capture, uploads video and diagnostics, and waits for playback. Confirm `status: "ready"` and a non-null `shareUrl` before returning the evidence link. Local capture finishing does not establish remote readiness.
63
+ Start returns `recordingId`, `cdpUrl`, `status`, `bodyCaptureEnabled`, and `maxDurationSeconds`. Stop finalizes capture, uploads frames and diagnostics for remote encoding, and waits for playback. Confirm `status: "ready"` and a non-null `shareUrl` before returning the evidence link. Local capture finishing does not establish remote readiness.
71
64
 
72
65
  New browser recordings include a visible cursor and click pulses by default. In Rill Settings → Cursor appearance, workspace members can turn them off or choose an accent color. The CLI reads this preference when starting a recording; it is baked into the video and does not change existing recordings. Use an updated CLI and recorder daemon to capture the overlay.
73
66
 
@@ -100,6 +93,7 @@ Capture follows the first page selected at recording start. Keep the flow in tha
100
93
  | Option | Behavior |
101
94
  | --- | --- |
102
95
  | `--url <url>` | Open the target in a managed browser. |
96
+ | `--encoding remote` / `--encoding local` | Remote is the default; local requires FFmpeg. |
103
97
  | `--title <title>` | Name the run; defaults to a timestamped title. |
104
98
  | `--description <text>` | Describe what the run demonstrates. |
105
99
  | `--headed` | Show the managed browser; default is headless. |
@@ -142,7 +136,7 @@ rill upload ./test-results/checkout.webm --title "Checkout test"
142
136
 
143
137
  Upload WebM or MP4 evidence. The command waits for readiness and returns the recording ID and share URL. Existing uploads report `diagnosticsAvailable: false`; they do not import Playwright traces or reconstruct diagnostic events.
144
138
 
145
- Both `upload` and `record stop` accept `--no-wait`. This still waits for upload but skips playback processing: the result is `status: "processing"` with `shareUrl: null`. Check the recording in the dashboard before sharing.
139
+ Both `upload` and `record stop` accept `--no-wait`. This waits for upload acceptance, then returns while processing continues. Remote recordings may report `queued` or `encoding` before `processing` and `ready`. Use `rill record status <recording-id>` to retrieve progress and the eventual share link.
146
140
 
147
141
  ## Command reference
148
142
 
@@ -154,7 +148,8 @@ Use `rill --help` or `<command> --help` for supported flags.
154
148
  | `rill doctor` | Check prerequisites, API compatibility, and authentication. |
155
149
  | `rill record start [options]` | Start a managed or attached browser recording. |
156
150
  | `rill record stop <recording-id>` | Finalize and upload; supports `--no-wait` and `--no-feedback`. |
157
- | `rill record status <recording-id>` | Read local state, falling back to remote state if the local session is unavailable. |
151
+ | `rill record status <recording-id>` | Read the remote encoding job first; otherwise check local capture state with a remote fallback. |
152
+ | `rill record retry <recording-id>` | Resume a retained remote capture or retry a failed encode; supports `--no-wait`. |
158
153
  | `rill record cancel <recording-id>` | Abandon a run created by this credential and release its remote quota reservation. |
159
154
  | `rill upload <video-file>` | Upload video-only evidence; supports `--title` and `--no-wait`. |
160
155
  | `rill inspect <share-url>` | Read bounded context without login. |
@@ -191,14 +186,15 @@ Check the exit status first, then structured fields. Known codes include `authen
191
186
 
192
187
  - **Doctor fails:** read the failed check's recovery field. Correct the credential, API connectivity, or executable path before recording.
193
188
  - **Quota exceeded:** inspect `error.details.quota.type` and `blockingRecordingId` when present. Check the blocking recording; cancel only an abandoned run. Review storage and daily allowance in Billing.
194
- - **Upload interrupted or processing timed out:** keep the recording ID and local artifacts. Check the dashboard for remote readiness. `record status` prefers local state and can report local `ready` without a share URL; this does not prove remote playback readiness.
189
+ - **Remote upload interrupted or encoding failed:** keep the recording ID and local capture files. Run `rill record status <recording-id>`, then `rill record retry <recording-id>` with the original credential before capture expiry. Retry resumes accepted chunks or requeues the encode without repeating browser actions. A `ready` result needs a share URL before you return it as evidence.
195
190
  - **Duration limit reached:** local capture finalizes automatically, but `record stop` is still needed to upload.
196
- - **Local session missing:** `record status` falls back to remote state. `drafts list` locates local directories, which may be incomplete. There is no `drafts resume` command.
191
+ - **Terminal closed:** after upload acceptance, the server finishes independently; retrieve the result with `record status`. Before acceptance, retry from the original machine while its captured frames remain available.
192
+ - **Local session missing:** `record status` checks for a remote encoding job before falling back to local or remote recording state. `drafts list` locates local directories, which may be incomplete. There is no `drafts resume` command.
197
193
  - **Share cannot be inspected:** open the complete URL in a browser; ask the owner for a current link if needed.
198
194
 
199
195
  A failed local startup automatically attempts to cancel the remote reservation it just created. `record cancel` changes remote state and does not stop the local browser; finish local capture before abandoning the remote reservation.
200
196
 
201
- When finalized artifacts survive, retain `recording.webm` and `diagnostics-v1.ndjson.gz` in the recording's draft directory. `rill upload <path-to-recording.webm>` is a video-only fallback: it creates a new recording and does not restore the original diagnostics. Successful stop with readiness removes that run's local artifact directory.
197
+ For `--encoding local`, when finalized artifacts survive, retain `recording.webm` and `diagnostics-v1.ndjson.gz` in the recording's draft directory. `rill upload <path-to-recording.webm>` is a video-only fallback: it creates a new recording and does not restore the original diagnostics. Successful stop with readiness removes that run's local artifact directory.
202
198
 
203
199
  `drafts purge` deletes local draft directories older than 24 hours by modification time, without a confirmation prompt. Recover needed evidence before purging.
204
200
 
@@ -209,7 +205,7 @@ When finalized artifacts survive, retain `recording.webm` and `diagnostics-v1.nd
209
205
  | `RILL_TOKEN` | Agent credential; overrides the keychain. |
210
206
  | `RILL_API_URL` | API origin; defaults to `https://userill.dev`. Global `--api-url` takes precedence. |
211
207
  | `RILL_CHROME_PATH` | Chrome or Chromium executable path. |
212
- | `RILL_FFMPEG` | ffmpeg executable; defaults to `ffmpeg` on `PATH`. |
208
+ | `RILL_FFMPEG` | FFmpeg executable for `--encoding local`; defaults to `ffmpeg` on `PATH`. |
213
209
  | `RILL_HOME` | Recorder state directory; defaults to `~/.rill`. |
214
210
  | `RILL_SOCKET` | Recorder socket; defaults to `recorder.sock` inside `RILL_HOME`. |
215
211
  | `RILL_TEMP` | Artifact root; defaults to `rill-recordings` inside the system temporary directory. |
@@ -269,3 +265,26 @@ Substitute your API URL if you configured another environment. These commands cl
269
265
  Use `--json` for a machine-readable result (`--pretty` also enables JSON formatting).
270
266
  Provider token usage is retained internally and omitted from customer output.
271
267
  `rill run status <run-id>` and `rill run cancel <run-id>` support the same output options.
268
+
269
+ ## Remote encoding
270
+
271
+ Since 0.1.10, `record start` uses remote encoding by default. Chrome stays local, including access to localhost; FFmpeg is required only for `record start --encoding local`. For local encoding, install FFmpeg with `brew install ffmpeg` on macOS or `sudo apt install ffmpeg` on Debian/Ubuntu, then run `doctor --encoding local`. Remote encoding adds no charge and consumes no cloud-run credits; existing recording allowances still apply. Captures are limited to ten minutes and 1 GiB of raw frames, with three pending jobs per workspace. Busy recordings can reach the byte limit sooner.
272
+
273
+ `record stop` uploads frames and waits for playback. `record stop ID --no-wait` returns after upload acceptance; processing continues if the terminal closes. Use `record status ID` to retrieve progress and the share link, or `record retry ID` to resume an interrupted upload or retry encoding without repeating browser actions. Raw captures are removed after successful publication. Recoverable captures expire after 24 hours: local retention starts at capture start, server retention at upload initialization. Keep the original credential and local files until upload acceptance; `expiresAt` reports the server deadline once a job exists.
274
+
275
+ ```sh
276
+ rill record stop <recording-id> --no-wait
277
+ rill record status <recording-id>
278
+ # If upload or encoding failed, retry the same recording:
279
+ rill record retry <recording-id>
280
+ ```
281
+
282
+ Progress runs through `uploading` → `queued` → `encoding` → `processing` → `ready`. Waiting for capacity is normal; do not repeat the browser journey merely because a job is queued. Long or busy recordings can take several minutes to upload and encode.
283
+
284
+ ### Anonymous local recordings and account connection
285
+
286
+ `rill record start` can begin without sign-in when the server supports anonymous access. The CLI stores the identity in the OS credential store and uses local encoding. Anonymous access includes three successful recordings, at most five minutes and 250 MB each; each recording and its unlisted share link expires seven days after creation. Failed uploads do not consume the successful-recording allowance. Source and service rate limits also apply.
287
+
288
+ Run `rill connect --email you@example.com` to authorize account access or keep your anonymous recordings. Open the displayed link, sign in, and enter the code yourself. Approval allows creation and reading of your existing and new recordings for 90 days, with automatic renewal of one-hour access tokens. Revoke the connection in Rill's Credentials page to stop access and renewal. Deletion and changes to existing sharing settings are not included.
289
+
290
+ Use `rill record list` to list accessible recordings and `rill inspect <recording-id>` for private recording details. `rill inspect <share-url>` continues to work without account access. The existing `rill login` and `RILL_TOKEN` flows remain supported. Local credential storage requires macOS Keychain or Linux Secret Service.