mrkeyoor.com_
Mon 21 Sept 06:59 UTC
Dev Toolsevaluationupdated 21 Sept 2026

cli review

urfave/cli is a Go library for building command-line programs without hand-writing argument parsing, help output, and shell completion. You describe commands, subcommands, flags, and actions in Go, then the library turns that structure into the interface your users run.

Verdict

Our urfave/cli run installed 4 packages in 1 second, built in 18 seconds, and passed 2 of 2 Go tests in 5 seconds. It is an easy recommendation for a new Go 1.22+ CLI that needs subcommands, useful help, and completion without a large dependency tree. Existing v2 users should budget a source migration, while programs that use a bare - before more operands should wait for or carry the open fix.

We ran it

Lab card: what happened when we ran cliScreenshot of cli (cli.urfave.org)
Install✓ · 1s4 packages
Build✓ · 18s
Tests✓ · 5s2 passed · 0 failed of 2 (go test)
Repo175 files~26,875 lines of source · 12.6 MB · 3 CI workflows

Answers from our run

Does cli build from source?

Dependencies installed in 1 seconds (4 packages), and the build succeeded in 18 seconds. We cloned commit ae1fde9 into a clean Debian container with 3 CPUs and no project-specific setup.

Do cli's tests pass?

Yes: 2 of 2 passed when we ran the project's own test command (go test). Some failures need services or credentials a bare container does not have.

Who should not use cli?

Codebases pinned below Go 1.22: the v3 module declares Go 1.22 in go.mod.

What are the alternatives to cli?

Cobra, go-arg, Go flag. Our urfave/cli run installed 4 packages in 1 second, built in 18 seconds, and passed 2 of 2 Go tests in 5 seconds.

Setup5/51-second install with no credentials or services
Docs4/5Good v3 examples and migration guide; root README is brief
Community5/524,241 stars with a same-day push and release
Maturity4/5v3.13.0 is active; one argument-loss fix remained open

Who it’s for

Go developers building a command tree with subcommands, aliases, generated help, and completion.
Small teams that want a standard-library-only core instead of a generator or service.
Maintainers who need flags to read defaults from environment variables or text files.
New projects on Go 1.22 or newer that can start directly on the v3 API.

Who it’s NOT for

Codebases pinned below Go 1.22: the v3 module declares Go 1.22 in go.mod.
v2 applications with no budget for source changes: v3 renames App to Command, removes cli.Context, and changes handler signatures.
Tools that pass a bare - followed by more operands: open issue 2418 reports that v3 discards the later arguments, and the fix remained an open pull request in our September 21 check.
Teams expecting YAML, JSON, TOML, or man-page generation inside the core module: v3 moved those jobs to cli-altsrc and cli-docs.

Setup reality

Our sandbox install succeeded in 1 second and installed 4 packages. The build succeeded in 18 seconds. Go tests finished in 5 seconds with 2 passed and 0 failed out of 2.

No account, credential, database, or background service is required. The v3 module declares Go 1.22, and your application imports github.com/urfave/cli/v3; structured config and generated documentation require separate urfave modules.

The measured checkout had 175 files, about 26,875 source lines, and used 12.6 MB. It had 3 CI workflow files, no Dockerfile, and no standalone tests directory. Existing v2 users face API changes rather than the one-line setup a new v3 program gets.

v3.13.0 keeps the command tree in one Go structure

urfave/cli v3.13.0 lets a Go program describe its root command, children, flags, aliases, help text, and actions with Command values. An action receives a standard context.Context and the active command, so cancellation and deadlines fit ordinary Go code. The same definitions drive generated help, suggestions, compound short flags, and completion for bash, zsh, fish, and PowerShell.

That scope sits in a useful middle ground. Go's flag package handles simple options, while urfave/cli adds the behavior expected from a multi-command tool without asking you to generate a project skeleton. The README says the core depends only on Go's standard library. You still own the business logic and output, but command discovery and flag parsing stop becoming a second application inside the first.

What happened when we ran it

Our run at commit ae1fde9 installed 4 packages in 1 second inside a fresh Debian container. The build completed in 18 seconds. The Go test step then finished in 5 seconds with 2 passed and 0 failed out of 2. Those results cover repository setup and test execution; they do not measure parsing speed or the startup time of an application built with the library.

The checkout used 12.6 MB and contained 175 files with roughly 26,875 source lines. Our scan found 3 CI workflow files, no Dockerfile, and no standalone tests directory. This is a Go library, so the missing container file is unsurprising, and its test files live beside the packages. Our measurement setup used 3 CPUs, 8 GB of RAM, Go 1.24, no secrets, and an unprivileged container.

Moving from v2 to v3 changes application code

The v3 migration is larger than changing the import suffix. cli.App becomes cli.Command, RunContext becomes Run, and Subcommands becomes Commands. The old cli.Context type is removed; its flag and argument accessors now live on Command. Action, before, after, completion, and error handlers receive context.Context plus the current command. A compiler will identify many changes, but this is still scheduled migration work.

Go 1.22 is the minimum declared by the v3 module. The official guide gives side-by-side replacements for v2 imports, value sources, handler signatures, and completion hooks, which makes the work inspectable before you start. Maintainers who cannot move the project toolchain or touch every command handler should remain on their supported major line until those constraints change. The contribution guide keeps separate v1 and v2 maintenance branches for bug fixes.

YAML and man pages moved outside the v3 core

In v3, environment variables and plain text files remain built-in value sources. YAML, JSON, TOML, and HTTP-backed input live in the separate urfave/cli-altsrc module. Markdown and man-page generation moved to urfave/cli-docs. Pulling those jobs out keeps the central parser narrow, although applications with config-file flags now need to version and test more than one urfave module.

Shell completion covers 4 shells but needs deliberate setup. The root command must enable it, and users must generate and source the script for bash, zsh, fish, or PowerShell. That is better than maintaining four handwritten scripts, yet it is not invisible installation work. If completion is part of your product, package the generated instructions with the binary and test them in the shells you claim to support.

v3.13.0 still has a bare-dash argument trap

Open issue 2418 describes a sharp parsing case in v3: when a bare - is followed by more positional arguments, the parser keeps the dash and drops the remaining operands. The report is based on source analysis, and commit ae1fde9 contains the cited break in parseFlags. Tools that use - as a stdin placeholder can therefore receive a plausible but truncated argument list instead of an error.

Pull request 2419 proposes keeping the arguments after the bare dash and was still open when checked on September 21, 2026. Our 5-second test run passed, so the available suite did not catch this path as a failure in the measured commit. Do not broaden that into a claim that common parsing is unreliable. Add a regression case if your syntax uses this form, or wait until the fix lands in a release.

September 2026 activity supports choosing v3 for new work

Our September 21 fetch found 24,241 stars, 44 open issues, and 23 open pull requests. GitHub recorded the last push on September 20, 2026. Release v3.13.0 was published that same day from the commit we measured, with fixes for Unicode short flags, inverse Boolean counts, and map-flag spacing, plus deprecation metadata for flags and commands.

Those dates matter more than the queue size by itself. The project has active work on the main v3 line, a documented release process, and compatibility checks for public API changes. Its maintainers are unpaid volunteers and warn that replies may take days. For a new Go 1.22+ command tree, the 1-second install makes a trial cheap. For an existing v2 program, the migration guide and the bare-dash regression deserve a branch and targeted tests before release.

Alternatives

ProjectWhat it isPick it when
Cobra gh↗A command framework with POSIX-style flags, a generator, completion, and man-page output.pick this instead when you want generated command scaffolding, built-in man pages, or compatibility with the wider Cobra and pflag ecosystem.
go-argA compact parser that maps command-line arguments into tagged Go structs.pick this instead when a small utility maps cleanly to one options struct and a command-object API would add ceremony.
Go flagThe standard-library parser for straightforward flags and positional arguments.pick this instead when you need a few flags and do not need nested commands, generated completion, aliases, or custom help machinery.

What people are saying

  1. [velocity-scout] urfave/cli
  2. [github-trending] pandorafuture/wx-cli
  3. [velocity-scout] jackwener/wx-cli-again
  4. [github-trending] Tencent/teamai-cli
  5. [github-trending] spicetify/cli
  6. [github-trending] basecamp/hey-cli

Sources

  1. urfave/cli README
  2. urfave/cli repository facts
  3. urfave/cli v3.13.0 release
  4. urfave/cli v3 getting started
  5. urfave/cli v2 to v3 migration guide
  6. urfave/cli v3 value sources
  7. Issue 2418: bare dash discards later arguments
  8. Pull request 2419: keep arguments after a bare dash

More dev tools reviews

C-Plus-Plus · ish · dex · deja-vu · neomacs · smolvm · the whole board →