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

Go CLI Application Frameworks

Ranking updated Jun 30, 2026

For a Go framework for building CLI tools, the strongest matches are urfave/cli (urfave/cli is a Go framework specifically designed for building), spf13/cobra (Cobra is a comprehensive Go CLI framework that provides) and alecthomas/kong (Kong is a declarative Go CLI framework that maps). mitchellh/cli and integrii/flaggy round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.

Libraries and toolkits for building robust command-line interfaces and interactive terminal applications using Go.

Go CLI Application Frameworks

Find the best repos with AI.We'll search the best matching repositories with AI.
  • urfave/cliurfave avatar

    urfave/cli

    24,133View on GitHub↗

    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

    urfave/cli is a Go framework specifically designed for building structured CLI applications, offering built-in subcommand support, flag parsing, shell auto-completion, help generation, and configuration file support (JSON, TOML, YAML), making it a comprehensive match for your needs.

    GoFlag Validation UtilitiesHelp Text GeneratorsNested Command Structures
    View on GitHub↗24,133
  • 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,

    Cobra is a comprehensive Go CLI framework that provides tree-structured subcommands, declarative flag and option parsing, automatic shell completion, help text generation, and argument validation, and it integrates with configuration file support—covering every feature you're looking for.

    GoCommand HierarchiesFlag Validation UtilitiesFlag Definitions
    View on GitHub↗44,107
  • alecthomas/kongalecthomas avatar

    alecthomas/kong

    2,976View on GitHub↗

    Kong is a declarative command line interface framework and parser for Go. It maps flags and positional arguments directly into typed Go structures using struct tags, allowing developers to define terminal interfaces through data models rather than manual parsing logic. The project functions as a configuration mapper that populates Go structures from a combination of command-line arguments, environment variables, and JSON files. It distinguishes itself by providing a dependency injection container to pass external services into command handlers and a plugin architecture for dynamic command reg

    Kong is a declarative Go CLI framework that maps flags and arguments directly into typed structs, with built-in support for subcommands, flag parsing, help generation, argument validation, and configuration from JSON/YAML files, making it exactly the kind of structured CLI tooling you're looking for.

    GoCommand-Line Argument ParsersHelp Text GeneratorsNested Command Structures
    View on GitHub↗2,976
  • mitchellh/climitchellh avatar

    mitchellh/cli

    1,734View on GitHub↗

    A Go library for implementing command-line interfaces.

    mitchellh/cli is a Go library specifically designed for building command-line interfaces, which matches the category of a CLI framework, but its minimal description doesn't confirm advanced features like auto-completion or configuration file support.

    GoCommand Line InterfacesCommand Line Tools
    View on GitHub↗1,734
  • integrii/flaggyintegrii avatar

    integrii/flaggy

    951View on GitHub↗

    Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.

    Flaggy is a Go library for parsing command-line input with subcommands and flags at any position, directly fitting the need for a structured CLI tool builder, though it may not include built-in shell completion or configuration file support.

    GoCommand Line InterfacesCommand Line ToolsConsole Interfaces
    View on GitHub↗951
  • 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

    Clap is a powerful CLI argument parser for Rust, not Go, so it does not match the visitor's explicit language requirement for a Go library or framework.

    RustCommand-Line Argument ParsersNested Command StructuresArgument Parsers
    View on GitHub↗16,528
  • spectreconsole/spectre.consolespectreconsole avatar

    spectreconsole/spectre.console

    11,210View on GitHub↗

    Spectre.Console is a .NET framework designed for building structured, feature-rich command-line applications. It provides a comprehensive toolkit for managing complex command hierarchies, type-safe argument parsing, and dependency injection, allowing developers to decouple business logic from input processing while maintaining modular application designs. The framework distinguishes itself through a sophisticated terminal user interface toolkit that enables the creation of dynamic, interactive console experiences. It utilizes a markup-based rendering system to display styled text, tables, cha

    This is a .NET CLI framework with structured argument parsing and subcommand support, but the visitor specifically asked for a Go library or framework, so it is not directly usable in that ecosystem.

    C#Command HierarchiesHelp Text GeneratorsNested Command Structures
    View on GitHub↗11,210
  • github/hubgithub avatar

    github/hub

    22,955View on GitHub↗

    Hub is a git command line tool and GitHub API client that provides a shell interface for automating workflows. It functions as a GitHub git wrapper, extending standard git commands to include direct management of repositories, issues, and pull requests. The tool integrates REST API communication with a wrapper-based execution model to perform administrative tasks without a web browser. It utilizes OAuth-based authentication and a local configuration store to secure API requests. The utility includes shell command completion and argument parsing to improve terminal productivity. It also suppo

    Hub is a finished Git/GitHub CLI tool rather than a reusable Go library or framework for building your own command-line applications, so it helps with GitHub workflows but not with structuring a new CLI tool from scratch.

    GoShell CompletionShell Completions
    View on GitHub↗22,955
  • spf13/viperspf13 avatar

    spf13/viper

    30,306View on GitHub↗

    Viper is a configuration management library designed to centralize application settings from diverse sources into a unified, type-safe registry. It aggregates data from local files, environment variables, command-line flags, and remote key-value stores, providing a single source of truth for application state. By utilizing a hierarchical key-value registry, the system resolves configuration values based on a prioritized stack of providers, ranging from default values to runtime overrides. The library distinguishes itself through its pluggable provider abstraction and dynamic update capabiliti

    Viper handles configuration from multiple sources including flags, but it is a configuration management library, not a CLI framework — it does not provide subcommand routing, argument validation, or shell auto-completion.

    GoFile-Based Configuration Loaders
    View on GitHub↗30,306
  • oclif/oclifoclif avatar

    oclif/oclif

    9,543View on GitHub↗

    oclif is a Node.js framework for building command-line interfaces. It provides a structured system for developing terminal applications with consistent command patterns, argument parsing, and automated help generation. The project features a modular plugin architecture that allows for external functionality to be injected via a manifest-based loading mechanism. It includes a dedicated distribution pipeline and packager to bundle applications into OS-native installers and tarballs for Windows, macOS, and Linux. The framework covers a broad range of development capabilities, including project

    This is a CLI framework, but it’s built for Node.js/TypeScript, not Go, so it doesn’t meet the explicit language requirement for a Go CLI library or framework.

    TypeScriptHelp Text Generators
    View on GitHub↗9,543
Compare the top 10 at a glance
RepositoryStarsLanguageLicenseLast push
urfave/cli24.1KGoMITJun 23, 2026
spf13/cobra44.1KGoApache-2.0Apr 25, 2026
alecthomas/kong3KGomitFeb 13, 2026
mitchellh/cli1.7KGoMPL-2.0Jul 22, 2024
integrii/flaggy951GoUnlicenseOct 4, 2025
clap-rs/clap16.5KRustApache-2.0Jun 1, 2026
spectreconsole/spectre.console11.2KC#mitFeb 15, 2026
github/hub23KGoMITFeb 2, 2024
spf13/viper30.3KGoMITJan 12, 2026
oclif/oclif9.5KTypeScriptMITJun 15, 2026

Related searches

  • a CLI building framework for Python
  • a ruby framework for building cli applications
  • a java library for building cli applications
  • a library for building C# CLI applications
  • a library for building PHP CLI applications
  • a library for building Kotlin CLI applications
  • a library for building Rust CLI applications
  • a Go framework for building microservices