majordomus pack build
Write the pack (index, shards, pack.json) and verify what was written; exit 10 when the plan or the written pack has a finding, and nothing is built from a plan with one
majordomus pack build
Usage
majordomus pack build [OPTIONS] [PROFILE]Arguments
| argument | value | default | description |
|---|---|---|---|
| <PROFILE> | <PROFILE> | — | A profile of share/archive.yaml (default: its `default`) |
| --out | <DIR> | — | Write here instead of `tmp/packs/<repo>-<profile>-<commit>` |
| --force | flag | — | Replace a pack already at the destination (never a directory that is not a pack) |
| --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) |
| --format | text | json | text | Output shape (accepted by every subcommand)
|
Examples
-
Write the ChatGPT pack and read it back
Plans with the profile, writes `00-INDEX.md`, the shards and `pack.json` under `tmp/packs/` only when the plan passes, then verifies what it wrote: every digest, no stray file, no binary, artifact, link or worktree, every file within the token budget. It prints the plan and the verdict; the files to upload are the index and the shards.
$ majordomus pack build chatgptWhat it asserts: exits 0; prints pack verify: clean.
Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.
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 pack build --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.