argparse
argparse: Compact, typed C++17 parsing with subcommands and build integration. Ranked #37 of 60 in Command-Line Interface Frameworks by our editors (5.6/10); pricing: Free plan; best for C++ projects needing a compact parser.
At a glance
- Editor score5.6 / 10
- PricingFree plan
- Best forC++ projects needing a compact parser
- Free planYes
- Paid fromFree
- Facts checked17 Nov 2026
Where it wins
- Typed values, defaults, flags and repeated arguments
- Hierarchical subcommands and mutually exclusive groups
- Single-header package with CMake and Bazel integration
Where it doesn't
- No verified shell-completion, configuration-file, or environment-variable support
- C++17 is required
- Support is provided through documentation
Our verdict on argparse
argparse is an open-source, header-only C++17 library for parsing command-line arguments. It targets applications that need positional and optional arguments, typed conversion for numeric and other value types, defaults, flags, repeated arguments, and built-in help or version handling. Hierarchical subcommands, mutually exclusive groups, and remaining-argument collection extend it beyond a minimal option parser. Its documented platform scope covers Linux, macOS, and Windows-oriented environments, with GCC, Clang, and MSVC toolchains.
The project is distributed as MIT-licensed open-source software, so there are no paid tiers to compare. A single-header distribution keeps the library packaging compact, while documented CMake and Bazel integrations provide established build paths. Those characteristics suit solo developers through enterprise teams that want to include a parser directly in a C++ codebase rather than adopt a separately deployed command-line service. The API concentrates on defining arguments and converting their values, with subparsers supporting multi-level command structures.
argparse’s scope is intentionally centered on command-line argument parsing. Its documented positioning does not verify shell-completion generation, configuration-file handling, or environment-variable support, so projects that require those surfaces should evaluate alternatives with broader configuration ecosystems. The library is also tied to C++17, which makes language-standard compatibility an explicit prerequisite. Choose argparse when a focused parser, typed values, nested subcommands, and build-system integration match the application’s needs; look elsewhere when completion tooling or external configuration mechanisms are core requirements.
Your product? Our editors can test argparse in depth and publish a review, labelled as paid · from $149/mo →
argparse pricing
argparse fact sheet
| Free plan | Yes |
|---|---|
| Paid from | Free |
| Shell completion | Not verified |
| Nested subcommands | Yes |
| Code generation | Not verified |
| Config file support | Not verified |
| Environment variables | Not verified |
| Typed API | Yes |
| Deployment | Desktop |
| Platforms | Windows, macOS, Linux |
| Support | Docs |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Pricing | Free plan |
| Website | github.com |
| Facts checked | 17 Nov 2026 |
Alternatives to argparse
- 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
See all argparse alternatives →
Used argparse? 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 argparse 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
argparse 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/argparse/"><img src="https://www.itechguides.com/best/badge/argparse.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