Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. mow.cli

mow.cli

MITGov1.2.0

A Go framework for building command line applications with declarative argument parsing and validation.

GitHubGitHub
884 stars56 forks0 contributors

What is mow.cli?

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.

Target Audience

Go developers building command line tools, from simple utilities to complex applications with nested commands and advanced argument validation needs.

Value Proposition

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.

Overview

A versatile library for building CLI applications in Go

Use Cases

Best For

  • Building Unix-style command line tools with complex argument structures
  • Creating multi-command applications similar to git or docker
  • Implementing declarative argument validation without manual parsing logic
  • Developing CLI tools that require contextual help for commands and subcommands
  • Handling advanced argument cases like optional repetition or mutual exclusion
  • Extending CLI tools with custom types for specialized data formats

Not Ideal For

  • Projects needing only basic flag parsing where Go's standard library flag package is sufficient
  • Teams preferring an imperative, code-first CLI design over declarative spec strings
  • Applications requiring built-in terminal UI features like colored output or interactive prompts

Pros & Cons

Pros

Declarative Spec Power

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.

Advanced Argument Handling

Supports complex cases like optional arguments, repetition with '...', and dependencies between options, enabling robust CLI designs similar to Unix tools.

Contextual Help Automation

Generates tailored help messages for commands and subcommands, improving user experience without manual effort, as highlighted in the comparison table.

Nested Command Structure

Facilitates multi-level command hierarchies akin to git or docker, demonstrated in the uman and vault examples with clear scoping.

Cons

Spec Grammar Complexity

The declarative spec string syntax requires learning a new grammar, which can be a barrier for developers accustomed to more intuitive imperative approaches.

Smaller Community Ecosystem

Compared to popular alternatives like urfave/cli, mow.cli has less widespread adoption, potentially resulting in fewer third-party integrations or community resources.

Overhead for Simple Apps

For basic CLI tools with minimal arguments, the framework's advanced features and spec-based setup might introduce unnecessary complexity where simpler libraries suffice.

Frequently Asked Questions

Quick Stats

Stars884
Forks56
Contributors0
Open Issues25
Last commit2 years ago
CreatedSince 2014

Tags

#cli-framework#validation#go-library#argument-parsing#backtracking#cli#command-line#declarative-syntax#go#cli-tools

Built With

G
Go

Included in

Go169.1k
Auto-fetched 1 day ago

Related Projects

cobracobra

A Commander for modern Go CLI interactions

Stars43,978
Forks3,147
Last commit28 days ago
clicli

A declarative, simple, fast, and fun package for building command line tools in Go

Stars24,081
Forks1,780
Last commit5 days ago
elvishelvish

Powerful scripting language & versatile interactive shell

Stars6,309
Forks324
Last commit1 month ago
kingpinkingpin

CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser

Stars3,563
Forks278
Last commit3 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub