bpaf
bpaf: A free Rust parser framework covering typed arguments, subcommands, environment variables, and docs. Ranked #7 of 60 in Command-Line Interface Frameworks by our editors (8.8/10); pricing: Free plan; best for rust CLIs needing derive and documentation tools.
At a glance
- Editor score8.8 / 10
- PricingFree plan
- Best forRust CLIs needing derive and documentation tools
- Free planYes
- Paid fromFree
- Shell completionYes
- Facts checked17 Nov 2026
Where it wins
- Offers both derive-macro and combinatoric parser APIs
- Generates Markdown, HTML, and manpage documentation
- Supports typed parsing, subcommands, environment variables, and completions
Where it doesn't
- Shell autocomplete requires enabling the autocomplete feature
- Support is provided through documentation channels
- Focused on Rust command-line applications rather than other languages
Our verdict on bpaf
bpaf is an open-source Rust library for building command-line argument parsers. It suits solo developers and teams creating Rust binaries that need typed options, positional arguments, subcommands, environment-variable parsing, generated help, and shell completion. Two API styles are available: derive macros for declarative definitions and combinators for composing reusable parsers. The project is distributed under MIT OR Apache-2.0 licensing, with no paid tier described.
Its feature set reaches beyond basic argument handling. Parsers can cover named and positional values, nested subcommands, validation, fallback values, and custom-argument testing. When the autocomplete feature is enabled, bpaf can provide dynamic completion for bash, zsh, fish, and elvish. Documentation generation is another notable capability, producing Markdown, HTML, and manpage output alongside command-line help. This combination is useful when a CLI needs its parser definitions and user-facing reference material to evolve together.
bpaf fits projects that want Rust-native type safety and a choice between concise derives and explicit parser composition. The published support channel is documentation, so teams looking for dedicated support operations should account for that model. Shell completion also involves an explicit feature enablement step, and the framework remains specific to Rust rather than serving multi-language CLI stacks. Choose bpaf when a Rust command-line application benefits from integrated parsing, completion, testing, and documentation generation; consider another framework when language portability or a different support model is a priority.
Your product? Our editors can test bpaf in depth and publish a review, labelled as paid · from $149/mo →
bpaf pricing
bpaf fact sheet
| Free plan | Yes |
|---|---|
| Paid from | Free |
| Shell completion | Yes |
| Nested subcommands | Yes |
| Code generation | Yes |
| Config file support | Not verified |
| Environment variables | Yes |
| Typed API | Yes |
| Support | Docs |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Pricing | Free plan |
| Website | docs.rs |
| Facts checked | 17 Nov 2026 |
Alternatives to bpaf
- ClapA free Rust crate with typed parsing, nested commands, validation, and completions.9.4
- ClickA free, open-source toolkit for typed, nested Python command-line applications.9.3
- TyperFree, open-source typed CLI framework with nesting, completions, and configuration support.9.2
bpaf vs the competition
- bpaf vs Clap
- bpaf vs Click
- bpaf vs Typer
- bpaf vs Symfony Console
- bpaf vs System.CommandLine
- bpaf vs optparse-applicative
Compare bpaf with any tool side by side →
Used bpaf? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used bpaf for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
bpaf is listed in our Command-Line Interface Frameworks directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/bpaf/"><img src="https://www.itechguides.com/best/badge/bpaf.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Nov 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update