urfave

    urfave/cli

    #592 this week

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

    cli
    command-line
    go
    golang-library
    json
    toml
    Go
    MIT
    24.0K stars
    1.8K forks
    24.0K GitHub watchers
    Updated 6/23/2026
    View on GitHub

    Backblaze Generative Media Hackathon

    Build the next generation of AI media apps with Genblaze, stored on Backblaze B2. $10,000 in prizes.

    Enter the hackathon

    Loading star history...

    Use Cases & Benefits

    • urfave/cli is a Go package designed for building declarative, simple, and fast command line tools with support for commands, subcommands, and flexible help systems.
    • Key features include dynamic shell completion for multiple shells, compound short flag support, environment variable and file input lookup, and documentation generation in man and Markdown formats.
    • The package has no external dependencies beyond the Go standard library, ensuring lightweight integration but may lack some advanced CLI features found in larger frameworks.
    • Organizations can use urfave/cli in production to rapidly develop maintainable CLI applications with robust flag parsing and shell completion, benefiting from its active maintenance and large community.
    • Ideal use cases include building custom command line utilities, automation scripts, and developer tools in Go that require extensible command structures and user-friendly interfaces.

    About cli

    Welcome to urfave/cli

    Go Reference Go Report Card codecov Tests status

    urfave/cli is a declarative, simple, fast, and fun package for building command line tools in Go featuring:

    • commands and subcommands with alias and prefix match support
    • flexible and permissive help system
    • dynamic shell completion for bash, zsh, fish, and powershell
    • no dependencies except Go standard library
    • input flags for simple types, slices of simple types, time, duration, and others
    • compound short flag support (-a -b -c can be shortened to -abc)
    • documentation generation in man and Markdown (supported via the urfave/cli-docs module)
    • input lookup from:
      • environment variables
      • plain text files
      • structured file formats (supported via the urfave/cli-altsrc module)

    Documentation

    See the hosted documentation website at https://cli.urfave.org. Contents of this website are built from the ./docs directory.

    Support

    Check the Q&A discussions. If you don't find answer to your question, create a new discussion.

    If you found a bug or have a feature request, create a new issue.

    Please keep in mind that this project is run by unpaid volunteers.

    License

    See LICENSE.

    Discover Repositories

    Search across tracked repositories by name or description