Last updated 2026-05-07
CLI Overview
The stax CLI is a single Go binary that wraps the
stacked-diff workflow, controls the local runner, and launches the
dashboard. There is also a legacy TypeScript implementation under
platform/cli/; the documentation here always refers to
the Go binary unless explicitly stated.
Two halves
Conceptually the CLI does two distinct jobs that you can use independently:
1. Stacked-diff workflow
Hides git behind a verb-driven workflow. You don't git
rebase or git push directly — you
stax sync and stax submit.
stax clone myorg/repostax feature "user auth"stax diff "Add login form"stax syncstax submitstax land2. Local runner control
HTTP wrappers around the runner's REST API. Trigger workflows, inspect runs, manage local runner secrets, manage repo-backed SOPS secrets, launch the dashboard.
stax runner startstax workflowsstax run ci -i environment=stagingstax runsstax log <run-id> -fstax secret set NPM_TOKENstax secrets verifystax dashboardWhere state lives
| Location | What's there |
|---|---|
.stax/ in each cloned repo | features.json, diff metadata, activity log. Excluded via .git/info/exclude. |
~/.local/share/stax/runner.pid | Runner PID file (used by runner stop / status). |
~/.local/share/local-runner/secrets/ | Per-workspace runner mirror, keyed by SHA-256 of the workspace path. |
infra/secrets/*.enc.yaml + .sops.yaml | Committed SOPS + age encrypted secret files and recipient policy. |
~/.config/sops/age/keys.txt or macOS Keychain | Local age private identity used to decrypt repo-backed secrets. Never committed. |
~/.local/share/local-runner/actions-cache/ | Cached marketplace actions (24h TTL by default). |
~/.local/share/local-runner/cache/ | Filesystem-backed actions/cache data. |
/tmp/runner-sandboxes/ | Per-run sandbox workspaces. Cleaned automatically. |
Conventions
-
All commands accept
--helpfor full Cobra-rendered usage. The CLI also prints a relevant "next step" hint at the bottom of most successful runs. -
Mutating commands support the global
--dry-runflag where a meaningful preview exists. -
The CLI calls the runner over
http://localhost:4800. Override withRUNNER_URLif you've moved the port (or pass--porton relevant commands). -
The CLI auto-saves uncommitted changes (as a
WIP: auto-savecommit) before switching context — you'll never lose work to a wrongswitch.
Continue reading
- The stacked-diff workflow — the verb-driven loop in detail.
- Command reference — every command, every flag.
- Dashboard parity — which CLI workflows already have UI equivalents.
- Affected test runner —
stax testwith content-addressable caching. - Configuration —
stax config, registry.toml, env vars.