Skip to content

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
Step-by-step guide: how to use gumInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    macOS or Linux via Homebrew

    brew install gum

    Arch Linux

    pacman -S gum

    Fedora or EPEL 10

    dnf install gum

    Install with Go

    go install charm.land/gum/v2@latest
  2. 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. 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

ProjectStarsTypeLevelUpdatedBest for
gum (this)24.6kCLIbeginner5 days agoDevelopers who write bash scripts or dotfile aliases and want simple interactive prompts
fzf83.9kDev toolbeginner8 days agoCommand-line users who often search file names or command history
zoxide40.4kDev toolbeginner4 days agoDevelopers who move between many project folders in a terminal
nvm95.7kDev toolbeginner8 days agoDevelopers who work on several Node.js projects that need different versions
pure-bash-bible41.7kLearning resourceintermediate2.9 years agoBash scripters who want fewer external dependencies in their scripts
atuin32.2kDev toolbeginner4 days agoDevelopers 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.