awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
urfave avatar

urfave/cli

0
View on GitHub↗
24,133 stars·1,787 forks·Go·MIT·16 viewscli.urfave.org↗

Cli

This is a framework for building structured terminal applications in Go. It provides the core components necessary to define a command-line interface, including a system for managing commands, sub-commands, and their associated flags.

The library distinguishes itself through an automated help generator that produces formatted usage instructions and manual pages, and a shell completion generator that creates tab-completion scripts for Bash, Zsh, Fish, and PowerShell. It also features a command lifecycle manager to handle pre- and post-execution logic and process exit codes.

The toolkit covers comprehensive argument parsing for various types, including strings, integers, slices, and maps, with support for environment variable overrides and value validation. It also includes utilities for error handling, command categorization, and the generation of Markdown documentation.

Features

  • CLI Frameworks - Provides a comprehensive framework for defining structured terminal applications with commands, flags, and actions.
  • Flag Definitions - Provides a comprehensive system for defining command-line flags with required values, defaults, and environment overrides.
  • Go CLI Frameworks - Provides a complete framework for building structured terminal applications with commands and flags in Go.
  • Argument Parsing - Implements a comprehensive system for defining and processing command-line flags and typed arguments.
  • Argument Parsers - Uses a consistent interface to convert raw string arguments into typed Go values like slices and maps.
  • Nested Command Structures - Provides a recursive hierarchy for organizing commands and sub-commands with associated metadata.
  • String Parsers - Captures textual input from the command line and provides optional whitespace trimming.
  • Command Lifecycle Managers - Manages the execution lifecycle of commands, including pre- and post-execution hooks and exit code handling.
  • Exit Status Signaling - Controls terminal exit status based on error interfaces to communicate process success or failure.
  • Boolean Toggles - Provides command-line flags that accept true or false values to toggle features or settings.
  • Typed Flag Parsers - Enables the creation of typed command-line flags that handle specific value types and validation logic.
  • Flag Propagation - Supports persistent flags that are inherited across the command and sub-command hierarchy.
  • Flag Validation Utilities - Runs custom validation functions against flag inputs and default values to ensure they meet specific criteria.
  • Help Text Generators - Automatically constructs formatted usage instructions and manual pages from command and flag metadata.
  • Shell Completion Generators - Produces completion scripts for bash, zsh, fish, and PowerShell to enable tab-completion of commands and flags.
  • Constraint Enforcers - Prevents users from providing conflicting command line options by requiring exactly one option from a specific group.
  • Duration Parsers - Converts command line input strings into time duration types for precise time-based configuration.
  • Integer Parsers - Parses command line arguments into unsigned integer types with range validation.
  • Execution Middleware - Supports a sequence of before and after hooks to manage command execution setup and teardown.
  • Boolean Flag Generators - Supports boolean switches with both positive and negative forms to explicitly enable or disable features.
  • Map Parsers - Processes command line arguments into key-value pairs using configurable separators or JSON deserialization.
  • Schema Exporters - Maps command line flags to standard schema types to facilitate automated documentation generation.
  • Timestamp Parsers - Converts string input into time objects using configurable layouts and timezones.
  • Man Page Generation - Produces formatted manual pages and Markdown documentation to describe the tool's interface and usage.
  • Numeric Slice Parsers - Converts comma-separated or repeated flag inputs into slices of integers or floating-point numbers.
  • String Slice Parsers - Collects multiple occurrences of a single flag into a slice of strings.
  • Numeric Parsers - Extracts numeric values from command line flags as floating point numbers.
  • Value Resolution Strategies - Resolves final configuration values by prioritizing flags, environment variables, and default settings.
  • Error Handling - Intercepts usage errors or missing commands to provide customized error messages and recovery.
  • Command Line Interfaces - Tool for building fast command-line applications.
  • Command Line Tools - Tool for building command-line applications.
  • Console Interfaces - Listed in the “Console Interfaces” section of the Awesome Go awesome list.
  • Developer Tools and CLIs - Declarative package for building command-line tools.
  • Go CLI Frameworks - Package for building fast and fun command-line apps.

Star history

Star history chart for urfave/cliStar history chart for urfave/cli

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Cli

Similar open-source projects, ranked by how many features they share with Cli.
  • spf13/cobraspf13 avatar

    spf13/cobra

    44,107View on GitHub↗

    Cobra is a development framework for building command-line applications in Go. It organizes application logic into a hierarchical tree structure where each node represents a command, complete with its own flags and execution logic. This structure allows developers to build complex, nested command interfaces that mirror business domains while maintaining a clean separation between command orchestration and underlying business logic. The framework distinguishes itself through its declarative approach to metadata and configuration. It automatically derives help documentation, usage instructions,

    Goclicli-appcobra
    View on GitHub↗44,107
  • yargs/yargsyargs avatar

    yargs/yargs

    11,492View on GitHub↗

    yargs is a command-line interface framework and argument parser for Node.js. It translates raw command-line strings into structured JavaScript objects, providing a toolkit for building terminal applications with nested sub-commands, dedicated handlers, and a structured user interface. The framework distinguishes itself through automated help text generation, which constructs formatted usage menus and instructions based on registered metadata. It also provides shell completion generation for Bash and Zsh and uses string-distance algorithms to offer typo correction suggestions when invalid inpu

    JavaScript
    View on GitHub↗11,492
  • clap-rs/clapclap-rs avatar

    clap-rs/clap

    16,528View on GitHub↗

    Clap is a command-line argument parser for Rust that enables developers to define complex interfaces through strongly-typed data structures. It functions as a comprehensive framework for building terminal applications, automating the transformation of raw string inputs into validated, type-safe code representations while simultaneously generating help documentation and usage statements. The library distinguishes itself by offering both a declarative, attribute-based approach and a fluent builder-pattern API, allowing for flexible interface construction. It includes a sophisticated validation

    Rustargument-parserargument-parsingcommand-line
    View on GitHub↗16,528
  • fastapi/typerfastapi avatar

    fastapi/typer

    19,632View on GitHub↗

    This project is a Python framework for building command-line interfaces by converting standard functions into executable programs. It uses type hints to automatically infer and generate argument parsers, validation logic, and help documentation, allowing developers to define complex terminal applications through simple function signatures. The framework distinguishes itself through a decorator-driven registration system that enables the construction of hierarchical command trees. It supports dependency injection to manage shared state and runtime configuration across subcommands, and it utili

    Pythoncliclickpython
    View on GitHub↗19,632
See all 30 alternatives to Cli→

Frequently asked questions

What does urfave/cli do?

This is a framework for building structured terminal applications in Go. It provides the core components necessary to define a command-line interface, including a system for managing commands, sub-commands, and their associated flags.

What are the main features of urfave/cli?

The main features of urfave/cli are: CLI Frameworks, Flag Definitions, Go CLI Frameworks, Argument Parsing, Argument Parsers, Nested Command Structures, String Parsers, Command Lifecycle Managers.

What are some open-source alternatives to urfave/cli?

Open-source alternatives to urfave/cli include: spf13/cobra — Cobra is a development framework for building command-line applications in Go. It organizes application logic into a… yargs/yargs — yargs is a command-line interface framework and argument parser for Node.js. It translates raw command-line strings… clap-rs/clap — Clap is a command-line argument parser for Rust that enables developers to define complex interfaces through… fastapi/typer — This project is a Python framework for building command-line interfaces by converting standard functions into… pallets/click — Click is a Python framework for building command-line interfaces. It provides a declarative approach to defining… spectreconsole/spectre.console — Spectre.Console is a .NET framework designed for building structured, feature-rich command-line applications. It…