CLI

Read & serialize entities

Pull a single entity, fetch the exact form behind a page tag, or expand a whole file.

Once you know what's in a spec, these commands hand you the content itself — either a full entity, the precise serialized form that a page tag would render, or a whole markdown file with all its tags expanded.

detail

The full picture of one entity, with all its sections. This is the human-readable view — reach for it when you want to read an entity rather than embed it.

$c4s detail --type endpoint --slug create-order

The tag serializers

When you author spec pages you reference entities with XML tags — <single_element/>, <tagged_list/>, and friends. Each tag has a matching c4s command that returns exactly what that tag renders to. The editor and the spec-reading agent use these under the hood; you can call them directly to inspect or script against the same output.

inline_mention --type <t> --slug <s>The compact inline form of one entity — the <inline_mention/> tag.
single_element --type <t> --slug <s>The standalone block form of one entity — the <single_element/> tag.
element_list --type <t> --slugs <s1,s2,...>A list built from explicit slugs — the <element_list/> tag.
tagged_list --type <t> --tags <t1,t2,...> [--filter and|or]Every entity of one type matching the given tags — the <tagged_list/> tag.
tagged_list_mixed --tags <t1,t2,...> [--filter and|or]Matching entities across all types, grouped by type — the <tagged_list_mixed/> tag.

The tag queries match any of the given tags by default (--filter or). Pass --filter and to require all of them.

$c4s tagged_list --type endpoint --tags v1,public --filter and

resolve

Where the serializers each return one tag's output, resolve takes a whole markdown file and expands every tag in it — turning a page full of references into fully inlined spec prose.

$c4s resolve pages/orders.md

By default resolve emits the resolved markdown (--format inline). Pass --format json to get a structured object with the content plus a list of what was resolved.

resolve is the one command whose --format defaults to inline rather than the global json default — because its job is to produce a readable, fully-expanded document.