lexopt
lexopt: A free, dependency-free Rust parser for applications that want direct option handling. Ranked #55 of 60 in Command-Line Interface Frameworks by our editors (3.7/10); pricing: Free plan; best for dependency-free Rust option parsing.
At a glance
- Editor score3.7 / 10
- PricingFree plan
- Best forDependency-free Rust option parsing
- Free planYes
- Paid fromFree
- Shell completionNo
- Founded2021
- Facts checked17 Nov 2026
Where it wins
- Parses short, long, combined, optional, and multiple options
- Preserves non-Unicode arguments as OsString values
- Uses an imperative stream-based API with no dependencies or macros
Where it doesn't
- No nested subcommands or declarative command framework
- No shell completion, configuration files, or environment binding
- Provides docs support only, without generated help features
Our verdict on lexopt
lexopt is an open-source Rust library for parsing command-line arguments into a stream that application code interprets. It is aimed at developers who want direct control over option handling without dependencies or macros. The parser preserves non-Unicode input as OsString values and supports standard short and long options, making it suitable for command-line tools across solo, small, mid-market, and enterprise development teams.
The published offering is free, with no paid tiers to evaluate. Its parsing primitives cover the conventions many command-line programs need: an explicit -- end-of-options marker, equals-separated and space-separated values, combined and unseparated short options, plus optional and multiple option arguments. This breadth within option parsing lets application code decide how values and behavior should be interpreted, while the imperative stream model keeps the library focused rather than generating application structure.
lexopt is a strong fit when a Rust project needs a small parser and intends to own help text, validation, command dispatch, and configuration behavior. Its intentionally narrow scope becomes a limitation for teams seeking a complete command-line framework: it does not provide nested subcommands, shell completion, code generation, configuration-file support, environment-variable binding, or a declarative command model. Documentation is the listed support channel. Choose lexopt for dependency-free parsing primitives; choose a broader framework when generated interfaces and surrounding command infrastructure are central requirements.
Your product? Our editors can test lexopt in depth and publish a review, labelled as paid · from $149/mo →
lexopt pricing
lexopt fact sheet
| Free plan | Yes |
|---|---|
| Paid from | Free |
| Shell completion | No |
| Nested subcommands | No |
| Code generation | No |
| Config file support | No |
| Environment variables | No |
| Typed API | Yes |
| 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 lexopt
- 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
Used lexopt? 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 lexopt 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
lexopt 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/lexopt/"><img src="https://www.itechguides.com/best/badge/lexopt.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