Commands
Install the CLI from npm: bun add -g @spec-engine/spec-engine puts spec on your PATH. Without a global install, run any command as bunx @spec-engine/spec-engine <command> [args]. See Getting Started for the details.
This page groups the commands by task. The exact contract of each one (flags, --json shapes, exit codes) is in the Agent Reference, which is the one copy of it.
Find the requirements a change touches
Section titled “Find the requirements a change touches”spec query: full-text search over requirement statements and glossary terms.spec resolve: the requirements tagged in given files, or with--req, every tag site for one requirement.spec getandspec list: one requirement’s record, or every record with its history.
Check a change before it ships
Section titled “Check a change before it ships”spec check: integrity, coverage, drift, and governance diagnostics. See Integrity Checks.spec guard: the pre-commit gate that blocks a change about to lose a requirement, its last implementation, or its last test.spec lint: every statement-rule finding for the platform, a domain, or one requirement.spec gate: the approval decision for one member and one requirement.
Author and change requirements
Section titled “Author and change requirements”spec domain: scaffold a domain, list the charters, or set a domain’s statement grammar.spec req: print the next id, or mint a requirement.spec amend,spec supersede,spec move,spec deprecate,spec accept: the requirement lifecycle.spec termandspec glossary: glossary terms and the generatedGLOSSARY.md.
See coverage across a platform
Section titled “See coverage across a platform”spec map: the requirement by member coverage matrix.spec propagation: which members have moved to a superseded requirement’s successor.spec relationsandspec provenance: related requirements, and the tickets behind each one.
Set up and serve
Section titled “Set up and serve”spec init: declare a member, write its pin, and install the agent surface (the agent reference inAGENTS.md, thereq-authorskill, thespecMCP entry, and aspec guardpre-commit hook). See Platform Mapping.spec index: build the derived index; every other command builds it when needed.spec migrate: strip the retiredlivesInandverifiedInfields from everySPEC.json, and add a missing$schemakey to everySPEC.json,check.json, and member config.spec serve,spec mcp,spec docs: the local webapp, the MCP server, and this site offline.