Summary
weaveffi --help, weaveffi <sub> --help, and the man pages from weaveffi man (#40) all derive their descriptions from Rust doc comments on the clap definition in crates/weaveffi-cli/src/main.rs. The argument fields already have them, but none of the 14 Commands variants do, and neither do the global --quiet and --verbose flags. As a result, weaveffi --help lists subcommands without saying what they do, and weaveffi.1 has empty OPTIONS entries and a SUBCOMMANDS list with no descriptions.
Proposed change
- Add a one-line
/// comment to every Commands variant (New, Generate, Validate, Package, Extract, Lint, Diff, Doctor, Completions, Man, SchemaVersion, Watch, Format, Schema). Clap uses the first line as the subcommand's about, so keep it short and in the imperative ("Generate bindings for one or more targets"). The README's CLI reference table is a good source for wording.
- Add
/// comments to the quiet and verbose fields on Cli, and to the name field on New.
- While you're in the man-page area, tidy the "Generating Man Pages" section in
docs/src/getting-started.md: retitle it to sentence case (## Generating man pages) to match the rest of the file, drop the mkdir -p ./man line (the command creates the directory itself), and change the README table wording from "to the specified directory" to "into the specified directory".
Only the help text changes. No flags, defaults, or behavior should change, and the completions_* and man_generation tests should pass unchanged.
Acceptance criteria
Pointers
- Clap definition:
crates/weaveffi-cli/src/main.rs (struct Cli, enum Commands)
- Existing per-argument doc comments in the same enum show the style to follow
- Wording source: the CLI reference table in
README.md
- Docs section:
docs/src/getting-started.md, "Generating Man Pages"
Suggested commit message
feat: add help text to CLI subcommands and global flags
Summary
weaveffi --help,weaveffi <sub> --help, and the man pages fromweaveffi man(#40) all derive their descriptions from Rust doc comments on the clap definition incrates/weaveffi-cli/src/main.rs. The argument fields already have them, but none of the 14Commandsvariants do, and neither do the global--quietand--verboseflags. As a result,weaveffi --helplists subcommands without saying what they do, andweaveffi.1has empty OPTIONS entries and a SUBCOMMANDS list with no descriptions.Proposed change
///comment to everyCommandsvariant (New,Generate,Validate,Package,Extract,Lint,Diff,Doctor,Completions,Man,SchemaVersion,Watch,Format,Schema). Clap uses the first line as the subcommand'sabout, so keep it short and in the imperative ("Generate bindings for one or more targets"). The README's CLI reference table is a good source for wording.///comments to thequietandverbosefields onCli, and to thenamefield onNew.docs/src/getting-started.md: retitle it to sentence case (## Generating man pages) to match the rest of the file, drop themkdir -p ./manline (the command creates the directory itself), and change the README table wording from "to the specified directory" to "into the specified directory".Only the help text changes. No flags, defaults, or behavior should change, and the
completions_*andman_generationtests should pass unchanged.Acceptance criteria
weaveffi --helpshows a description next to every subcommand and next to--quietand--verboseweaveffi man --out ./man && man ./man/weaveffi.1shows the descriptions in OPTIONS and SUBCOMMANDS, andman ./man/weaveffi-generate.1has a non-empty DESCRIPTIONcargo fmt --check,cargo clippy --all-targets -- -D warnings, andcargo test -p weaveffi-clipassPointers
crates/weaveffi-cli/src/main.rs(struct Cli,enum Commands)README.mddocs/src/getting-started.md, "Generating Man Pages"Suggested commit message