Commands
Reference for public sp subcommands. Use --json on API-backed commands. See Output contract.
Lifecycle (recommended)
Job-oriented commands that follow record-and-replay order:
| Command | Synopsis |
|---|---|
| setup | doctor — config, health, auth, agent jar |
| agent | download, command — install jar and JVM flags |
| record | case list — recorded entry cases before replay |
| diagnose | replay, trace — bundled investigation workflows |
Platform
Connect, authenticate, manage apps and policies, run replay plans.
| Command | Synopsis |
|---|---|
| config | Profiles, URL, init |
| auth | Login, whoami, refresh |
| app | List, create, agent status, recent replays |
| policy | Recording, mock, compare YAML policies |
| replay | Run, status, stop, rerun plans |
| health | Cluster health |
version | CLI version string |
Investigation
Recorded data, traces, and replay failures.
| Command | Synopsis |
|---|---|
| record | Query recordings, completeness, record logs |
| trace | Find traces by business attributes |
| replay case | List cases, metadata, mock tree |
| replay diff | Diff artifacts, replay logs |
| extraction-rule | Business attribute extraction rules |
Investigation commands support --out-dir, --page, and --limit unless noted.
Administration
Groups, system config, diagnostics, legacy APIs.
| Command | Synopsis |
|---|---|
| group | User groups and app grants |
| grant | App grant listing (grant list) |
| system | System config keys |
| ops | Storage and schedule diagnostics |
| config legacy | Legacy /api/config/* (deprecated) |
Global flags
text
--json Machine-readable stdout (required for agents)
--profile Config profile name
--api-url Override backend URL
--token Override JWT (else SP_TOKEN / config)
--config Extra config file (JSONC overlay)
--quiet Suppress non-error stderr
--out-dir Directory for artifact files
--page Page number (investigation list commands)
--limit Page size / max itemsCheat sheet
bash
sp config init && sp auth login --email u@c.com --code 123456 --json
sp setup doctor --json
sp app create my-svc --json
sp agent download --json
sp agent command --app <appId> --json # copy startCommand into your run script
sp record case list --app <appId> --since -1h --json
sp replay run --app <appId> --env http://your-service:8080 --from -24h --json
sp replay status <planId> --watch --json
sp diagnose replay <planId> --failed-only --out-dir .sp-work --json