Idiomatic Go command-line flag parsing with subcommands, positional values, and flags at any position, no external dependencies.
Flaggy is a Go library for parsing command-line arguments with support for subcommands, positional values, and flags in any order. It solves the limitations of Go's standard flag package by offering a more flexible and feature-rich interface without requiring external dependencies or specific project structures.
Go developers building command-line applications that need advanced features like subcommands, positional arguments, or custom help output.
Developers choose Flaggy for its idiomatic Go design, zero external dependencies, and comprehensive feature set including shell completion and customizable help, making it a robust alternative to both the standard library and more complex frameworks.
Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Flaggy has no required external packages, making it lightweight and easy to integrate without managing third-party dependencies, as emphasized in the README's philosophy and setup.
Supports flags anywhere in the command line with various assignment operators like '--flag=value' or '--flag value', offering great flexibility in user input, as shown in the feature list.
Handles nested subcommands with global and command-specific flags and positional parameters, ideal for complex CLI structures, demonstrated in the nested subcommand example.
Includes 35+ flag types covering Go primitives, slices, time, network, and encoding types, reducing the need for custom parsing code, as listed in the supported types section.
Automatically generates completion scripts for bash, zsh, fish, PowerShell, and Nushell, enhancing usability with simple commands like 'source <(./app completion bash)'.
Flaggy focuses on parsing but doesn't provide built-in validation for flag values, such as range checks or custom constraints, requiring developers to implement manual validation, which can be error-prone.
Compared to established libraries like Cobra, Flaggy has a smaller user base and fewer third-party integrations or plugins, which might limit support for advanced features or community-driven extensions.
While basic examples are provided, the documentation might lack depth for complex scenarios like dynamic flag generation or handling unconventional command-line syntax, potentially slowing development.