gum
A command-line tool for adding attractive interactivity to shell scripts.
Subcommands
choose
Selects one or more values from a given list of options. Unlike filter
, choose
does not allow the user to search through the list.
confirm
Prompts for confirmation, returning 0
on an affirmative answer and 1
on a negative one. This leads to the general form gum confirm && YES_CMD || NO_CMD
.
gum confirm && ls || echo "never mind"
file
Navigates through a given path to select and output a filename.
filter
Chooses one or more values from a newline-separated list.
format
Renders the input as a Go template.
input
Requests a single line of input, printing the output.
join
Joins text horizontally or vertically.
pager
Pages through data passed to stdin.
spin
Displays a spinner for the duration of a command. Available spinners include:
-
line
-
dot (default)
-
minidot
-
jump
-
pulse
-
points
-
globe
-
moon
-
monkey
-
meter
-
hamburger
style
Applies text styling to its input.
table
Renders a table of data. By default, it expects the data to be in CSV format.
write
Multi-line text input with complete cursor-based editing.