Skip to main content
Browse the documentation

CLI reference

Subcommand reference

Every snaga subcommand, what it is for, and which ones only read.

snaga <subcommand> --help is authoritative on your machine. This page is for finding the one you want.

Account

snaga loginSign in — email one-time code, or an API token starting uarp_
snaga whoamiThe account, organisation and plan this machine is using
snaga logoutRemove saved credentials
snaga updateUpdate to the latest version

Connecting

snaga connectLink this machine so the web and mobile apps can run tasks here — see Run tasks from your phone
snaga mcp-serverExpose the tool registry as an MCP server over stdio, so other agents and editors can call Snaga's tools

Sessions

snaga sessions listOne line per session: id, start, message count, opening request
snaga sessions show <id>Print a transcript
snaga sessions fork <id>Copy a session to a new id, leaving the original alone
snaga tail <session-id>Follow a session's structured event log live, from another terminal, without attaching to the process

tail is the one to use while an autonomous run is working: it reads the event log and follows it, so you can watch without interrupting.

Tools from the registry

snaga spec search <query>Search the registry
snaga spec info <name>Metadata for one SPEC
snaga spec install <name>Install, or re-sync from the lockfile
snaga spec listWhat is installed locally
snaga spec updateMove to newest allowed versions
snaga spec initScaffold a SPEC project here
snaga spec buildBuild a bundle locally, without publishing
snaga spec publishBuild and publish
snaga spec shareManage who can see a private SPEC
snaga spec yank / unyankWithdraw or restore a version you own

See Installing tools from the registry.

Permissions

snaga permissions policyLong-term rules in ~/.config/snaga/permissions.toml
snaga permissions auditThe append-only grant log at ~/.snaga/audit/grants.log

Session grants live in memory — use /permissions in the REPL for those.

Autonomous runs

snaga autonomy listPersisted runs with their progress; ones with pending work can be resumed
snaga autonomy reflect <goal>Cross-session report for a goal: run count, outcome tally, trajectory, SPECs installed previously
snaga eval listMost-recent runs across all goals
snaga eval show <goal_id>Every stored run for one goal, newest first
snaga eval baseline freeze <label>Snapshot the current state under a label
snaga eval baseline diff <label>Per-goal Regression / Improvement / Stable since that baseline

eval show answers "did that install actually help?" — compare the outcome column against the tools present at each run's start.

Everything here reads, except baseline freeze.

Maintenance

snaga selftestFast subsystem probes; exits 0 when all pass. Intended as a post-install gate
snaga eval pruneDelete run rows older than a cutoff. The latest run of every goal is always kept, so reflection keeps working; baselines are never touched
snaga history pruneTrim the SPEC install ledger. Anything touching a currently-installed SPEC is preserved regardless of age, or rollback would lose track of what to revert
snaga rollback <session-id>Reverse a session's recorded side-effects

snaga rollback reverses what can be reversed — file writes, SPEC installs, WASM tool creations — and surfaces the rest for you: shell runs and remote HTTP mutations are listed for review rather than silently "undone", because nothing can honestly claim to un-send a request.

Both prune commands preserve what something else still depends on. That is the pattern worth noticing before you write your own cleanup: age is not the only thing that decides whether a row is garbage.