Skip to content

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.

  • 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 get and spec list: one requirement’s record, or every record with its history.
  • 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.
  • spec init: declare a member, write its pin, and install the agent surface (the agent reference in AGENTS.md, the req-author skill, the spec MCP entry, and a spec guard pre-commit hook). See Platform Mapping.
  • spec index: build the derived index; every other command builds it when needed.
  • spec migrate: strip the retired livesIn and verifiedIn fields from every SPEC.json, and add a missing $schema key to every SPEC.json, check.json, and member config.
  • spec serve, spec mcp, spec docs: the local webapp, the MCP server, and this site offline.