Skip to content

majordomus generate

Write the committed projections of the registry (docs/generated), or check that they are current

majordomus generate

Usage

majordomus generate [OPTIONS] [TARGET]

Arguments

argumentvaluedefaultdescription
--repo <PATH> Start the search for the repository root here (default: the current directory) (accepted by every subcommand)
--discovery vcs | filesystem vcs How declarative files are enumerated (accepted by every subcommand)
  • vcs — Tracked files, through the version-control index (the layer's contract)
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--strict flag Refuse to proceed when any file of the layer carries an error diagnostic (accepted by every subcommand)
--share <DIR> The tool distribution's share directory (kinds.yaml, schemas/); default: $MAJORDOMUS_SHARE, then the repository's own share/, then the one beside the executable (accepted by every subcommand)
<TARGET> all | openapi | docs | benchmarks | registry | allow | providers | site | manifest | distribution | web | changelog | deployment | graph | design all What to generate
  • all — Every target
  • openapi — `docs/generated/openapi.{json,yaml}`
  • docs — `docs/generated/capabilities.md`, `docs/generated/modules/<id>.md` and `docs/generated/cli.{md,json,yaml}`
  • benchmarks — `docs/generated/benchmarks.{md,json,yaml}`: every benchmark target and the coverage
  • registry — `docs/generated/registry.{json,yaml}`: the builtin registry as data
  • allow — The shell tool's allow-lists under share/allow, derived from the schemas
  • providers — The provider bootstraps the policy declares (AGENTS.md, CLAUDE.md, ...)
  • site — site/data/registry/registry.json, the registry dataset the site renders
  • manifest — docs/generated/artifacts.{json,yaml,md}: the index of every generated artifact
  • distribution — The installer, the installation guide, the release build matrix and the public release metadata, from share/distribution.yaml and .ai/repo/releases/
  • web — `docs/generated/web.json`: the resolved web topology the site's route reference renders
  • changelog — `docs/generated/changelog.{json,yaml,md}`: the changelog composed from the layer's release records, its decisions and the repository's commits
  • deployment — deploy/Dockerfile, .dockerignore and fly.toml, from the deployment objects
  • graph — docs/generated/graph.json and its schema: the composed graph as data
  • design — The design system's projections, from share/design/tokens.yaml: the stylesheets both Tailwind builds import, the tokens and the declaration compiled into the crate, every copy of the brand, site/data/registry/design.json and docs/generated/design.*
--check flag Compare with what is on disk and exit 10 when stale; write nothing
--out <DIR> Write under this directory instead of the repository root (docs/generated is appended)

Examples

  • Write every committed projection

    The OpenAPI document, the capability reference, the command-line reference and its JSON, the registry manifest, the benchmark matrix, the shell tool's allow-lists, the provider bootstraps and the site's registry dataset — all from the one registry and the one clap declaration.

    $ majordomus generate

    Verified by the example tests: exits 0.

  • Refuse a tree whose projections are stale

    Writes nothing and compares instead: exit 0 when every committed projection is what the sources produce, exit 10 with each stale file named. This is the form CI runs.

    $ majordomus generate
    $ majordomus generate --check

    Verified by the example tests: exits 0.

  • One target only

    Each target can be written on its own while a change is iterated on; `majordomus generate` with no target writes all of them.

    $ majordomus generate openapi

    Verified by the example tests: exits 0.

Where this comes from

Declared once in apps/majordomus-cli/src/cli.rs: clap for the structure, typed Rust metadata beside it for the examples. This page, majordomus generate --help, docs/generated/cli.md and docs/generated/cli.json are projections of that one declaration.

The whole command line on one page: the registry's command-line page. The task lifecycle (init, start, finish, doctor, ...) belongs to the shell tool, a different program: Commands and its specification.