majordomus serve
Serve the same capabilities over HTTP on the loopback interface, with the home page, /openapi.json, /swagger and the documentation under /docs/ (read-only)
majordomus serve
Usage
majordomus serve [OPTIONS] [COMMAND]Commands
- majordomus serve status Where this checkout's server stands — absent, starting, ready, outdated or stale — and every server of the repository
- 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 stop Stop this checkout's server — the one its lease names, when it answers for this checkout — and wait for the lease to go
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) |
| --host | <HOST> | 127.0.0.1 | Interface to bind; loopback unless you say otherwise |
| --port | <PORT> | 8741 | Port to bind; 0 picks a free one and the address is logged on stderr |
| --fallback | flag | — | When the port is taken, bind a free one instead and log both; without this a taken port is an error |
| --idle | <SECONDS> | 0 | Stop when no peer has been attached for this many seconds; 0 runs until stopped. What a server no client owns is started with |
| --deployment | <ID> | — | Bind the address this deployment object declares (`.ai/repo/deployments/<ID>.yaml`) instead of the local default. What a hosted process is started with; the address is the object's, not this command line's |
Examples
-
Serve the same capabilities over HTTP on a free port
Port 0 asks the operating system for a free port; the address is logged on stderr. `/` is the home page, generated from the surfaces this process resolved; the document at /openapi.json is the same one `majordomus generate` commits; /swagger is the Swagger UI over it; /docs/ is this repository's documentation when it has been built for that mount.
$ majordomus serve --port 0Verified by the example tests: binds a port, answers GET /openapi.json, exits 0 when stopped.
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 --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.