majordomus web report cockpit-snapshot
The Cockpit itself, read once at this commit and written as static pages a publication carries at /cockpit (ADR 0147)
majordomus web report cockpit-snapshot
Usage
majordomus web report cockpit-snapshot [OPTIONS]Arguments
| argument | value | default | description |
|---|---|---|---|
| --limit | <LIMIT> | 240 | The most pages to write: every static route first, then the pages the UI's snapshot links to, then what those link to |
| --budget-seconds | <BUDGET_SECONDS> | 180 | The most seconds to spend on the pages the static routes link to; the routes themselves are written whatever they cost |
| --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)
|
| --only | <ONLY> | — | Only these surfaces, by discovered id (repeat or separate with commas) (accepted by every subcommand) |
| --exclude | <EXCLUDE> | — | Every surface except these, by discovered id (accepted by every subcommand) |
Examples
-
Read the Cockpit once and write it as the pages a publication carries at /cockpit
Asks the Cockpit in-process for every static route except the one page about this machine, then for the pages the UI's snapshot links to, then, one page per family in turn until `--limit` pages or `--budget-seconds` are reached, for the pages those link to, and writes each as a file under target/web/cockpit-snapshot. Links between them are relative; a link into the UI leads to the UI's snapshot when that holds the page; a form, a query or a page past the bound leads to the snapshot's page about the live Cockpit; no page carries a script, because the Cockpit's scripts talk to a process; and every page is stamped with the commit, the time and the executable that read it.
$ majordomus web report cockpit-snapshot --limit 12What it asserts: exits 0; prints web report, cockpit-snapshot.
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 web report cockpit-snapshot --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.