c4s is the command-line reader for your spec. Where npx @inharness-ai/claude4spec
opens the editor in your browser, c4s does the opposite: it stays in the terminal and
reads straight from your project — for scripts, CI checks, piping into other tools, or just
a quick lookup without leaving your shell.
It's read-only. Every command except ask works directly against the
spec database with no running server, so you can drop it into a build step or a git hook.
c4s --helpc4s ships in the same package as the editor. If you've run
npx @inharness-ai/claude4spec in a project, the binary is already available there; install
the package globally (or add it to a project's dev dependencies) to call c4s directly.
How it finds your project
You don't point c4s at your spec — it finds it. From the current directory it walks up
the tree until it hits a .claude4spec/ directory, then reads from there. Run c4s anywhere
inside your repo and it resolves the same project.
To target a project elsewhere, pass --project:
c4s catalog --project ../my-other-specAll commands except ask resolve the project by its .claude4spec/db.sqlite file.
ask instead looks for .claude4spec/config.json, because it needs to discover the
port of a running editor server.
Entity types
A spec is made up of typed entities, and the kinds a project contains can vary. For the
basics — the entity types your project has, each with a count and a one-line description —
run c4s catalog. It's the place to start when you want to see what
a spec is made of.
Global flags
These work on every command:
--project <path>Target a specific project instead of walking up from the current directory.--format json|textOutput format. Defaults to json (the resolve command defaults to inline instead).--compactEmit minified JSON — handy when piping into another tool.--sort-keysDeterministic key ordering in JSON output, so results diff cleanly.--versionPrint the c4s version and exit.--helpShow the command list and exit.Where to go next
- Explore what's in your spec —
catalog,list-tags,list-slugs,find-references. - Read & serialize entities —
detail, the tag serializers, andresolve. - Ask the spec author —
ask, a live Q&A channel with the spec agent. - MCP integration — expose your spec to an external agent over MCP.