[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4759":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},4759,"gum","charmbracelet\u002Fgum","charmbracelet","A tool for glamorous shell scripts 🎀","",null,"Go",23931,517,67,124,0,27,140,405,108,43.14,"MIT License",false,"main",true,[27,28],"bash","shell","2026-06-12 02:01:03","# Gum\n\n\u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fstuff.charm.sh\u002Fgum\u002Fnutritional-information.png\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fstuff.charm.sh\u002Fgum\u002Fgum.png\" alt=\"Gum Image\" width=\"450\" \u002F>\u003C\u002Fa>\n    \u003Cbr>\u003Cbr>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fgum\u002Freleases\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frelease\u002Fcharmbracelet\u002Fgum.svg\" alt=\"Latest Release\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fcharmbracelet\u002Fgum?tab=doc\">\u003Cimg src=\"https:\u002F\u002Fgodoc.org\u002Fgithub.com\u002Fgolang\u002Fgddo?status.svg\" alt=\"Go Docs\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fgum\u002Factions\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fgum\u002Fworkflows\u002Fbuild\u002Fbadge.svg\" alt=\"Build Status\">\u003C\u002Fa>\n\u003C\u002Fp>\n\nA tool for glamorous shell scripts. Leverage the power of\n[Bubbles](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fbubbles) and [Lip\nGloss](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Flipgloss) in your scripts and aliases\nwithout writing any Go code!\n\n\u003Cimg alt=\"Shell running the .\u002Fdemo.sh script\" width=\"600\" src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-1qY57RrQlXCuydsEgDp68G.gif\">\n\nThe above example is running from a single shell script ([source](.\u002Fexamples\u002Fdemo.sh)).\n\n## Tutorial\n\nGum provides highly configurable, ready-to-use utilities to help you write\nuseful shell scripts and dotfile aliases with just a few lines of code.\nLet's build a simple script to help you write\n[Conventional Commits](https:\u002F\u002Fwww.conventionalcommits.org\u002Fen\u002Fv1.0.0\u002F#summary)\nfor your dotfiles.\n\nAsk for the commit type with gum choose:\n\n```bash\ngum choose \"fix\" \"feat\" \"docs\" \"style\" \"refactor\" \"test\" \"chore\" \"revert\"\n```\n\n> [!NOTE]\n> This command itself will print to stdout which is not all that useful. To make use of the command later on you can save the stdout to a `$VARIABLE` or `file.txt`.\n\nPrompt for the scope of these changes:\n\n```bash\ngum input --placeholder \"scope\"\n```\n\nPrompt for the summary and description of changes:\n\n```bash\ngum input --value \"$TYPE$SCOPE: \" --placeholder \"Summary of this change\"\ngum write --placeholder \"Details of this change\"\n```\n\nConfirm before committing:\n\n```bash\ngum confirm \"Commit changes?\" && git commit -m \"$SUMMARY\" -m \"$DESCRIPTION\"\n```\n\nCheck out the [complete example](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fgum\u002Fblob\u002Fmain\u002Fexamples\u002Fcommit.sh) for combining these commands in a single script.\n\n\u003Cimg alt=\"Running the .\u002Fexamples\u002Fcommit.sh script to commit to git\" width=\"600\" src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-7rRq3LsEuJVwhwr0xf6Er7.gif\">\n\n## Installation\n\nUse a package manager:\n\n```bash\n# macOS or Linux\nbrew install gum\n\n# Arch Linux (btw)\npacman -S gum\n\n# Fedora or EPEL 10\ndnf install 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\n\u003Cdetails>\n\u003Csummary>Debian\u002FUbuntu\u003C\u002Fsummary>\n\n```bash\nsudo mkdir -p \u002Fetc\u002Fapt\u002Fkeyrings\ncurl -fsSL https:\u002F\u002Frepo.charm.sh\u002Fapt\u002Fgpg.key | sudo gpg --dearmor -o \u002Fetc\u002Fapt\u002Fkeyrings\u002Fcharm.gpg\necho \"deb [signed-by=\u002Fetc\u002Fapt\u002Fkeyrings\u002Fcharm.gpg] https:\u002F\u002Frepo.charm.sh\u002Fapt\u002F * *\" | sudo tee \u002Fetc\u002Fapt\u002Fsources.list.d\u002Fcharm.list\nsudo apt update && sudo apt install gum\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>Fedora\u002FRHEL\u002FOpenSuse\u003C\u002Fsummary>\n\n```bash\necho '[charm]\nname=Charm\nbaseurl=https:\u002F\u002Frepo.charm.sh\u002Fyum\u002F\nenabled=1\ngpgcheck=1\ngpgkey=https:\u002F\u002Frepo.charm.sh\u002Fyum\u002Fgpg.key' | sudo tee \u002Fetc\u002Fyum.repos.d\u002Fcharm.repo\nsudo rpm --import https:\u002F\u002Frepo.charm.sh\u002Fyum\u002Fgpg.key\n\n# yum\nsudo yum install gum\n\n# zypper\nsudo zypper refresh\nsudo zypper install gum\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>FreeBSD\u003C\u002Fsummary>\n\n```bash\n# packages\nsudo pkg install gum\n\n# ports\ncd \u002Fusr\u002Fports\u002Fdevel\u002Fgum && sudo make install clean\n```\n\n\u003C\u002Fdetails>\n\nOr download it:\n\n- [Packages][releases] are available in Debian, RPM, and Alpine formats\n- [Binaries][releases] are available for Linux, macOS, Windows, FreeBSD, OpenBSD, and NetBSD\n\nOr just install it with `go`:\n\n```bash\ngo install github.com\u002Fcharmbracelet\u002Fgum@latest\n```\n\n[releases]: https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fgum\u002Freleases\n\n## Commands\n\n- [`choose`](#choose): Choose an option from a list of choices\n- [`confirm`](#confirm): Ask a user to confirm an action\n- [`file`](#file): Pick a file from a folder\n- [`filter`](#filter): Filter items from a list\n- [`format`](#format): Format a string using a template\n- [`input`](#input): Prompt for some input\n- [`join`](#join): Join text vertically or horizontally\n- [`pager`](#pager): Scroll through a file\n- [`spin`](#spin): Display spinner while running a command\n- [`style`](#style): Apply coloring, borders, spacing to text\n- [`table`](#table): Render a table of data\n- [`write`](#write): Prompt for long-form text\n- [`log`](#log): Log messages to output\n\n## Customization\n\nYou can customize `gum` options and styles with `--flags` and `$ENVIRONMENT_VARIABLES`.\nSee `gum \u003Ccommand> --help` for a full view of each command's customization and configuration options.\n\nCustomize with `--flags`:\n\n```bash\n\ngum input --cursor.foreground \"#FF0\" \\\n          --prompt.foreground \"#0FF\" \\\n          --placeholder \"What's up?\" \\\n          --prompt \"* \" \\\n          --width 80 \\\n          --value \"Not much, hby?\"\n```\n\nCustomize with `ENVIRONMENT_VARIABLES`:\n\n```bash\nexport GUM_INPUT_CURSOR_FOREGROUND=\"#FF0\"\nexport GUM_INPUT_PROMPT_FOREGROUND=\"#0FF\"\nexport GUM_INPUT_PLACEHOLDER=\"What's up?\"\nexport GUM_INPUT_PROMPT=\"* \"\nexport GUM_INPUT_WIDTH=80\n\n# --flags can override values set with environment\ngum input\n```\n\n\u003Cimg alt=\"Gum input displaying most customization options\" width=\"600\" src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-5zb9DlQYA70aL9ZpYLTwKv.gif\">\n\n## Input\n\nPrompt for input with a simple command.\n\n```bash\ngum input > answer.txt\ngum input --password > password.txt\n```\n\n\u003Cimg src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-1nScrStFI3BMlCp5yrLtyg.gif\" width=\"600\" alt=\"Shell running gum input typing Not much, you?\" \u002F>\n\n## Write\n\nPrompt for some multi-line text (`ctrl+d` to complete text entry).\n\n```bash\ngum write > story.txt\n```\n\n\u003Cimg src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-7abdKKrUEukgx9aJj8O5GX.gif\" width=\"600\" alt=\"Shell running gum write typing a story\" \u002F>\n\n## Filter\n\nFilter a list of values with fuzzy matching:\n\n```bash\necho Strawberry >> flavors.txt\necho Banana >> flavors.txt\necho Cherry >> flavors.txt\ngum filter \u003C flavors.txt > selection.txt\n```\n\n\u003Cimg src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-61euOQtKPtQVD7nDpHQhzr.gif\" width=\"600\" alt=\"Shell running gum filter on different bubble gum flavors\" \u002F>\n\nSelect multiple options with the `--limit` flag or `--no-limit` flag. Use `tab` or `ctrl+space` to select, `enter` to confirm.\n\n```bash\ncat flavors.txt | gum filter --limit 2\ncat flavors.txt | gum filter --no-limit\n```\n\n## Choose\n\nChoose an option from a list of choices.\n\n```bash\necho \"Pick a card, any card...\"\nCARD=$(gum choose --height 15 {{A,K,Q,J},{10..2}}\" \"{♠,♥,♣,♦})\necho \"Was your card the $CARD?\"\n```\n\nYou can also select multiple items with the `--limit` or `--no-limit` flag, which determines\nthe maximum of items that can be chosen.\n\n```bash\ncat songs.txt | gum choose --limit 5\ncat foods.txt | gum choose --no-limit --header \"Grocery Shopping\"\n```\n\n\u003Cimg src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-3zV1LvofA6Cbn5vBu1NHHl.gif\" width=\"600\" alt=\"Shell running gum choose with numbers and gum flavors\" \u002F>\n\n## Confirm\n\nConfirm whether to perform an action. Exits with code `0` (affirmative) or `1`\n(negative) depending on selection.\n\n```bash\ngum confirm && rm file.txt || echo \"File not removed\"\n```\n\n\u003Cimg src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-3xRFvbeQ4lqGerbHY7y3q2.gif\" width=\"600\" alt=\"Shell running gum confirm\" \u002F>\n\n## File\n\nPrompt the user to select a file from the file tree.\n\n```bash\n$EDITOR $(gum file $HOME)\n```\n\n\u003Cimg src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-2RMRqmnOPneneIgVJJ3mI1.gif\" width=\"600\" alt=\"Shell running gum file\" \u002F>\n\n## Pager\n\nScroll through a long document with line numbers and a fully customizable viewport.\n\n```bash\ngum pager \u003C README.md\n```\n\n\u003Cimg src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-3iMDpgOLmbYr0jrYEGbk7p.gif\" width=\"600\" alt=\"Shell running gum pager\" \u002F>\n\n## Spin\n\nDisplay a spinner while running a script or command. The spinner will\nautomatically stop after the given command exits.\n\nTo view or pipe the command's output, use the `--show-output` flag.\n\n```bash\ngum spin --spinner dot --title \"Buying Bubble Gum...\" -- sleep 5\n```\n\n\u003Cimg src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-3YFswCmoY4o3Q7MyzWl6sS.gif\" width=\"600\" alt=\"Shell running gum spin while sleeping for 5 seconds\" \u002F>\n\nAvailable spinner types include: `line`, `dot`, `minidot`, `jump`, `pulse`, `points`, `globe`, `moon`, `monkey`, `meter`, `hamburger`.\n\n## Table\n\nSelect a row from some tabular data.\n\n```bash\ngum table \u003C flavors.csv | cut -d ',' -f 1\n```\n\n\u003C!-- \u003Cimg src=\"https:\u002F\u002Fstuff.charm.sh\u002Fgum\u002Ftable.gif\" width=\"600\" alt=\"Shell running gum table\" \u002F> -->\n\n## Style\n\nPretty print any string with any layout with one command.\n\n```bash\ngum style \\\n\t--foreground 212 --border-foreground 212 --border double \\\n\t--align center --width 50 --margin \"1 2\" --padding \"2 4\" \\\n\t'Bubble Gum (1¢)' 'So sweet and so fresh!'\n```\n\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fgum\u002Fassets\u002F42545625\u002F67468acf-b3e0-4e78-bd89-360739eb44fa\" width=\"600\" alt=\"Bubble Gum, So sweet and so fresh!\" \u002F>\n\n## Join\n\nCombine text vertically or horizontally. Use this command with `gum style` to\nbuild layouts and pretty output.\n\nTip: Always wrap the output of `gum style` in quotes to preserve newlines\n(`\\n`) when using it as an argument in the `join` command.\n\n```bash\nI=$(gum style --padding \"1 5\" --border double --border-foreground 212 \"I\")\nLOVE=$(gum style --padding \"1 4\" --border double --border-foreground 57 \"LOVE\")\nBUBBLE=$(gum style --padding \"1 8\" --border double --border-foreground 255 \"Bubble\")\nGUM=$(gum style --padding \"1 5\" --border double --border-foreground 240 \"Gum\")\n\nI_LOVE=$(gum join \"$I\" \"$LOVE\")\nBUBBLE_GUM=$(gum join \"$BUBBLE\" \"$GUM\")\ngum join --align center --vertical \"$I_LOVE\" \"$BUBBLE_GUM\"\n```\n\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fgum\u002Fassets\u002F42545625\u002F68f7a25d-b495-48dd-982a-cee0c8ea5786\" width=\"600\" alt=\"I LOVE Bubble Gum written out in four boxes with double borders around them.\" \u002F>\n\n## Format\n\n`format` processes and formats bodies of text. `gum format` can parse markdown,\ntemplate strings, and named emojis.\n\n```bash\n# Format some markdown\ngum format -- \"# Gum Formats\" \"- Markdown\" \"- Code\" \"- Template\" \"- Emoji\"\necho \"# Gum Formats\\n- Markdown\\n- Code\\n- Template\\n- Emoji\" | gum format\n\n# Syntax highlight some code\ncat main.go | gum format -t code\n\n# Render text any way you want with templates\necho '{{ Bold \"Tasty\" }} {{ Italic \"Bubble\" }} {{ Color \"99\" \"0\" \" Gum \" }}' \\\n    | gum format -t template\n\n# Display your favorite emojis!\necho 'I :heart: Bubble Gum :candy:' | gum format -t emoji\n```\n\nFor more information on template helpers, see the [Termenv\ndocs](https:\u002F\u002Fgithub.com\u002Fmuesli\u002Ftermenv#template-helpers). For a full list of\nnamed emojis see the [GitHub API](https:\u002F\u002Fapi.github.com\u002Femojis).\n\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fgum\u002Fassets\u002F42545625\u002F5cfbb0c8-0022-460d-841b-fec37527ca66\" width=\"300\" alt=\"Running gum format for different types of formats\" \u002F>\n\n## Log\n\n`log` logs messages to the terminal using different levels and styling using\nthe [`charmbracelet\u002Flog`](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Flog) library.\n\n```bash\n# Log some debug information.\ngum log --structured --level debug \"Creating file...\" name file.txt\n# DEBUG Creating file... name=file.txt\n\n# Log some error.\ngum log --structured --level error \"Unable to create file.\" name file.txt\n# ERROR Unable to create file. name=temp.txt\n\n# Include a timestamp.\ngum log --time rfc822 --level error \"Unable to create file.\"\n```\n\nSee the Go [`time` package](https:\u002F\u002Fpkg.go.dev\u002Ftime#pkg-constants) for acceptable `--time` formats.\n\nSee [`charmbracelet\u002Flog`](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Flog) for more usage.\n\n\u003Cimg src=\"https:\u002F\u002Fvhs.charm.sh\u002Fvhs-6jupuFM0s2fXiUrBE0I1vU.gif\" width=\"600\" alt=\"Running gum log with debug and error levels\" \u002F>\n\n## Examples\n\nHow to use `gum` in your daily workflows:\n\nSee the [examples](.\u002Fexamples\u002F) directory for more real world use cases.\n\n- Write a commit message:\n\n```bash\ngit commit -m \"$(gum input --width 50 --placeholder \"Summary of changes\")\" \\\n           -m \"$(gum write --width 80 --placeholder \"Details of changes\")\"\n```\n\n- Open files in your `$EDITOR`\n\n```bash\n$EDITOR $(gum filter)\n```\n\n- Connect to a `tmux` session\n\n```bash\nSESSION=$(tmux list-sessions -F \\#S | gum filter --placeholder \"Pick session...\")\ntmux switch-client -t \"$SESSION\" || tmux attach -t \"$SESSION\"\n```\n\n- Pick a commit hash from `git` history\n\n```bash\ngit log --oneline | gum filter | cut -d' ' -f1 # | copy\n```\n\n- Simple [`skate`](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fskate) password selector.\n\n```\nskate list -k | gum filter | xargs skate get\n```\n\n- Uninstall packages\n\n```bash\nbrew list | gum choose --no-limit | xargs brew uninstall\n```\n\n- Clean up `git` branches\n\n```bash\ngit branch | cut -c 3- | gum choose --no-limit | xargs git branch -D\n```\n\n- Checkout GitHub pull requests with [`gh`](https:\u002F\u002Fcli.github.com\u002F)\n\n```bash\ngh pr list | cut -f1,2 | gum choose | cut -f1 | xargs gh pr checkout\n```\n\n- Copy command from shell history\n\n```bash\ngum filter \u003C $HISTFILE --height 20\n```\n\n- `sudo` replacement\n\n```bash\nalias please=\"gum input --password | sudo -nS\"\n```\n\n## Contributing\n\nSee [contributing][contribute].\n\n[contribute]: https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fgum\u002Fcontribute\n\n## Feedback\n\nWe’d love to hear your thoughts on this project. Feel free to drop us a note!\n\n- [Twitter](https:\u002F\u002Ftwitter.com\u002Fcharmcli)\n- [The Fediverse](https:\u002F\u002Fmastodon.social\u002F@charmcli)\n- [Discord](https:\u002F\u002Fcharm.sh\u002Fchat)\n\n## License\n\n[MIT](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fgum\u002Fraw\u002Fmain\u002FLICENSE)\n\n---\n\nPart of [Charm](https:\u002F\u002Fcharm.sh).\n\n\u003Ca href=\"https:\u002F\u002Fcharm.sh\u002F\">\u003Cimg alt=\"The Charm logo\" src=\"https:\u002F\u002Fstuff.charm.sh\u002Fcharm-badge.jpg\" width=\"400\" \u002F>\u003C\u002Fa>\n\nCharm热爱开源 • Charm loves open source\n","Gum 是一个用于美化 shell 脚本的工具。它利用 Bubbles 和 Lip Gloss 的强大功能，允许用户在不编写 Go 代码的情况下创建具有丰富视觉效果的脚本和别名。核心功能包括选择、输入、确认等交互式命令，能够显著提升脚本的用户体验。适用于需要增强终端脚本互动性和美观性的场景，如自动化任务、CI\u002FCD 流程中的用户提示或任何希望提高脚本可读性和用户参与度的情况。",2,"2026-06-11 03:00:22","top_language"]