Skip to main content

CLI Overview

The spec-spine command-line tool is a thin translation of spec-spine-core results into stdout/stderr and stable exit codes. All process::exit, stdout, and git side effects live here; the engine stays pure.

Global Flags

FlagValueDefaultEffect
--repo <DIR>Path. (current directory)Selects the repository root.

Exit Codes

Exit codes are a stable contract across the entire CLI surface:

CodeMeaning
0Success / OK.
1Validation failure, not-found, or coupling drift.
2Staleness (committed index is out of date).
3I/O, parse, schema, or config error.

Command Surface

CommandCapability
spec-spine initScaffold a new adopter (config, standards, specs/000, rules).
spec-spine compileValidate frontmatter and emit the deterministic registry.
spec-spine indexScan manifests and specs to emit the codebase index. Includes check, render, and orphans subcommands.
spec-spine registryTyped read-only queries against the compiled registry. Includes list, show, status-report, and relationships.
spec-spine lintCheck corpus conformance.
spec-spine coupleThe PR-time drift gate.

(Note: Additional commands like attest and verify-attestation may be present in the binary but are considered advanced/experimental surface outside the core workflow.)