📈 GH Trending Explorer 🎲 Surprise me

← all repos

urfave / cli

git clone https://github.com/urfave/cli.git v3.14.0 · 18d ago 🔥 on GitHub Trending today

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

+5
stars, 24h · #433
—
stars, 7 days
+78
stars, 30 days · #2,872
24k
★ total
1.9k
forks · 31 open issues

Star history starts 2026-10-20; the chart appears after the second daily snapshot.

LanguageGo
LicenseMIT
Created2013-07-13 (13y ago)
Last pushtoday
Watchers282
OwnerOrganization

Seen on GitHub Trending

  • 2026-10-20 — #20 daily in go · +5 ★
  • 2026-10-20 — #8 monthly in go · +78 ★

GitHub topics

Links

README excerpt
# Welcome to urfave/cli
[![Go Reference][goreference_badge]][goreference_link]
[![Go Report Card][goreportcard_badge]][goreportcard_link]
[![codecov][codecov_badge]][codecov_link]
[![Tests status][test_badge]][test_link]
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`][urfave/cli-docs] module)
- input lookup from:
 - environment variables
 - plain text files
 - structured file formats (supported via the
 [`urfave/cli-altsrc`][urfave/cli-altsrc] module)
## Documentation
See the hosted documentation website at . 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`, `SubcommandHelpTemplate`
 and `FishCompletionTemplate` are constants;
- if the default help printer is used with a custom template (such as
 `CustomRootCommandHelpTemplate` or `CustomHelpTemplate`), it panics;
- custom template functions other than `wrap` and `wrapAt` are 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`.
[test_badge]: https://github.com/urfave/cli/actions/workflows/test.yml/badge.svg
[test_link]: https://github.com/urfave/cli/actions/workflows/test.yml
[goreference_badge]: https://pkg.go.dev/badge/github.com/urfave/cli/v3.svg
[goreference_link]: https://pkg.go.dev/github.com/urfave/cli/v3
[goreportcard_badge]: https://goreportcard.com/badge/github.com/urfave/cli/v3
[goreportcard_link]: https://goreportcard.com/report/github.com/urfave/cli/v3
[codecov_badge]: https://codecov.io/gh/urfave/cli/branch/main/graph/badge.svg?token=t9YGWLh05g
[codecov_link]: https://codecov.io/gh/urfave/cli
[Q&A discussions]: https://github.com/urfave/cli/discussions/categories/q-a
[create a new discussion]: https://github.com/urfave/cli/discussions/new?category=q-a
[urfave/cli-docs]: https://github.