An object-oriented PHP option parser library with type constraints, flag support, and required value checking.
GetOptionKit is an object-oriented option parser library for PHP that simplifies command-line argument parsing. It allows developers to define option specifications with type constraints, handle flags, multiple values, and validate required inputs, making CLI application development more structured and reliable.
PHP developers building command-line tools, scripts, or applications that require robust argument parsing, especially those needing subcommand support or strict input validation.
Developers choose GetOptionKit for its comprehensive feature set, including type validation, subcommand parsing, and auto-generated help, all within a clean, object-oriented API that is more powerful than basic PHP getopt.
An object-oriented option parser library for PHP, which supports type constraints, flag, multiple flag, multiple values, required value checking
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports validation against multiple types like string, number, boolean, file, and email, as detailed in the Option Value Type section, ensuring input integrity.
Accepts various CLI formats including short flags, long options, and combined flags, demonstrated in the Supported Option Formats examples for versatile usage.
Enables parsing options for nested subcommands using ContinuousOptionParser, ideal for complex CLI applications with separate option sets per command.
Automatically generates help text from option specifications via OptionPrinter, reducing manual effort in maintaining CLI documentation.
The documentation admits only string, number, and boolean types are currently validated, limiting the effectiveness of other constraints like file or date.
The Todo list includes option spec groups and custom command mapping, indicating gaps in functionality that might require workarounds.
Requires defining option collections and parsers in an object-oriented manner, which can be verbose and complex for simple scripts compared to lighter solutions.