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
| argument | value | default | description |
|---|---|---|---|
| --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)
|
| --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
|
| --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 generateVerified 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 --checkVerified 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 openapiVerified 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.