clap-rs /clap
A full featured, fast Command Line Argument Parser for Rust
★ 16,881⑂ 1,326👁 66⑃ 3,095● 2,253▤ 326
+1
Daily
16,881
stars
1,326
forks
66
watchers
3,095
prs
2,253
issues
326
releases
README
clap Command Line Argument Parser for Rust Dual-licensed under Apache 2.0 or MIT. Get Started console $ cargo add clap About Create your command-line parser, with all of the bells and whistles, declaratively or procedurally. For more details, see: - docs.rs - examples Sponsors Gold Silver Bronze Backer
Top issues
#2222Support command chaining51 comments · 2020-11-24#815Add support for automatic negation flags41 comments · 2017-01-14#748Allow adding "external argv"s to be parsed alongside/before command line41 comments · 2016-11-13#380Support or document localization of messages and flags41 comments · 2016-01-12#1553Multiple subcommand categories / `help_heading`s36 comments · 2019-09-27#3166Stablize Rust-Native Completion Engine Tracking Issue33 comments · 2021-12-13#1404Partially parse args, capturing unknown args into a vec, rather than error32 comments · 2019-01-23#5840Dynamic completion for Nushell28 comments · 2024-12-11
Discussions
#6546Why doesn't ValueValidation error formatting walk the error's source chain?2 comments · 2026-10-05#6543how can i group subcommands?2 comments · 2026-10-03#6515Non-positional mutually exclusive flags in presence of subcommands.1 comments · 2026-09-03#6491Machine-readable output schemas for Clap CLIs1 comments · 2026-08-17#6478conflicts_if_eq_any/conflicts_if_eq_all1 comments · 2026-08-11#6475Don't require flags if both options are provided1 comments · 2026-08-10#6474Is it possible to statically check a value_parser type against an argument value type?3 comments · 2026-08-09#6452Arg that is either an ValueEnum variant or another type (like PathBuf)2 comments · 2026-07-24
Latest release
v4.6.7 v4.6.7 2026-09-14[4.6.7] - 2026-09-14 Features - (derive) Add [command(defer = )] attribute to opt-in to lazy initialisation of subcommands