CLI reference

rig mirrors everything you can do in the app, and is the primary interface for AI agents. Install it with rig install or from the setup wizard.

Output rules

The CLI adapts to where its output is going:

  • At a terminal - pretty, coloured, aligned output for humans.
  • Piped to a script or AI - raw JSON, no ANSI codes. Force it anywhere with --json.
  • Errors go to stderr as { "error": "...", "code": "..." }.
  • Exit codes: 0 success, 1 general error, 2 not found, 3 already running, 4 app not running.
agent · piped
rig inspect acme-storefront | jq '{ port, pid, memory_mb }'
 
{ "port": 3001, "pid": 48213, "memory_mb": 312.4 }

Commands

Privileged actions - enabling .rig routing and trusting the HTTPS certificate - stay in the GUI, since they need a macOS auth prompt. Everything else has a CLI equivalent.

Inspect

rig listList all projects with status
rig statusSystem status: DNS, proxy, counts
rig inspect <name>Full detail: port, pid, memory, uptime, framework
rig metrics <name>Recent memory / CPU samples

Control

rig start <name>Start a project
rig stop <name>Stop a project
rig restart <name>Restart a project
rig run <name> <script>Run a package.json script or Deno task, streaming
rig dev [path]Discover and start a directory without permanently watching it
rig open <name>Open the project URL in your browser

Logs

rig logs <name>Last 100 log lines (use -n to change the count)
rig logs <name> --followStream logs in real time as JSON
rig logs <name> --since 5mLogs from the last duration
rig logs <name> --grep <text>Filter log lines by substring
rig clear-logs <name>Clear a project's log buffer

Config

rig add <path>Watch a folder and discover the projects inside it
rig remove <path>Stop watching a folder
rig ssl <name> <on|off>Toggle per-project HTTPS
rig node <name> [version]Pin a Node version (auto to clear)
rig configPrint all settings
rig config set <key> <value>Set tld, pkg-manager, node-manager, start-on-login
rig exportPrint this machine's shareable config as JSON
rig import <file>Apply a shared config (or - to read stdin)

System

rig free-port <port>Force-free a TCP port
rig doctorRun health checks across DNS, proxy, ports, permissions
rig installSymlink the rig binary onto your PATH

Streaming logs

--follow keeps the connection open and streams one JSON LogLine per row - ideal for an agent tailing a server while it reproduces a bug.

terminal
$ rig logs dashboard-api --follow

Next: AI skill