Command-line tool
gnu-getopt
brew/gnu-getopt
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Command-line option parsing utility
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
cargo install getopt
macOS
brew install gnu-getopt cargo install getopt
Linux
brew install gnu-getopt cargo install getopt
Parse optional `verbose`/`version` flags with shorthands
getopt -o vV -l verbose,version -- --version --verbose
Add a `--file` option with a required argument with shorthand `-f`
getopt -o f: -l file: -- --file=somefile
Add a `--verbose` option with an optional argument with shorthand `-v`, and pass a non-option parameter `arg`
getopt -o v:: -l verbose:: -- --verbose arg
Related command-line tools
- gengetopt
Generate C code to parse command-line arguments via getopt_long - util-linux-ng
Native Win32 open source ports of some linux utilities. - spacer
Small command-line utility for adding spacers to command output - istioctl
Istio configuration command-line utility - linkerd
Command-line utility to interact with linkerd - pk
Field extractor command-line utility - gistit
Command-line utility for creating Gists - aggligator-util
Aggligator command line utilities
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents