CLI Reference
offrig [OPTIONS] [--] <COMMAND>...offrig run [OPTIONS] [--] <COMMAND>...offrig <shell|snap|sandbox|sync|rig|daemon|init|status|doctor|shim|mcp|skill|update|telemetry|version> [ARGS]...Flags before <COMMAND> (or --) belong to offrig; every token from <COMMAND> onward passes verbatim to the remote Sandbox.
Reserved subcommands (16)
Section titled “Reserved subcommands (16)”| Subcommand | Sub-actions | Summary |
|---|---|---|
run |
(or direct offrig <cmd>) |
Execute a Run in the Worktree’s Sandbox (or ephemeral --isolated fork). |
shell |
— | Open an interactive shell inside the Worktree’s Sandbox. |
snap |
ls, build, save, inspect, rollback, prune, rm |
Manage Base, Deps, and Saved Snapshots. |
sandbox |
ls, status, stop, rm, reset, resize, forward |
Manage persistent Worktree Sandboxes and port-forward holds. |
sync |
pull |
Pull remote Sandbox edits back to the local Worktree. |
rig |
ls, add, rm, default, status, doctor, deploy, upgrade, rotate-token, destroy |
Manage Rigs and self-hosted remote Gateways (cloudflare). |
daemon |
start, stop, status |
Manage the lazily auto-started Local daemon. |
init |
--force, --stdout |
Generate starter offrig.toml from detected lockfiles and mise config. |
status |
--json, --rig |
Show active Rig, Worktree, Environment, Deps Snapshot, and Sandbox status. |
doctor |
--rig, --all, --offline, --json |
Run read-only workstation and Rig diagnostics. |
shim |
install, remove, ls, env |
Manage opt-in load-aware PATH Shims. |
mcp |
--cwd, --rig, --no-daemon, --read-only |
Run the built-in stdio MCP server exposing 19 offrig_* tools for coding agents. |
skill |
install, remove, show, status |
Install, inspect, and manage the bundled offrig coding-agent skill. |
update |
--check, --version, --force, --json |
Check for or install a standalone release of offrig and its Linux offrigd sidecars. |
telemetry |
status, enable, disable, reset-id, preview |
Inspect, preview, reset, or disable anonymous CLI usage and crash telemetry (Telemetry & Privacy). |
version |
— | Print CLI and wire protocol version (-V, --version). |
Run flags (offrig [OPTIONS] <COMMAND>...)
Section titled “Run flags (offrig [OPTIONS] <COMMAND>...)”| Flag | Description |
|---|---|
--rig <NAME> |
Override target Rig for this Run. |
-e, --env <KEY[=VAL]> |
Pass an environment variable (KEY forwards local value if set; repeatable). |
--secret <NAME> |
Inject a local-only named secret from [secrets.<NAME>] (repeatable). |
-p, --port <[LOCAL:]REMOTE> |
Forward Sandbox loopback port to laptop localhost (repeatable). |
-R, --reverse-port <[REMOTE:]LOCAL> |
Reverse-forward laptop localhost port into Sandbox localhost (repeatable). |
--no-ports |
Do not bind [run].ports from config for this Run. |
--json[=summary|stream] |
Emit structured schema_version: 1 JSON summary or NDJSON stream. |
--report-file <PATH> |
Stream normal output while writing JSON summary envelope to <PATH>. |
-t, --tty / -T, --no-tty |
Force or disable remote PTY allocation. |
--isolated |
Fork an ephemeral Sandbox from the Deps or Base Snapshot and delete it on exit. |
--recreate |
Reset persistent Sandbox from current Base/Deps Snapshot first. |
--ro |
Skip automatic Write-back after the Run. |
--pull <GLOB> |
Pull matching remote paths back after the Run (repeatable; works with --ro). |
--conflict <fail|overwrite|keep-local> |
Override Write-back local-edit conflict policy. |
--no-daemon |
Bypass the Local daemon and execute in-process. |
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0–123 |
Remote command exit code. |
124 |
Write-back aborted on local-edit conflict (fail policy); local Worktree untouched. |
125 |
offrig CLI, configuration, trust-boundary, or Provider error. |
126 |
Remote executable found but not executable. |
127 |
Remote command not found. |
128 + N |
Remote command terminated by signal N. |