CHAPTER 01 / 05
Arguments, options, and flags
Build a command-line parser with typed arguments, flags, defaults, validation, and help.
Arguments, subcommands, validation, output handling, shell completions, and tests for Rust command-line tools.
5 chapters · 27 topics
Build a command-line parser with typed arguments, flags, defaults, validation, and help.
Organize subcommands, shared options, argument relationships, environment settings, and paths.
Separate standard output from diagnostics and return useful parse errors and exit codes.
Customize command builders, parse advanced input shapes, and integrate JSON, errors, and verbosity.
Generate completions and manual pages, test command-line behavior, and build a complete file-search tool.