Summary
The CLI excerpt subcommand uses --start / --end, but the equivalent MCP tool uses startLine / endLine. Users migrating between the two surfaces naturally try --start-line / --end-line first. The CLI rejects that with:
Error: --start-line is not supported for excerpt.
Hint: remove `--start-line` and rerun, or use only the options shown in `excerpt --help`.
The hint says "remove --start-line and rerun" but does not suggest the correct flag name (--start). For agents/users seeing this for the first time it is a needless friction point.
Reproduction
cdidx excerpt src/CodeIndex/Program.cs --start-line 5 --end-line 10
Impact
- Agents that follow the MCP shape verbatim trip on this.
- The error message is correct but not actionable.
Proposed direction
Pick one:
- Accept
--start-line / --end-line as aliases (cheap, no behaviour change).
- Or — improve the error to "Did you mean
--start?" by mapping each known-unsupported flag to its closest valid synonym (small static map maintained alongside the parser).
The same principle applies anywhere else the CLI rejects an unknown flag with a generic message.
Repro env
- Branch:
main @ 2ee912d (release v1.21.0)
Summary
The CLI
excerptsubcommand uses--start/--end, but the equivalent MCP tool usesstartLine/endLine. Users migrating between the two surfaces naturally try--start-line/--end-linefirst. The CLI rejects that with:The hint says "remove --start-line and rerun" but does not suggest the correct flag name (
--start). For agents/users seeing this for the first time it is a needless friction point.Reproduction
Impact
Proposed direction
Pick one:
--start-line/--end-lineas aliases (cheap, no behaviour change).--start?" by mapping each known-unsupported flag to its closest valid synonym (small static map maintained alongside the parser).The same principle applies anywhere else the CLI rejects an unknown flag with a generic message.
Repro env
main@ 2ee912d (release v1.21.0)