urfave/cli has 24,310 GitHub stars and 1,858 forks. GitHot measured +4 stars in 24 hours. Last checked 2026-11-05 09:34 UTC. Last push 2026-11-03.
A declarative, simple, fast, and fun package for building command line tools in Go
Measured star growth
- in 24h
- +4
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalWelcome to urfave/cli
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, andpowershell - 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-ccan be shortened to-abc) - documentation generation in
manand Markdown (supported via theurfave/cli-docsmodule) - input lookup from:
- environment variables
- plain text files
- structured file formats (supported via the
urfave/cli-altsrcmodule)
Documentation
See the hosted documentation website at https://cli.urfave.org. Contents of
this website are built from the ./docs directory.
Build tags
You can use the following build tags:
urfave_cli_no_template
When set, the default help and fish completion are rendered without using
text/template, which makes the Go linker disable dead code elimination (see
Binary Size).
The output is the same, but help templates can not be customized:
RootCommandHelpTemplate,CommandHelpTemplate,SubcommandHelpTemplateandFishCompletionTemplateare constants;- if the default help printer is used with a custom template (such as
CustomRootCommandHelpTemplateorCustomHelpTemplate), it panics; - custom template functions other than
wrapandwrapAtare ignored.
Replacing cli.HelpPrinter works as usual, except it receives "root",
"command" or "subcommand" as templ instead of the default template text
(a custom template is passed as is).
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.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
559,958 starspublic-apis/public-apis
A collective list of free APIs
496,216 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
432,410 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
393,939 stars