Skip to content

Global flags

1. Why they are listed once

Flags every command accepts. Listed once so the manifest cannot drift from behavior.

There is no global --json flag: the typed JSON envelope is the only output every command has, so a flag for it would be parsed, advertised, and read by nothing. Logs go to stderr. The one command with a second output shape is help, which renders Markdown on a terminal, and --json is declared on THAT command alone (memhtml help <command> --json, or memhtml <command> --help --json) so the flag is advertised exactly where it changes something.

2. The flags

Flag Type Default Description
--dense flag false Minify JSON and drop null fields, for pasting into a context window.
--repo string no default Path to the memory repo. Defaults to $MEMHTML_ROOT.
--help flag false Describe this command instead of running it: usage, arguments, flags, response type, examples. Also -h. Markdown when stdout is a terminal, a cli.help envelope when piped or with --json. Flags other than --json and --dense are ignored, nothing is opened or written, exit 0.

3. Where they apply

All 47 commands accept every flag above. A command’s own page lists the flags particular to it, and leaves these out.

4. Provenance

A loader generates this page from apps/cli/src/commands.ts while the site builds, so no file in the repository holds it: GLOBAL_FLAGS is folded into every command’s parse and into memhtml manifest. Change the registry and this page changes with it.