Skip to content

Instantly share code, notes, and snippets.

@mikybars
Last active March 2, 2023 09:28
Show Gist options
  • Save mikybars/6d6178a9fe2db23badf56da35bc8da39 to your computer and use it in GitHub Desktop.
Save mikybars/6d6178a9fe2db23badf56da35bc8da39 to your computer and use it in GitHub Desktop.
πŸŽ€ A swiss knife tool for writing beautiful CLIs in Bash
#!/bin/sh
# https://github.com/charmbracelet/gum
# More examples: https://github.com/charmbracelet/gum/tree/main/examples
gum choose "fix" "feat" "docs" "style" "refactor" "test" "chore" "revert"
# Input with placeholder
gum input --placeholder "Summary of this change"
# Multi-line input
gum write --placeholder "Details of this change (CTRL+D to finish)"
# Spinners
gum spin --spinner line --show-output --title "Listing bucket..." -- aws s3 ls s3://my-bucket
# Pager
gum pager < README.md
# File selection
gum file $HOME
# Select a row from some tabular data
gum table < flavors.csv | cut -d ',' -f 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment