Skip to content

Quickstart

Agent-oriented five-step flow. All examples use --json; omit it for human-readable tables when the CLI supports them.

Prerequisites

  • sp on PATH
  • sp-boot running at http://127.0.0.1:8090
  • Valid SP_TOKEN or ability to log in

1. Configure and authenticate

bash
export SP_API_URL=http://127.0.0.1:8090
sp config init
sp auth login --email you@example.com --code 123456 --json
# or: export SP_TOKEN=<jwt-from-ui>

2. List applications

bash
sp app list --json

Example data shape:

json
{
  "items": [
    { "appId": "my-app", "agentStatus": "online", "instanceCount": 2 }
  ]
}

3. Validate a recording policy

bash
sp policy recording validate -f recording.yaml --json

On success, data.valid is true. On validation errors, exit 1 with structured error details.

4. Run a replay

bash
sp replay run \
  --app my-app \
  --env staging \
  --from -24h \
  --enable-mock \
  --json

Capture data.planId from the response.

5. Watch progress

bash
sp replay status plan-abc123 --watch --json

--watch polls until terminal state (FINISHED, FAILED, CANCELLED).


Next steps (v2 diagnosis)

After a replay fails:

bash
sp replay case list --plan plan-abc123 --failed --json
sp replay diff get <diffId> --out-dir .sp-work --json

Full walkthrough: Diagnose replay failure.