Summary
The parser in QueryCommandRunner accepts both --limit and --top as synonyms for the result-cap flag. However, the per-command usage lines printed by ConsoleUi only show --limit. AI agents and shell-completion authors that scrape per-command help will miss --top entirely.
Evidence
- Parser:
src/CodeIndex/Cli/QueryCommandRunner.cs:2756-2767 recognises both --limit and --top.
- Reference flag block:
src/CodeIndex/Cli/ConsoleUi.cs:387 documents --limit <n>, --top <n>.
- Per-command usage lines:
src/CodeIndex/Cli/ConsoleUi.cs:19-36 show only --limit for the 16+ subcommands that accept the flag.
Impact
- AI / completion: agents parsing each command's
--help won't surface --top.
- Inconsistency:
cdidx search --top 5 text works, but cdidx search --help doesn't mention it.
Proposed direction
Pick one:
- Drop
--top (mark deprecated, keep parser support for a release, then remove). Simplest.
- Or document
--top consistently in every usage line + shell completion script.
Either way, align on a single canonical name.
Repro env
- Branch:
main @ 2ee912d (release v1.21.0)
Summary
The parser in
QueryCommandRunneraccepts both--limitand--topas synonyms for the result-cap flag. However, the per-command usage lines printed byConsoleUionly show--limit. AI agents and shell-completion authors that scrape per-command help will miss--topentirely.Evidence
src/CodeIndex/Cli/QueryCommandRunner.cs:2756-2767recognises both--limitand--top.src/CodeIndex/Cli/ConsoleUi.cs:387documents--limit <n>, --top <n>.src/CodeIndex/Cli/ConsoleUi.cs:19-36show only--limitfor the 16+ subcommands that accept the flag.Impact
--helpwon't surface--top.cdidx search --top 5 textworks, butcdidx search --helpdoesn't mention it.Proposed direction
Pick one:
--top(mark deprecated, keep parser support for a release, then remove). Simplest.--topconsistently in every usage line + shell completion script.Either way, align on a single canonical name.
Repro env
main@ 2ee912d (release v1.21.0)