CLICommands
Commands
Every spec0 command — auto-synced from @spec0/cli.
@spec0/cli exposes the full command surface. Each page is generated from the live binary's manifest, so flags and exit codes never drift.
| Command | Description |
|---|---|
spec0 version | Print CLI version, Node.js version, and optional git ref (SPEC0_CLI_GIT_REF) |
spec0 whoami | Show the active org and authentication state |
spec0 auth login | Log in via browser and store credentials in ~/.spec0/config.json |
spec0 auth logout | Deactivate key on server and clear local config |
spec0 auth status | Show the active org and authentication state |
spec0 auth token | Print token (for scripting: spec0 auth token | pbcopy) |
spec0 auth switch | Switch default org |
spec0 init | Detect your OpenAPI spec and create a .spec0.yaml config file |
spec0 push | Push an OpenAPI spec to the platform (team-scoped, private) |
spec0 publish | Publish an API spec to the public registry (org-scoped, shareable URL, no team required) |
spec0 mock create | Create (or fetch existing) mock server for an API; print URL and one-time key. |
spec0 mock list | List all mock servers in the org. |
spec0 mock show | Show details for the mock server tied to <api> (name or UUID). |
spec0 mock url | Print mock base URL for <api> (name or UUID). One line, pipe-friendly. |
spec0 lint | Lint OpenAPI spec with Spectral |
spec0 pull | Download spec from registry (e.g. acme/order-service or acme/order-service@v1.2.0) |
spec0 search | Semantic search for APIs in your org |
spec0 diff | Diff two specs: each side is a file path or registry ref org/api[@tag] (latest if tag omitted) |
spec0 log | Show published version history. api-ref: api-name (default org) or org-slug/api-name |
spec0 status | Show org overview: API count, mock servers, teams, plan |
spec0 mcp url | Print MCP server URL for Cursor/Claude config |
spec0 mcp test | Verify MCP server is responding |
spec0 api list | List APIs in your organisation (catalogue view). |
spec0 api show | Show metadata for a single API (no spec body). |
spec0 api changelog | Show changes between published versions of an API. |
spec0 doctor | Diagnose CLI configuration: where each setting is being read from. |
spec0 sync-status | Check whether a spec needs republishing (compares git SHA to last published). |
spec0 ci generate | Generate a workflow file for <provider> that runs 'spec0 publish' on push. |
spec0 commands | List every command in a machine-readable manifest. Designed for AI agents and scripts. |
Exit codes
Same table appears on every command page; reproduced here so you can branch on it without opening a specific command.
| code | meaning |
|---|---|
| 0 | success |
| 1 | generic / unclassified failure |
| 2 | usage error (bad flags, missing args) |
| 3 | not authenticated (no token / token expired) |
| 4 | permission denied (403) |
| 5 | resource not found (404) |
| 6 | conflict (409 — e.g. name already taken) |
| 7 | validation failed (422 — e.g. spec below min score) |
| 8 | rate limited (429) |
| 9 | upstream server error (5xx) |
| 10 | network error (unreachable, timeout) |