
gum
A command-line tool that gives shell scripts prompts, menus, spinners and styled text.
- Stars
- 24.6k
- Forks
- 564
- Licence
- MIT
- Language
- Go
- Last update
- 5 days ago
- Type
- CLI
What it is
Gum is a command-line tool for adding interactive pieces to shell scripts and aliases, such as menus to pick an option, text prompts, confirmation questions, file pickers, spinners and styled output. It lets you do this without writing Go or any other program, since each feature is a single command you call from bash or a similar shell. The README shows it being used to build a guided Conventional Commits helper.
- Ask a user to choose a commit type from a list with gum choose, then save the answer to a variable
- Prompt for a password or text input with gum input and write it to a file
- Ask for confirmation with gum confirm before running a destructive command
- Show a spinner with gum spin while a command such as sleep runs
- Render styled text or a bordered box with gum style
Great for
- Developers who write bash scripts or dotfile aliases and want simple interactive prompts
- People building small personal command-line helpers that ask the user questions
- Anyone who wants a spinner or styled box around a long-running shell command
- Teams that want consistent prompts across scripts without building their own UI
Not ideal for
- Projects that need a full graphical or web interface, since gum only works in the terminal
- Complex interactive applications, because gum is aimed at short prompts inside scripts rather than large programs
- Environments where you cannot install a binary, since gum is a separate program that must be present on the machine
How to get it
- 1
Install with a package manager
macOS or Linux via Homebrew
brew install gumArch Linux
pacman -S gumFedora or EPEL 10
dnf install gumInstall with Go
go install charm.land/gum/v2@latest - 2
Run it
- Install gum using one of the package manager commands above
- Run gum choose "fix" "feat" "docs" to see a menu in your terminal
- Run gum input --placeholder "scope" to try a text prompt
- Run gum <command> --help to see the options for any command
- 3
Get the most out of it
- Use --flags or GUM_<COMMAND>_* environment variables to set colors, prompts and widths once in your dotfiles
- Use gum spin with --show-output when you need to see the output of the command being run
- Use gum filter with --limit or --no-limit to allow selecting several items from a list
- Pipe data into gum choose, gum filter or gum table from other commands, as shown in the README examples
Downloads
Strengths
- Adds interactive prompts to shell scripts with single commands and no Go code required
- Install options span many package managers and platforms, including Homebrew, apt, dnf, Nix and WinGet
- Customizable through command-line flags and environment variables
Trade-offs
- Only useful inside a terminal workflow, so it is not a general-purpose application
- Relies on the user's shell and environment; the README does not detail behavior across every shell
- Some features, such as table, show no demo GIF in the README, so their behavior is documented less fully
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| gum (this) | 24.6k | CLI | beginner | 5 days ago | Developers who write bash scripts or dotfile aliases and want simple interactive prompts |
| fzf | 83.9k | Dev tool | beginner | 8 days ago | Command-line users who often search file names or command history |
| zoxide | 40.4k | Dev tool | beginner | 4 days ago | Developers who move between many project folders in a terminal |
| nvm | 95.7k | Dev tool | beginner | 8 days ago | Developers who work on several Node.js projects that need different versions |
| pure-bash-bible | 41.7k | Learning resource | intermediate | 2.9 years ago | Bash scripters who want fewer external dependencies in their scripts |
| atuin | 32.2k | Dev tool | beginner | 4 days ago | Developers who work in a terminal and often need to find past commands |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.