A Go framework for building command line applications with declarative argument parsing and validation.
mow.cli is a Go framework for building command line applications that offloads argument parsing and validation from the developer. It uses declarative spec strings to define command syntax, automatically generating help messages and enforcing correct usage. The library supports complex features like optional arguments, repetition, command nesting, and backtracking, making it suitable for both simple tools and sophisticated multi-command applications.
Go developers building command line tools, from simple utilities to complex applications with nested commands and advanced argument validation needs.
Developers choose mow.cli for its powerful declarative spec grammar, which reduces boilerplate code and ensures robust argument handling. Unlike other CLI libraries, it supports advanced parsing features like backtracking and complex dependencies, while providing contextual help and a clean API for command nesting.
A versatile library for building CLI applications in Go
Uses a concise grammar (e.g., '[-r] SRC... DST') to define command syntax, automating parsing and validation as shown in the cp example, reducing boilerplate code.
Supports complex cases like optional arguments, repetition with '...', and dependencies between options, enabling robust CLI designs similar to Unix tools.
Generates tailored help messages for commands and subcommands, improving user experience without manual effort, as highlighted in the comparison table.
Facilitates multi-level command hierarchies akin to git or docker, demonstrated in the uman and vault examples with clear scoping.
The declarative spec string syntax requires learning a new grammar, which can be a barrier for developers accustomed to more intuitive imperative approaches.
Compared to popular alternatives like urfave/cli, mow.cli has less widespread adoption, potentially resulting in fewer third-party integrations or community resources.
For basic CLI tools with minimal arguments, the framework's advanced features and spec-based setup might introduce unnecessary complexity where simpler libraries suffice.
A Commander for modern Go CLI interactions
A declarative, simple, fast, and fun package for building command line tools in Go
Powerful scripting language & versatile interactive shell
CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.