Skip to content

majordomus env banner

Render the snapshot for a terminal. Goes to standard error, never standard output, because direnv reads standard output as the environment it is setting

majordomus env banner

Usage

majordomus env banner [OPTIONS]

Arguments

argumentvaluedefaultdescription
--mode <MODE> How much to show: `auto`, `full`, `compact` or `off`. Without it, MAJORDOMUS_BANNER decides, and without that, `auto` — which is silent when nothing is watching, shows the whole box when the repository has something new to say, and the two-line form when it does not
--width <COLUMNS> Draw as if the terminal were this wide, whatever it is
--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)
  • vcs — Tracked files, through the version-control index (the layer's contract)
  • filesystem — A walk of the work tree with the same glob semantics; untracked files included
--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)
  • text — Lines for a person
  • json — One JSON document, deterministic

Examples

  • The two-line form, at a width you choose

    What `direnv` renders on entering the repository. It resolves fast — it never builds the index — and it writes to standard error, because direnv reads the standard output of a `.envrc` as the environment it is applying. `--width` renders as if the terminal were that wide, which is what makes the layout testable.

    $ majordomus env banner --mode compact --width 80

    Verified 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 env banner --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.