Awesome Go

Command Line

100+ libraries in this category

bubbletea

Go framework to build terminal apps, based on The Elm Architecture

45,418Command LineAdvanced Console UIs
cobra

Commander for modern Go CLI interactions

44,703Command LineStandard CLI
urfave/cli

Simple, fast, and fun package for building command line apps in Go (formerly codegangsta/cli)

24,291Command LineStandard CLI
vhs

Your CLI home video recorder - generate terminal GIFs from code for documentation and tutorials

21,119Command LineAdvanced Console UIs
fx

Terminal JSON viewer & processor

20,680Command LineAdvanced Console UIs
termui

Go terminal dashboard based on **termbox-go** and inspired by [blessed-contrib](https://github.com/yaronn/blessed-contrib)

13,589Command LineAdvanced Console UIs
lipgloss

Declaratively define styles for color, format and layout in the terminal

11,928Command LineAdvanced Console UIs
gocui

Minimalist Go library aimed at creating Console User Interfaces

10,611Command LineAdvanced Console UIs
bubbles

TUI components for bubbletea

8,988Command LineAdvanced Console UIs
huh

Lightweight library for building interactive forms and prompts in the terminal

7,203Command LineAdvanced Console UIs
elvish

An expressive programming language and a versatile interactive shell

6,385Command LineStandard CLI
pterm

A library to beautify console output on every platform with many combinable components

5,555Command LineAdvanced Console UIs
go-prompt

Library for building a powerful interactive prompt, inspired by [python-prompt-toolkit](https://github.com/jonathanslenders/python-prompt-toolkit)

5,501Command LineAdvanced Console UIs
termbox-go

Termbox is a library for creating cross-platform text-based interfaces

4,785Command LineAdvanced Console UIs
progressbar

Basic thread-safe progress bar that works in every OS

4,708Command LineAdvanced Console UIs
survey

Build interactive and accessible prompts with full support for windows and posix terminals.

4,088Command LineLibraries for building standard or basic Command Line applications.
glamour

Stylesheet-based markdown rendering for terminal applications

3,732Command LineAdvanced Console UIs
kingpin

Command line and flag parser supporting sub commands (superseded by `kong`; see below)

3,566Command LineStandard CLI
asciigraph

Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies

3,099Command LineAdvanced Console UIs
Dnote

A simple command line notebook with multi-device sync

3,088Command LineStandard CLI
termdash

Go terminal dashboard based on **termbox-go** and inspired by [termui](https://github.com/gizak/termui)

3,044Command LineAdvanced Console UIs
pflag

Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags

2,778Command LineStandard CLI
go-flags

go command line option parser

2,693Command LineStandard CLI
spinner

Go package to easily provide a terminal spinner with options

2,530Command LineAdvanced Console UIs
mpb

Multi progress bar for terminal applications

2,513Command LineAdvanced Console UIs
go-arg

Struct-based argument parsing in Go

2,288Command LineStandard CLI
uiprogress

Flexible library to render progress bars in terminal applications

2,137Command LineAdvanced Console UIs
termenv

Advanced ANSI style & color support for your terminal applications

2,031Command LineAdvanced Console UIs
carapace-bin

Multi-shell multi-command argument completer

1,989Command LineStandard CLI
mitchellh/cli

Go library for implementing command-line interfaces.

1,730Command LineLibraries for building standard or basic Command Line applications.
uilive

Library for updating terminal output in real time

1,721Command LineAdvanced Console UIs
gookit/color

Terminal color rendering tool library, support 16 colors, 256 colors, RGB color rendering output, compatible with Windows

1,606Command LineAdvanced Console UIs
ops

Unikernel Builder/Orchestrator

1,523Command LineStandard CLI
aurora

ANSI terminal colors that support fmt.Printf/Sprintf

1,494Command LineAdvanced Console UIs
carapace

Command argument completion generator for spf13/cobra

1,459Command LineStandard CLI
liner

Go readline-like library for command-line interfaces

1,098Command LineStandard CLI
complete

Write bash completions in Go + Go command bash completion

958Command LineStandard CLI
flaggy

A robust and idiomatic flags package with excellent subcommand support

954Command LineStandard CLI
go-isatty

isatty for golang

926Command LineAdvanced Console UIs
mow.cli

Go library for building CLI applications with sophisticated flag and argument parsing and validation

883Command LineStandard CLI
go-colorable

Colorable writer for windows

816Command LineAdvanced Console UIs
uitable

Library to improve readability in terminal apps using tabular data

740Command LineAdvanced Console UIs
mkideal/cli

Feature-rich and easy to use command-line package based on golang struct tags

723Command LineStandard CLI
box-cli-maker

Render highly customizable boxes in the terminal

667Command LineAdvanced Console UIs
argparse

Command line argument parser inspired by Python's argparse module

639Command LineStandard CLI
gommon/color

Style terminal text

596Command LineAdvanced Console UIs
bubble-table

An interactive table component for bubbletea

579Command LineAdvanced Console UIs
simpletable

Simple tables in a terminal with Go

553Command LineAdvanced Console UIs
box-cli-maker

Make Highly Customized Boxes for your CLI.

531Command LineLibraries for building Console Applications and Console User Interfaces.
yacspin

Yet Another CLi Spinner package, for working with terminal spinners

456Command LineAdvanced Console UIs
chalk

Intuitive package for prettifying terminal/console output.

449Command LineLibraries for building Console Applications and Console User Interfaces.
go-tui

A declarative terminal UI framework with templ-like templates, flexbox layout, and a language server for editor support

434Command LineAdvanced Console UIs
tabby

A tiny library for super simple Golang tables

372Command LineAdvanced Console UIs
wmenu

Easy to use menu structure for cli applications that prompt users to make choices

229Command LineStandard CLI
go-colortext

Go library for color output in terminals

217Command LineAdvanced Console UIs
climax

Alternative CLI with "human face", in spirit of Go command

215Command LineStandard CLI
vibecheck

Cross-platform CLI that generates Git commit messages automatically from code changes

213Command LineStandard CLI
clîr

A Simple and Clear CLI library. Dependency free

201Command LineStandard CLI
hiboot cli

cli application framework with auto configuration and dependency injection

180Command LineStandard CLI
commandeer

Dev-friendly CLI apps: sets up flags, defaults, and usage based on struct fields and tags

175Command LineStandard CLI
sflags

Struct based flags generator for flag, urfave/cli, pflag, cobra, kingpin, and other libraries

168Command LineStandard CLI
acmd

Simple, useful, and opinionated CLI package in Go

153Command LineStandard CLI
job

JOB, make your short-term command as a long-term job

151Command LineStandard CLI
readline

Shell library with modern and easy to use UI features

150Command LineStandard CLI
cmdr

A POSIX/GNU style, getopt-like command-line UI Go library

143Command LineStandard CLI
teris-io/cli

Simple and complete API for building command line interfaces in Go

132Command LineStandard CLI
flag

Simple but powerful command line option parsing library for Go supporting subcommand.

131Command LineLibraries for building standard or basic Command Line applications.
ukautz/clif

Small command line interface framework.

129Command LineLibraries for building standard or basic Command Line applications.
loom

Signal-based reactive components framework for building TUIs

126Command LineAdvanced Console UIs
env

Tag-based environment configuration for structs

125Command LineStandard CLI
version

Collects and displays CLI version information in multiple formats along with upgrade notice

114Command LineStandard CLI
cfmt

Contextual fmt inspired by bootstrap color classes.

103Command LineLibraries for building Console Applications and Console User Interfaces.
tabular

Print ASCII tables from command line utilities without the need to pass large sets of data to the API.

75Command LineLibraries for building Console Applications and Console User Interfaces.
command-chain

A go library for configure and run command chains - such as pipelining in unix shells

71Command LineStandard CLI
gocmd

Go library for building command line applications

67Command LineStandard CLI
wlog

Simple logging interface that supports cross-platform color and concurrency

67Command LineStandard CLI
cfmt

Simple and convenient formatted stylized output fully compatible with fmt library.

66Command LineLibraries for building Console Applications and Console User Interfaces.
lazyenv

TUI for browsing, comparing, and editing .env files

65Command LineAdvanced Console UIs
strumt

Library to create prompt chain

63Command LineStandard CLI
go-getoptions

Go option parser inspired by the flexibility of Perl’s GetOpt::Long

59Command LineStandard CLI
ctc

The non-invasive cross-platform terminal color library does not need to modify the Print method

55Command LineAdvanced Console UIs
marker

Easiest way to match and mark strings for colorful terminal outputs

54Command LineAdvanced Console UIs
table

Small library for terminal color based tables

51Command LineAdvanced Console UIs
flagvar

A collection of flag argument types for Go's standard `flag` package

48Command LineStandard CLI
boa

Declarative flags, env vars, validation, and config files from struct tags. Built on cobra

48Command LineStandard CLI
cmd

Extends the standard `flag` package to support sub commands and more in idiomatic way

47Command LineStandard CLI
mcli

A minimal but very powerful cli library for Go

47Command LineStandard CLI
phoenix

High-performance TUI framework with Elm-inspired architecture, perfect Unicode rendering, and zero-allocation event system

45Command LineAdvanced Console UIs
OpenCLI

OpenAPI-style specification for CLIs; define your interface in a language-agnostic document to generate documentation and framework boilerplate code

45Command LineStandard CLI
argv

Go library to split command line string as arguments array using the bash syntax

43Command LineStandard CLI
hashicorp/cli

Go library for implementing command-line interfaces

43Command LineStandard CLI
go-readline-ny

A customizable line-editing library with Emacs keybindings, Unicode support, completion, and syntax highlighting. Used in NYAGOS shell

37Command LineStandard CLI
go-commander

Go library to simplify CLI workflow.

35Command LineLibraries for building standard or basic Command Line applications.
carapace-spec

Define simple completions using a spec file

34Command LineStandard CLI
orpheus

CLI framework with security hardening, plugin storage system, and production observability features

34Command LineStandard CLI
goscaf

goscaf generates opinionated, production-quality Go project boilerplate via an interactive CLI. Stop copy-pasting skeleton code between projects

31Command LineAdvanced Console UIs
go-andotp

A CLI program to encrypt/decrypt [andOTP](https://github.com/andOTP/andOTP) files. Can be used as a library as well.

30Command LineLibraries for building standard or basic Command Line applications.
colourize

Go library for ANSI colour text in terminals.

27Command LineLibraries for building Console Applications and Console User Interfaces.
sand

Simple API for creating interpreters and so much more.

26Command LineLibraries for building standard or basic Command Line applications.
go-ataman

Go library for rendering ANSI colored text templates in terminals

20Command LineAdvanced Console UIs