github.com/alexflint/go-arg
v1.6.1
alexflint/go-arg
What this package is like to depend on
Last release 7 months ago
27 Dec 2025
Ships fairly regularly
a new release about every 2 months
Most releases are documented
notes for 10 of 12 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
104 releases · first in 2015
5 releases in the last 12 months
see the full history below
Release timeline
104 releases · Nov 2015 to Dec 2025Releases
latest 60 of 104-
v1.6.2-0.20251227220421-bd684bc5f43f27 Dec 2025 pre-releaseNothing published for this version
-
v1.6.125 Nov 2025Release notes
Open source →Hello friends. I'm pushing a release with a few minor changes so that the latest changes are available within a tagged release. As always, thanks for making use of this library, and for your all comments, questions, issues, pull requests, and discussions. Wishing you all the best for the new year.
What's Changed
- Add Regsiter, which allows go packages to define their own command line args by @alexflint in #291
- Allow hiding a subcommand using "-" for help by @zeroshade in #292
- No more positionals after a positional slice or map by @alexflint in #287
New Contributors
- @zeroshade made their first contribution in #292
Full Changelog: v1.6.0...v1.7.0
-
v1.6.1-0.20251125002245-1f6498e8a31225 Nov 2025 pre-releaseNothing published for this version
-
v1.6.1-0.20251007212541-db3650508cca07 Oct 2025 pre-releaseNothing published for this version
-
v1.6.1-0.20250829114940-b06ef59ce3d729 Aug 2025 pre-releaseNothing published for this version
-
v1.6.1-0.20250828133929-d5d9e3bd761928 Aug 2025 pre-releaseNothing published for this version
-
v1.6.024 May 2025Release notes
Open source →Hey friends, here is the latest go-arg. What fun. I enjoy maintaining this library a lot. Lots of contributions from new contributors since last release -- check out new contributors section below. Very impressive work everyone.
I'm working on completions support for this library. It's going to be a separate library, in a separate repository, that will (if all goes according to plan) be a general-purpose cross-language cross-shell completion-support binary. I'll then add some options in this library to make use of that project, probably mostly in the form of documentation and examples rather than any significant changes to default behavior. If you'd like to give input on any of that, please reach out via email (see email address in my github profile).
As always, sorry for all the open issues and un-merged PRs!
What's Changed
- Use standard exit status code for usage errors by @hhromic in #256
- Fix usage when using custom version flag by @hhromic in #224
- Move program version from usage to help by @hhromic in #259
- Fix help text for positional args with default and env var by @hhromic in #262
- Allow passing the string "--" twice or more by @alexflint in #273
- Add support for setting a global env var prefix by @hhromic in #258
- Make field name output consistent when using placeholders by @zanvd in #276
- Fix Missing Global Options by @Areson in #278
- Improve handling of negative numbers by @alexflint in #285
New Contributors
- @purpleidea made their first contribution in #237
- @testwill made their first contribution in #233
- @zanvd made their first contribution in #276
- @Areson made their first contribution in #278
Full Changelog: v1.6.0...v1.5.2
-
v1.5.2-0.20250524121907-a36ed1e7b3fe24 May 2025 pre-releaseNothing published for this version
-
v1.5.2-0.20250307220854-7155e7e9869507 Mar 2025 pre-releaseNothing published for this version
-
v1.5.2-0.20241211062519-f21878956cd911 Dec 2024 pre-releaseNothing published for this version
-
v1.5.2-0.20241104175837-438bbfff1ede04 Nov 2024 pre-releaseNothing published for this version
-
v1.5.2-0.20240906130031-b218ad854d6806 Sep 2024 pre-releaseNothing published for this version
-
v1.5.2-0.20240905212009-d10a064207fe05 Sep 2024 pre-releaseNothing published for this version
-
v1.5.2-0.20240904143140-50166cae2c8704 Sep 2024 pre-releaseNothing published for this version
-
v1.5.2-0.20240704164029-3de7278c4f0904 Jul 2024 pre-releaseNothing published for this version
-
v1.5.2-0.20240630204212-ec0ced74672e30 Jun 2024 pre-releaseNothing published for this version
-
v1.5.128 Jun 2024Release notes
Open source →- Fixes a bug introduced in v1.5.0 where bad struct tags and other parser-level initialization problems would result in a crash rather than a clean exit in MustParse (thanks @hhromic !)
-
v1.5.002 Apr 2024Release notes
Open source →-
Argument structs can define Description() and Epilogue(), which are added to the usage string
-
Subcommands can have multiple aliases like this:
var args struct { Remove *struct{} `arg:"subcommand:remove|rm|r" help:"remove something from somewhere"` }
-
Improves formatting of usage string when the placeholder tag is set to empty string
-
Do not handle --version when the args struct lacks a Version() function
-
Add StructSubcommands to Config struct
-
-
v1.4.4-0.20240402161606-dfca71d1594a02 Apr 2024 pre-releaseNothing published for this version
-
v1.4.4-0.20231010223646-bf629a16cbe510 Oct 2023 pre-releaseNothing published for this version
-
v1.4.4-0.20230910220506-5ec29ce7553b10 Sep 2023 pre-releaseNothing published for this version
-
v1.4.4-0.20230714195233-660b9045e10d14 Jul 2023 pre-releaseNothing published for this version
-
v1.4.4-0.20230702140710-463902ef7d1202 Jul 2023 pre-releaseNothing published for this version
-
v1.4.4-0.20230208145656-e25b4707a7d608 Feb 2023 pre-releaseNothing published for this version
-
v1.4.4-0.20230127163512-c0a8e20a0ac927 Jan 2023 pre-releaseNothing published for this version
-
v1.4.4-0.20221029192907-727f8533acca29 Oct 2022 pre-releaseNothing published for this version
-
v1.4.4-0.20221029192822-c046f49e125d29 Oct 2022 pre-releaseNothing published for this version
-
v1.4.4-0.20221010154157-dbc2ba5d0c9a10 Oct 2022 pre-releaseNothing published for this version
-
v1.4.4-0.20221002201743-11f9b624a9e502 Oct 2022 pre-releaseNothing published for this version
-
v1.4.4-0.20220927194805-74af96c6ccf427 Sep 2022 pre-releaseNothing published for this version
-
v1.4.4-0.20220611130603-ebd7a68a06be11 Jun 2022 pre-releaseNothing published for this version
-
v1.4.310 Feb 2022Release notes
Open source →- Correctly brackets non-required positional arguments in usage strings
- Fixes help and usage strings for subcommands.
- Add native support for url.URL via go-scalar
- Add environment variables names to error messages when relevant
-
v1.4.3-0.20230208145656-e25b4707a7d608 Feb 2023 pre-releaseNothing published for this version
-
v1.4.3-0.20221029192907-727f8533acca29 Oct 2022 pre-releaseNothing published for this version
-
v1.4.3-0.20221010154157-dbc2ba5d0c9a10 Oct 2022 pre-releaseNothing published for this version
-
v1.4.3-0.20220210020403-f0f44b65d11710 Feb 2022 pre-releaseNothing published for this version
-
v1.4.3-0.20220105150204-d3706100bf0c05 Jan 2022 pre-releaseNothing published for this version
-
v1.4.3-0.20220102141709-a87d80089a7802 Jan 2022 pre-releaseNothing published for this version
-
v1.4.3-0.20211001114419-bf32f082479c01 Oct 2021 pre-releaseNothing published for this version
-
v1.4.3-0.20210918155729-a4afd6a8490918 Sep 2021 pre-releaseNothing published for this version
-
v1.4.3-0.20210821025918-ff38a63b36f621 Aug 2021 pre-releaseNothing published for this version
-
v1.4.225 May 2021Release notes
Open source →This patch release fixes a regression in which unexported embedded structs were mistakenly being ignored.
-
v1.4.121 Apr 2021Release notes
Open source →Minor fix for case where an environment variable containing an empty string is parsed into a slice or map.
-
v1.4.020 Apr 2021 -
v1.3.1-0.20210420022731-6a01a15f754720 Apr 2021 pre-releaseNothing published for this version
-
v1.3.1-0.20210417040314-f4eb7f3a585a17 Apr 2021 pre-releaseNothing published for this version
-
v1.3.1-0.20210407183248-cf2205c84db707 Apr 2021 pre-releaseNothing published for this version
-
v1.3.1-0.20210201034320-bd6844a20d4d01 Feb 2021 pre-releaseNothing published for this version
-
v1.3.1-0.20210201024605-2a23168641ed01 Feb 2021 pre-releaseNothing published for this version
-
v1.3.1-0.20201220005133-438a91dba1e320 Dec 2020 pre-releaseNothing published for this version
-
v1.3.1-0.20200927162824-b91c03d2c6c927 Sep 2020 pre-releaseNothing published for this version
-
v1.3.1-0.20200806235247-96c756c382ed06 Aug 2020 pre-releaseNothing published for this version
-
v1.3.1-0.20200706165915-a68c3d06536206 Jul 2020 pre-releaseNothing published for this version
-
v1.3.1-0.20200603150727-2a3b5ea3cbdf03 Jun 2020 pre-releaseNothing published for this version
-
v1.3.1-0.20200603080520-d4bb56e096c503 Jun 2020 pre-releaseNothing published for this version
-
v1.3.1-0.20200403154513-cfdee944f96c03 Apr 2020 pre-releaseNothing published for this version
-
v1.3.1-0.20200301224725-6f3675fdf12401 Mar 2020 pre-releaseNothing published for this version
-
v1.3.1-0.20200301223259-17bbf2e7ef4401 Mar 2020 pre-releaseNothing published for this version
-
v1.3.1-0.20200223194400-db9f869c997323 Feb 2020 pre-releaseNothing published for this version
-
v1.3.1-0.20200125195334-5df19ebe00e825 Jan 2020 pre-releaseNothing published for this version