>_

getoptions

agent-ready non-interactive

An elegant option/argument parser for shell scripts (full support for bash and all POSIX shells)

How to install getoptions

brew install getoptions

getoptions use case

Parse command-line options and arguments in shell scripts with full POSIX compatibility and advanced features like long options, subcommands, and automatic help generation.

When to use getoptions

  • When writing shell scripts that need robust, cross-shell compatible option parsing
  • When you need long options (--help) in POSIX sh or dash where getopts only supports short options
  • When generating user-friendly CLI interfaces with auto-generated help and validation for shell scripts

When not to use getoptions

  • When the script is extremely simple with only one or two flags and no need for cross-shell portability
  • When using a higher-level language like Python or Ruby that has its own argument parsing libraries

getoptions features

  • · Works in all POSIX shells including bash, dash, ksh, zsh, and BusyBox
  • · Supports long options, subcommands, and automatic help generation
  • · Lightweight and self-contained (single file, no dependencies)
  • · Built-in validation, default values, and flag arrays

Want your agent to find this automatically?

Add the MCP server to your agent config and it will discover tools like getoptions on its own.

Set up MCP →

Similar tools to getoptions