A simple, fast, and complete Go library for building command-line applications with emphasis on argument validation.
teris-io/cli is a Go library for building command-line applications. It provides a simple, fast, and complete API for defining commands, options, and arguments with built-in validation. The library focuses on parsing logic and delivers validated inputs directly to command actions.
Go developers building command-line tools, utilities, or multi-command applications who need robust argument parsing and validation.
It offers a minimalistic, dependency-light approach with emphasis on argument validation and unified option handling, distinguishing it from other CLI libraries by avoiding unnecessary complexity.
Simple and complete API for building command line applications in Go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Defines and validates positional arguments with explicit types, ensuring input integrity, as shown in the WithArg method examples.
Handles options from all command levels in a single block, simplifying management, demonstrated in the unified options map passed to actions.
Focuses solely on parsing logic with minimal external dependencies, reducing bloat and potential conflicts.
Supports nested sub-commands with shortcuts, ideal for building Git-like applications, as illustrated in the remote and checkout command examples.
Lacks built-in support for setting default values for options or arguments, requiring manual checks in command actions.
Only basic flag types like bool are shown; complex types need custom handling, limiting out-of-the-box validation.
Commands are defined programmatically at compile-time, making it unsuitable for dynamic CLI generation or runtime modifications.