1.3 KiB
1.3 KiB
096 — Add single-character short flags to clap CLI args
Summary
None of the CLI's clap-defined flags have a short form — every
option is long-only, including ones that are typed often
(--file, --metrics-url).
Where
src/cli/mod.rs:20-39— top-levelArgsstruct, all fields#[arg(long, ...)]with noshort:port: u16—:25-26,default_value_t = 0settings_path: Option<PathBuf>—:28-29file: Option<PathBuf>—:31-32metrics_url: Option<String>—:34-35name: Option<String>—:37-38
src/cli/mod.rs:41-50—Command::Mcpsubcommand, also long-only:session: Option<String>—:44-45port: Option<u16>—:46-47
Scope
- Add
shortto each flag where the initial letter is unambiguous within its ownArgs/subcommand struct:-p(port),-f(file),-m(metrics-url),-n(name),-s(settings-path or session, whichever reads more naturally per subcommand — they're in separate structs so both can use-swithout conflict). Mcp'sportcan reuse-psince it's a distinct struct from the top-levelArgs.- Verify with
cargo run -- --help(and themcpsubcommand's--help) that clap doesn't reject any of these for collision, and updateREADME.md's CLI usage section if it documents flags explicitly.