CLICommands
spec0 push
Push an OpenAPI spec to the platform (team-scoped, private)
Auto-generated from
spec0 commands --output=json. Do not edit by hand — changes are overwritten bynpm run sync:cli-docs.
Usage
spec0 push [spec-file] [options]Arguments
| name | required | description |
|---|---|---|
spec-file | no | Path to OpenAPI spec file (or use --spec-file) |
Flags
| flag | description | default |
|---|---|---|
--spec-file <path> | Path to OpenAPI spec file | |
--name <name> | API name (kebab-case). Defaults to spec filename if omitted. | |
--team <team> | Team UUID or slug. Defaults to 'Unassigned APIs' if omitted. | |
--version <version> | Version tag (e.g. 1.2.0). Defaults to info.version in spec. | |
--api-id <id> | Existing API UUID to update (backward compat; prefer --name) | |
--semver | Auto-compute next semver via oasdiff diff classification | |
--git-sha <sha> | Git commit SHA (auto-detected if .git is present) | |
--github-repo <repo> | GitHub repository URL for provenance | |
--github-branch <branch> | GitHub branch for provenance | |
--strict | Fail on any Spectral lint warning | |
--skip-lint | Skip lint gate | |
--dry-run | Validate and print what would be sent, without pushing | |
--verbose | Print verbose request/response logs | |
--format <fmt> | Output format: text, json, github | text |
--org <org> | Override default org (UUID) |
Exit codes
Stable contract — branch on these from CI and agents.
| 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) |