Spec0docs
CLICommands

spec0 publish

Publish an API spec to the public registry (org-scoped, shareable URL, no team required)

Auto-generated from spec0 commands --output=json. Do not edit by hand — changes are overwritten by npm run sync:cli-docs.

Usage

spec0 publish [spec-file] [options]

Arguments

namerequireddescription
spec-filenoPath to OpenAPI spec (or use --spec-file / global --spec-file)

Flags

flagdescriptiondefault
--spec-file <path>Path to OpenAPI spec file
--public-api-id <id>Existing public API ID to update
--name <slug>URL-safe API slug (e.g. payments-api). Inferred from spec info.title if omitted.
--title <title>Human-readable display title. Defaults to --name if omitted.
--description <text>Short description of the API
--version <version>Version tag (e.g. v1.0.0)
--visibility <state>Visibility: draft | published | unlisted (default: published)published
--release-notes <text>Release notes for this version
--git-sha <sha>Git commit SHA for provenance
--strictFail on any Spectral lint warning
--skip-lintSkip lint gate
--dry-runValidate only, do not call the API
--format <fmt>Output format: text | json | githubtext
--org <org>Override default org (UUID)

Exit codes

Stable contract — branch on these from CI and agents.

codemeaning
0success
1generic / unclassified failure
2usage error (bad flags, missing args)
3not authenticated (no token / token expired)
4permission denied (403)
5resource not found (404)
6conflict (409 — e.g. name already taken)
7validation failed (422 — e.g. spec below min score)
8rate limited (429)
9upstream server error (5xx)
10network error (unreachable, timeout)

See also

On this page