majordomus serve ensure
Make sure a ready server serves this checkout: start one when there is none or the lease is stale, wait for one that is starting, and report where it stands
majordomus serve ensure
Usage
majordomus serve ensure [OPTIONS]Arguments
| argument | value | default | description |
|---|---|---|---|
| --port | <PORT> | 8741 | The port the started server asks for first; a taken one is replaced by a free one |
| --idle | <SECONDS> | 900 | The started server stops when no peer has been attached for this many seconds |
| --wait | <SECONDS> | 20 | How long to wait for a server to become ready before reporting what stands |
| --format | text | json | text | Output shape
|
| --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) |
Examples
-
Make sure a server serves this checkout, and let it end when idle
Starts a server as a process of its own when none answers, waits until it is ready, and prints one line: the standing, the address, the pid. Run again, it finds the server ready and starts nothing. `--idle` is how long the started server outlives its last peer; one second here, so that the example leaves nothing behind.
$ majordomus serve ensure --idle 1 --wait 30Verified by the example tests: exits 0; prints ready.
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 serve ensure --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.