Repository navigation
docs(cli): document mcp serve, eval code, install --silent, and gaia slack - #4327
Conversation
…slack The CLI reference was missing sections for gaia mcp serve, gaia eval code, and the --claude-model / --no-lemonade-check global flags and install --silent, and CLAUDE.md's CLI list omitted gaia slack entirely — none of these were stale text, they just never got a doc pass when the parser grew. Documented all four in docs/reference/cli.mdx (with a caveat on gaia report, which is registered but not dispatched per amd#3488), added gaia slack to CLAUDE.md, and added a CLI-to-docs drift test that walks every leaf `gaia <subcommand>` from build_parser() and checks its full path is written into cli.mdx (matching how the page already documents nested commands), so new commands can't ship without a doc section again. Twelve pre-existing gaps found by the same walk (mostly gaia connectors subcommands) are allowlisted as tracked debt rather than fixed here, to keep this PR reviewable. Overlaps open PR amd#3812, which only renames `gaia tui` -> `gaia-tui` and fixes `lemonade-server serve` examples in cli.mdx — it doesn't touch any of the sections added here. Also overlaps open issue amd#1085, which filed the same "CLI drift needs a test" finding in May. Fixes amd#4250
Verdict: Approve with suggestionsThis documents four CLI surfaces that existed in the parser but nowhere in the reference, and adds a test that fails CI when a new subcommand ships undocumented. I checked every added flag, default and option name against the real parser — they all match, including the honest warning that One thing worth fixing before merge: the two new rows in the Global Options table sit under a claim that every command accepts them, and that isn't true — they come from the shared parent parser, which only about two-thirds of the top-level commands pull in. A user who types one of them after The drift test's design is the strongest part of this change — allowlisting the pre-existing gaps as tracked debt, plus a second test that fails if an allowlisted entry quietly gets documented, is what keeps the allowlist from turning into a graveyard. Real-world evidenceN/A — docs- and tests-only change; no 🔍 Technical detailsIssues🟡 Both live on 🟢 It sits in the 🟢 Drop the value placeholder ( The 🟢 The drift check is a plain substring match (
Notes, no action needed
Strengths
|
--logging-level, --claude-model and --no-lemonade-check come from the shared parent_parser, which 12 of the 32 top-level subcommands don't pull in, so 'All commands support these' sent users into 'unrecognized arguments'. Name the exceptions, document the nested-subcommand ordering, and pin the list with a test that reads the parser.
|
Confirmed the "All commands support these global options" claim was wrong, and fixed it — though the review's suggested replacement was itself slightly off, so I re-derived the facts from the parser. The section now names the 12 commands that reject the flags, documents the nested-subcommand ordering, and is pinned by a new test that reads
🔍 Technical detailsEnumerated by walking the real parser rather than reading
The review's list had 10 — it missed Two corrections to the suggested replacement:
Not addressed (🟢, structural rather than factual): the missing |
gaia mcp serve,gaia eval code, the--claude-model/--no-lemonade-checkglobal flags, andgaia install --silentall exist in the parser with no mention in the CLI reference, and CLAUDE.md's CLI command list omitsgaia slackentirely — every flag the reference does document is real, so this was a coverage gap, not stale text.Documented all of them in
docs/reference/cli.mdx(with a caveat ongaia report, which is registered but not dispatched per #3488), addedgaia slackto CLAUDE.md, and added a CLI-to-docs drift test that walks every leafgaia <subcommand>frombuild_parser()and checks it's written intocli.mdxin full-path form (gaia mcp start, not barestart) — the same form the page already uses, so it stays low-noise. Twelve pre-existing gaps the same walk found (mostlygaia connectorssubcommands) are allowlisted as tracked debt rather than fixed here, to keep this PR reviewable; the allowlist test fails if one gets documented without being removed from it, or if the allowlist grows.Overlaps open PR #3812, which only renames
gaia tui→gaia-tuiand fixeslemonade-server serveexamples on this page — it doesn't touch any section added here. Also overlaps open issue #1085, which filed the same "CLI drift needs a test" finding in May.Test plan
pytest tests/unit/cli/test_cli_docs_drift.py -q— 2 passed (confirmed each assertion fails independently: an undocumented command trips one, a stale allowlist entry trips the other)black --check/isort --check-onlyon the new test filepython util/check_doc_links.py --internal-only— 1013/1013 OKsrc/gaia/cli.py'sbuild_parser()Fixes #4250