Quick start
document:docs/quick-startOne command from a repository with contracts/ and docs/ to a site.
Put event contracts in contracts/ (JSON Schema, OpenAPI, Avro or protobuf) and
markdown in docs/. Then, from the repository root:
npx autocatalog site . --devThat is the whole setup. You installed nothing and wrote no config, and the site
serves with live reload without touching your repository. One JSON Schema and one
page gave us 24 pages in 13 seconds, after npx spent under two minutes on its
first download.
Drop --dev to build it instead: it goes to dist/, which is build output, so
add dist/ to .gitignore rather than committing it.
Each event gets a page with its schema, examples, and the services that produce
and consume it. Those services get pages too, and /fields indexes every field
across every event. You never write a service definition: the pages come from
each event’s producers and consumers. A document whose frontmatter says
about: [event/orders/order.placed] is listed on that event’s page.
If an event is missing, see what each format needs: JSON Schema, OpenAPI, or Avro / protobuf.
Contracts somewhere else: commit a catalog
Section titled “Contracts somewhere else: commit a catalog”ac site scans only contracts/, and never runs your code. If your contracts
live elsewhere in the repository, or are Zod models, scan them and commit the
result:
npx autocatalog . # JSON Schema, OpenAPI, Avro, protobuf anywherenpx autocatalog . --allow-code-execution # also Zod; this runs your codegit add events && git commit -m "catalog"The scan writes events/ (one folder per event, plus events/llms.txt) and
says so. Commit it: once events/ exists, ac site, the company site and the
MCP server read it in place of scanning contracts/. If you do not commit it,
delete it, or it goes stale and the site keeps showing the old scan. Re-run the
scan whenever a contract changes; the folder is generated, so nobody edits it by
hand. Pydantic models are extracted into events/ by autocatalog-py instead:
see Zod and Pydantic.
Check every pull request
Section titled “Check every pull request”Add this file and a pull request that breaks a consumer fails, naming the consumers it breaks:
name: catalogon: pull_requestjobs: check: runs-on: ubuntu-latest steps: - uses: jagreehal/autocatalog/actions/check@v1It reads the base branch itself, so you commit no catalog. On another CI, run
npx autocatalog check --base-ref origin/main. See
drift gating in CI.
Then the company site
Section titled “Then the company site”To build one site across every repository your company enrols, with your logo and colours, see the company site. Other paths in:
autocatalog reads contract files: JSON Schema, OpenAPI, Avro, protobuf. It reads code directly only through a plugin, and the Zod plugin is the one it ships. Every other language joins by writing its schemas to files you commit.
| Your contracts live in | Read |
|---|---|
| TypeScript, with Zod | Zod, read from your code by a plugin |
| Python, with Pydantic | Pydantic: autocatalog-py writes events/, you commit it |
| Rust, Go, Java or .NET | Rust, Go, Java, .NET: a test writes the schemas |
.json schema files in a repo | JSON Schema |
| OpenAPI, Avro, or protobuf in a repo | OpenAPI · Avro / protobuf |
| Another repo, AsyncAPI, or EventCatalog | Importing |