[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f1rh4d1c07lqc9":3},{"code":4,"message":5,"data":6,"timestamp":39},10000,"success",{"full_name":7,"position":8,"description":9,"language":10,"stars":11,"forks":12,"stars_gained":13,"age_days":14,"hn_threads":15,"one_liner":22,"summary_md":23,"topic":24,"github_topics":27,"license":35,"homepage":36,"updated_at":37,"history":38},"urfave\u002Fcli",6,"A declarative, simple, fast, and fun package for building command line tools in Go","Go",24308,1850,89,4851,[16],{"id":17,"title":18,"points":19,"comments":20,"posted_at":21},21645443,"Fast Way to Build Go CLI Apps",8,0,"2019-11-27","A Go library for structuring a CLI's commands, flags and help output with declarations instead of parsing code you write yourself.","If you are writing a Go program that needs subcommands, flags and readable help, urfave\u002Fcli is the kind of library you reach for before hand-rolling an argument parser. It replaces ad-hoc `os.Args` handling with declared commands, flags and actions, and the library takes care of matching aliases, rendering help and generating shell completion from that same declaration.\n\n## The problem\n\nA Go tool often starts as a single `main` with a few `flag` calls, then grows subcommands, aliases and flags that can also come from environment variables or config files. At that point the argument parsing and help text become their own maintenance burden, and each new command risks inconsistent behavior. With this library you declare the command tree and flag definitions once; matching, default values, help rendering and completion output come from that declaration, so adding a subcommand is mostly data rather than branching code.\n\n## What's different\n\nThe distinguishing mechanism is the declarative structure: commands, subcommands, aliases and prefix matching are data, and the same data feeds help and dynamic completion for bash, zsh, fish and PowerShell. The README also states there are no dependencies beyond the Go standard library, which keeps the dependency graph of the tool itself small. Flags cover simple types, slices, time and durations, compound short flags (`-abc`), and input lookup from environment variables or plain and structured files.\n\nThe trade-off is breadth through companion modules rather than the core. Markdown and `man` page generation live in [urfave\u002Fcli-docs](https:\u002F\u002Fgithub.com\u002Furfave\u002Fcli-docs), and structured config sources live in [urfave\u002Fcli-altsrc](https:\u002F\u002Fgithub.com\u002Furfave\u002Fcli-altsrc); you add those only if you need them. The permissive help system is another design choice: templates are customizable, but the `urfave_cli_no_template` build tag turns help and fish completion into constants, ignores custom template functions other than `wrap` and `wrapAt`, and panics if the default printer is given a custom template. Choosing that tag to control binary size means giving up help customization through the usual path.\n\n## Who should try it\n\nGood fit: a Go developer building a multi-command CLI — an internal tool, a small distributed binary, a config-heavy utility — who wants aliases, completion and generated docs without writing a parser or help formatter. It is also a reasonable fit if you want to keep the CLI definition together with the rest of a Go program.\n\nPoor fit: projects not written in Go, or teams that need a language-agnostic CLI spec or a framework that models the full option surface of other ecosystems. If your tool is a single command with a handful of flags, a standard-library approach may be less to learn. If you depend heavily on custom help layouts or generated `man` pages, plan for the companion module and check how the no-template build tag interacts with your customizations.\n\n## Requirements and limitations\n\nThis is a Go package, so use is tied to Go module tooling and the library's own major version; the README links the v3 Go reference and docs, so pin the version and consult the [documentation site](https:\u002F\u002Fcli.urfave.org) for the matching API. The help system is intentionally flexible, but that flexibility is where configuration errors surface: custom templates and no-template builds have documented behavior changes, and the README explicitly says the default printer panics when paired with a custom template under the tag.\n\nOngoing upkeep includes tracking the library's release line and rechecking completion scripts when commands change. Documentation generation and structured config loading are optional modules, so they add their own version and compatibility decisions. The project is run by unpaid volunteers, according to the README, and support flows through Q&A discussions and issues; account for that when planning response times for questions.\n\n## HotRepo's take\n\nHotRepo's stored coverage begins on 2026-10-24 and contains only a two-date sample. The one dated data point is a monthly Go board position: +89 stars this month, #6 (2026-10-25). With no comparable daily-board history, persistence cannot be judged; that observation shows a monthly snapshot, not a trend.\n\nThe project is long-lived (created 2013), but age and star count are not evidence of current compatibility with your Go toolchain or of maintenance cadence. Before adopting, verify the v3 docs and Go reference match the version you will pin, especially if you need custom help templates or generated man pages.",{"slug":25,"name":26},"developer-tools","Developer Tools",[28,29,30,31,32,33,34],"cli","command-line","go","golang-library","json","toml","yaml","MIT","https:\u002F\u002Fcli.urfave.org","2026-10-25T02:46:45Z",[],1792909366]