go-arg
go-arg: A free Go package for typed, struct-driven CLIs with subcommands and environment bindings. Ranked #46 of 60 in Command-Line Interface Frameworks by our editors (4.6/10); pricing: Free plan; best for go CLIs driven by struct declarations.
At a glance
- Editor score4.6 / 10
- PricingFree plan
- Best forGo CLIs driven by struct declarations
- Free planYes
- Paid fromFree
- Facts checked17 Nov 2026
Where it wins
- Struct fields and tags define typed options, positionals, defaults, and required values.
- Environment bindings support configurable names and prefixes with precedence rules.
- Nested subcommands generate usage and help, including built-in help and version handling.
Where it doesn't
- Focused on Go programs rather than command-line frameworks for multiple languages.
- Shell completion and config-file workflows are outside its documented scope.
- Support is centered on documentation rather than additional listed channels.
Our verdict on go-arg
go-arg is an open-source Go module for developers building command-line programs and utilities. It maps command-line input into typed Go values through struct declarations and tags, covering options, positional arguments, required values, defaults, environment-variable bindings, and subcommands. The package suits solo, small, and mid-market developers who want a Go-native way to organize a CLI without defining a separate argument schema.
The published offering is straightforward: go-arg is open source with a free plan, and no paid tiers are described. Its main value is the breadth of parsing behavior available within that free package. Developers can configure environment-variable names and prefixes, set command-line versus environment precedence, and model command trees with command-specific options. Nested subcommands, generated usage, custom help, and built-in --help and --version error handling extend the same struct-based approach across larger command surfaces.
Platform fit is deliberately narrow and clear. Because declarations, parsing, and typed values are expressed for Go, go-arg is a natural match for Go repositories and less suitable when one CLI must share a framework across several implementation languages. The documentation channel is the listed support path, so teams should expect a documentation-led workflow. Choose go-arg when a free Go module with struct-driven parsing, environment bindings, defaults, and nested commands matches the project. Consider an alternative when shell completion or config-file handling is central to the CLI requirements.
Your product? Our editors can test go-arg in depth and publish a review, labelled as paid · from $149/mo →
go-arg pricing
go-arg 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 | Yes |
| Typed API | Yes |
| Support | Docs |
| Built for | Solo, Small business, Mid-market (editorial estimate) |
| Pricing | Free plan |
| Website | github.com |
| Facts checked | 17 Nov 2026 |
Alternatives to go-arg
- 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 go-arg? 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 go-arg 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
go-arg 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/go-arg/"><img src="https://www.itechguides.com/best/badge/go-arg.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