{"name":"Gum: Glamorous Shell Scripts with Interactive UI Components","description":"Gum is a command-line tool from Charmbracelet designed to inject glamorous, interactive UI components into your shell scripts. It empowers developers to create engaging command-line experiences, leveraging the power of Bubbles and Lip Gloss without needing to write Go code. Easily add prompts, spinners, tables, and other interactive elements to make your scripts more user-friendly and visually appealing.","github":"https://github.com/charmbracelet/gum","url":"https://osrepos.com/repo/charmbracelet-gum","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/charmbracelet-gum","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/charmbracelet-gum.md","json":"https://osrepos.com/repo/charmbracelet-gum.json","topics":["bash","shell","Go","cli-tools","interactive-ui","developer-tools"],"keywords":["bash","shell","Go","cli-tools","interactive-ui","developer-tools"],"stars":null,"summary":"Gum is a command-line tool from Charmbracelet designed to inject glamorous, interactive UI components into your shell scripts. It empowers developers to create engaging command-line experiences, leveraging the power of Bubbles and Lip Gloss without needing to write Go code. Easily add prompts, spinners, tables, and other interactive elements to make your scripts more user-friendly and visually appealing.","content":"## Introduction\n\nGum is an open-source command-line tool developed by Charmbracelet, renowned for creating visually stunning and highly functional terminal applications. It enables you to enhance your shell scripts with a variety of interactive UI components, transforming mundane scripts into glamorous and user-friendly experiences. Built on top of Charmbracelet's popular Bubbles and Lip Gloss libraries, Gum provides ready-to-use utilities like input prompts, confirmations, file pickers, spinners, and more, all accessible directly from your Bash or Zsh scripts.\n\n## Installation\n\nInstalling Gum is straightforward, with multiple options available depending on your operating system and preferred package manager.\n\n**Using a package manager:**\n\nbash\n# macOS or Linux\nbrew install gum\n\n# Arch Linux\npacman -S gum\n\n# Nix\nnix-env -iA nixpkgs.gum\n\n# Flox\nflox install gum\n\n# Windows (via WinGet or Scoop)\nwinget install charmbracelet.gum\nscoop install charm-gum\n\n\nFor Debian/Ubuntu, Fedora/RHEL/OpenSuse, and FreeBSD, detailed instructions are available in the official [Gum README](https://github.com/charmbracelet/gum#installation){target=\"_blank\"}.\n\n**Download binaries or packages:**\n\nPre-compiled [packages and binaries](https://github.com/charmbracelet/gum/releases){target=\"_blank\"} are available for various platforms including Linux, macOS, Windows, and BSDs.\n\n**Install with Go:**\n\nIf you have Go installed, you can also install Gum directly:\n\nbash\ngo install github.com/charmbracelet/gum@latest\n\n\n## Examples\n\nGum offers a wide array of commands to make your shell scripts more interactive and powerful. Here are a few examples demonstrating its utility:\n\n**1. Crafting Conventional Commits:**\nCombine `gum choose`, `gum input`, and `gum write` to create a guided commit message workflow.\n\nbash\nTYPE=$(gum choose \"fix\" \"feat\" \"docs\" \"style\" \"refactor\" \"test\" \"chore\" \"revert\")\nSCOPE=$(gum input --placeholder \"scope\")\nSUMMARY=$(gum input --value \"$TYPE$SCOPE: \" --placeholder \"Summary of this change\")\nDESCRIPTION=$(gum write --placeholder \"Details of this change\")\ngum confirm \"Commit changes?\" && git commit -m \"$SUMMARY\" -m \"$DESCRIPTION\"\n\n\n**2. Interactive File Selection for Editor:**\nOpen a file selected interactively using `gum file`.\n\nbash\n$EDITOR $(gum file $HOME)\n\n\n**3. Selecting a `tmux` Session:**\nFilter and select an active `tmux` session.\n\nbash\nSESSION=$(tmux list-sessions -F \\#S | gum filter --placeholder \"Pick session...\")\ntmux switch-client -t \"$SESSION\" || tmux attach -t \"$SESSION\"\n\n\n**4. Uninstalling Multiple Packages:**\nInteractively choose multiple packages to uninstall using `gum choose`.\n\nbash\nbrew list | gum choose --no-limit | xargs brew uninstall\n\n\nFor more examples and detailed usage, refer to the [examples directory](https://github.com/charmbracelet/gum/tree/main/examples){target=\"_blank\"} in the repository.\n\n## Why Use Gum?\n\nGum empowers developers to elevate their shell scripts from basic automation to sophisticated, interactive command-line applications.\n*   **Enhanced User Experience:** Replace plain text prompts with visually appealing and interactive elements like spinners, choices, and input fields.\n*   **Simplified Scripting:** Leverage pre-built, highly configurable UI components without needing to delve into complex UI programming or Go development.\n*   **Increased Productivity:** Streamline workflows by making scripts more intuitive and less error-prone, guiding users through complex operations.\n*   **Modern Aesthetics:** Bring the signature Charmbracelet style, known for its elegant and minimalist design, directly to your terminal scripts.\n\n## Links\n\n*   **GitHub Repository:** [https://github.com/charmbracelet/gum](https://github.com/charmbracelet/gum){target=\"_blank\"}\n*   **Go Documentation:** [https://pkg.go.dev/github.com/charmbracelet/gum?tab=doc](https://pkg.go.dev/github.com/charmbracelet/gum?tab=doc){target=\"_blank\"}\n*   **Releases:** [https://github.com/charmbracelet/gum/releases](https://github.com/charmbracelet/gum/releases){target=\"_blank\"}\n*   **Charmbracelet Website:** [https://charm.sh/](https://charm.sh/){target=\"_blank\"}","metrics":{"detailViews":3,"githubClicks":5},"dates":{"published":null,"modified":"2025-12-20T20:00:47.000Z"}}