Commands
Tip
Commands are grouped below.
spec <command> --helpshows arguments and examples,spec help <command> --markdownprints one command’s reference page, and every command takes--json.
Query
spec context— The documents that govern code paths: read this before changing codespec find— Find documents by words, type, owner, status or tagspec show— Frontmatter, outline, one section, or relations of a documentspec resolve— Resolve an id, alias, path or slug to one documentspec graph— Graph queries: impact, chain, governs, consumers; or the whole graphspec owners— Owners, their documents and where public owners store theirsspec assets— Agent skills, rules, subagents and instruction files declared under [[assets]]spec log— The history of a document’s status and relations, from gitspec census— Counts of documents, references and attachments
Write
spec new— Create a document at the place its owner and type decidespec set— Change frontmatter with the lifecycle enforcedspec edit— Replace or append to a section or the whole body; previews until –writespec mv— Move or rename a document and rewrite every reference to itspec fix— Apply fixes that need no judgementspec sync— Copy asset sources over the [[assets]] roots that declare copy_of; previews until –writespec attach— Register files with a document, in the repository or the storespec fetch— Download a document’s stored attachments, verified by hashspec files— A document’s attachments and where each is kept
Check
spec check— Run the rulesspec verify— Run sot verify commandsspec guard— Run guards over files and commit messagesspec audit— Diagnose what passes the rules yet needs attention; build review packs; record auditsspec explain— Why a rule exists and how to fix it; or the configuration keysspec schema— Document types and their frontmatter; or output schema names
Set up and connect
spec init— Write a starter spec.tomlspec import— Bring documents from another layout in through an import mapspec agents— The lines to put in an agent’s instruction filespec hook— Hook snippets for git, pre-commit, lefthook or huskyspec plugins— Configured plugins and what they providespec export— Export through an exporter pluginspec mcp— Serve these commands as MCP tools over stdiospec lsp— Serve check findings as editor diagnostics (Language Server Protocol over stdio)spec help— Commands and arguments; with –json, the whole command tree
All commands
There are 33 commands. This table is
generated by spec help --markdown; do not edit it by hand.
| command | what it does |
|---|---|
spec context |
The documents that govern code paths: read this before changing code |
spec find |
Find documents by words, type, owner, status or tag (also spec list, spec ls) |
spec show |
Frontmatter, outline, one section, or relations of a document |
spec resolve |
Resolve an id, alias, path or slug to one document |
spec graph |
Graph queries: impact, chain, governs, consumers; or the whole graph |
spec owners |
Owners, their documents and where public owners store theirs |
spec assets |
Agent skills, rules, subagents and instruction files declared under [[assets]] |
spec log |
The history of a document’s status and relations, from git |
spec new |
Create a document at the place its owner and type decide |
spec set |
Change frontmatter with the lifecycle enforced |
spec edit |
Replace or append to a section or the whole body; previews until –write |
spec mv |
Move or rename a document and rewrite every reference to it |
spec fix |
Apply fixes that need no judgement |
spec sync |
Copy asset sources over the [[assets]] roots that declare copy_of; previews until –write |
spec attach |
Register files with a document, in the repository or the store |
spec fetch |
Download a document’s stored attachments, verified by hash |
spec files |
A document’s attachments and where each is kept |
spec init |
Write a starter spec.toml, or upgrade an existing one |
spec import |
Bring documents from another layout in through an import map |
spec check |
Run the rules |
spec verify |
Run sot verify commands |
spec guard |
Run guards over files and commit messages |
spec audit |
Diagnose what passes the rules yet needs attention; build review packs; record audits |
spec census |
Counts of documents, references and attachments |
spec doctor |
Read-only setup diagnosis: configuration, conflict markers, ignored local documents |
spec explain |
Why a rule exists and how to fix it; or the configuration keys |
spec schema |
Document types and their frontmatter; or output schema names |
spec help |
Commands and arguments; with –json, the whole command tree |
spec agents |
The lines to put in an agent’s instruction file |
spec hook |
Hook snippets for git, pre-commit, lefthook or husky |
spec plugins |
Configured plugins and what they provide |
spec export |
Export through an exporter plugin |
spec mcp |
Serve these commands as MCP tools over stdio |
spec lsp |
Serve check findings as editor diagnostics (Language Server Protocol over stdio) |