Command Line Go Libraries Ranking
Libraries for building standard or basic Command Line applications.
95 repositories, updated daily.
- Go framework to build terminal apps, based on The Elm Architecture.
- Simple, fast, and fun package for building command line apps in Go (formerly codegangsta/cli).
- Your CLI home video recorder - generate terminal GIFs from code for documentation and tutorials.
- Declaratively define styles for color, format and layout in the terminal.
- Minimalist Go library aimed at creating Console User Interfaces.
elves/elvish
- An expressive programming language and a versatile interactive shell.
pterm/pterm
- A library to beautify console output on every platform with many combinable components.
- Termbox is a library for creating cross-platform text-based interfaces.
- Basic thread-safe progress bar that works in every OS.
- Command line and flag parser supporting sub commands (superseded by `kong`; see below).
- Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
spf13/pflag
- Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
- Go package to easily provide a terminal spinner with options.
- Flexible library to render progress bars in terminal applications.
- Advanced ANSI style & color support for your terminal applications.
gookit/color
- Terminal color rendering tool library, support 16 colors, 256 colors, RGB color rendering output, compatible with Windows.
- ANSI terminal colors that support fmt.Printf/Sprintf.
- Command argument completion generator for spf13/cobra.
- Write bash completions in Go + Go command bash completion.
- A robust and idiomatic flags package with excellent subcommand support.
- Go library for building CLI applications with sophisticated flag and argument parsing and validation.
- Library to improve readability in terminal apps using tabular data.
mkideal/cli
- Feature-rich and easy to use command-line package based on golang struct tags.
- Render highly customizable boxes in the terminal.
- Command line argument parser inspired by Python's argparse module.
- Yet Another CLi Spinner package, for working with terminal spinners.
- A declarative terminal UI framework with templ-like templates, flexbox layout, and a language server for editor support.
- Easy to use menu structure for cli applications that prompt users to make choices.
- Alternative CLI with "human face", in spirit of Go command.
- cli application framework with auto configuration and dependency injection.
- Dev-friendly CLI apps: sets up flags, defaults, and usage based on struct fields and tags.
- Struct based flags generator for flag, urfave/cli, pflag, cobra, kingpin, and other libraries.
- Shell library with modern and easy to use UI features.
teris-io/cli
- Simple and complete API for building command line interfaces in Go.
loom-go/loom
- Signal-based reactive components framework for building TUIs.
- Collects and displays CLI version information in multiple formats along with upgrade notice.
Closed-loop application library for Cobra commands, with oh-my-posh prompts, and more.
- A go library for configure and run command chains - such as pipelining in unix shells.
- Simple logging interface that supports cross-platform color and concurrency.
- Go option parser inspired by the flexibility of Perl’s GetOpt::Long.
- The non-invasive cross-platform terminal color library does not need to modify the Print method.
- Easiest way to match and mark strings for colorful terminal outputs.
GiGurra/boa
- Declarative flags, env vars, validation, and config files from struct tags. Built on cobra.
- A collection of flag argument types for Go's standard `flag` package.
posener/cmd
- Extends the standard `flag` package to support sub commands and more in idiomatic way.
cosiner/argv
- Go library to split command line string as arguments array using the bash syntax.
- OpenAPI-style specification for CLIs; define your interface in a language-agnostic document to generate documentation and framework boilerplate code.
- High-performance TUI framework with Elm-inspired architecture, perfect Unicode rendering, and zero-allocation event system.
- A customizable line-editing library with Emacs keybindings, Unicode support, completion, and syntax highlighting. Used in NYAGOS shell.
- CLI framework with security hardening, plugin storage system, and production observability features.
- goscaf generates opinionated, production-quality Go project boilerplate via an interactive CLI. Stop copy-pasting skeleton code between projects.
- Go library for rendering ANSI colored text templates in terminals.
- Go library that provides elegant and convenient style definitions using ANSI colors. Fully compatible & wraps the [fmt library](https://pkg.go.dev/fmt) for nice terminal layouts.
- Eliminate Cobra boilerplate: build powerful, feature-rich CLIs declaratively from Go structs.
- Ultra-fast, zero-dependency, POSIX-compliant flag parsing library that can be used as drop-in stdlib replacement with security hardening.
- Virtual bash shell in Go: executes shell commands against an in-memory filesystem (afero), with WASM plugin support and an embeddable HTTP server.
bobg/subcmd
- Another approach to parsing and running subcommands. Works alongside the standard `flag` package.
- An accurate Go `getopt`, validated against the GNU libc implementation.
- A local-first, Obsidian-compatible terminal knowledge manager.
- Dynamic configuration file templating tool for kubernetes manifest or general configuration files.
napalu/goopt
- A declarative, struct-tag based CLI framework for Go, with a broad feature set such as hierarchical commands/flags, i18n, shell completion, and validation.
- Generate a harmonious 16-color terminal palette from a single seed color or string.