Skip to content

Releases: charmbracelet/gum

v0.15.0

13 Jan 19:11
Compare
Choose a tag to compare

No longer a sticky situation

This release contains a small boatload of fixes and quality-of-life features across the board by the great @caarlos0 and some awesome contributors.

Most importantly we detangled Gum and Huh. The two libraries were too tightly coupled creating a difficult environment to maintain. With this separation, Gum much easier to maintain, especially for contributors. Chew on that!

General Stuff

No more weird ANSI: gum now strips ANSI sequences by default. Want β€˜em back? just add --no-strip-ansi.

We fixed some bugs with existing timeouts + they can now be used in confirm, choose, file, filter, input, pager, and spin. You can specify the units, i.e. --timeout=750ms, --timeout=1m30s

Choose

Sometimes you want the user-facing choice to be different than the outputted value. Now you can do that with --label-delimiter:

$ printf 'Pocky:0\nRamen:1\nShrimp Chips:2\n' | gum choose --label-delimiter=':'

Want to select all options by default? Use --select='*'.

$ printf 'Pocky\nRamen\nShrimp Chips\n' | gum choose  --select='*'

Confirm

No you can print the chosen value with --show-output:

$ gum confirm --show-output 'Do you agree?'
Do you agree? No
exit status 1

File

You can now add a header to your filepickers with the --header set of flags.

gum file --header="Whatcha gonna pick?"

file

For details see gum file --help.

Filter

Better delimiters, select all, and so on

Press ctrl+a to select all choices, esc to unfocus the filter field.

Want some defaults? Use --selected to preselect choices. You can also use --input-delimiter and --output-delimiter for more flexibility around input and output.

$ echo "JS|Android|iOS" | gum filter --selected='*' --input-delimiter="|" --no-limit --output-delimiter=","

Freeform input

Filter's --no-strict allows you to create a new option if no matches are found; it's essentially a free input field. Go crazy!

Sort: we fixed it

Filter's --sort would sort by score which was causing some confusion for users. To clarify this behaviour, --sort is deprecated in favour of --[no]-fuzzy-sort.

Want to sort alphabetically? Leverage the sort command in a pipeline:

$ cat input.txt | sort | gum filter --no-sort

Log

Now you can set a minimum log level with GUM_LOG_LEVEL. Valid values are debug, info, warn, error, and fatal.

Spin

You can now use --show-stdout and --show-stderr to print output:

$ gum spin --show-stdout --title "Running command..." -- sleep 10 && echo hello

Table

We expanded the table API to allow users to control more fields in csv.Reader through gum. This includes --lazy-quotes and --fields-per-record. This should fix issues with gum struggling to read CSV files properly. For details see gum table --help.

We also made a bunch of rendering improvements such as growing the table rows based on --columns, settings sane defaults widths, ignoring BOMs (byte order marks), and so on.

Changelog

New!

  • feat(choose): --selected="*" to select all by @caarlos0 in #769
  • feat(choose,filter): --input-delimiter --output-delimiter by @caarlos0 in #779
  • feat(confirm): add --show-output by @vahnrr in #427
  • feat(file): add --header by @caarlos0 in #768
  • feat(file): show permissions and size by @caarlos0 in #717
  • feat(filter): --select-if-one returns if single match by @caarlos0 in #778
  • feat(filter): allow to focus out of filter by @caarlos0 in #776
  • feat(filter): allow to pre-select items with --selected by @caarlos0 in #777
  • feat(filter): ctrl+a to toggle select all by @caarlos0 in #770
  • feat(log): support setting minimum log level with GUM_LOG_LEVEL by @caarlos0 in #723
  • feat(spin): --show-stdout --show-stderr by @caarlos0 in #774
  • feat(style): trim line spaces by @caarlos0 in #767
  • feat(table): --lazy-quotes and --fields-per-record by @caarlos0 in #759
  • feat(table): add help by @caarlos0 in #756
  • feat(table): set --print if stdout is not a terminal by @caarlos0 in #762
  • feat(version): adds command to check current gum version by @caarlos0 in #775
  • feat: adding return column to table command by @deicon in #415
  • feat: allow cursor option in file by @radar07 in #667
  • feat: esc exit 1, ctrl+c exit 130, help arrow order by @caarlos0 in #771
  • feat: handle focus/blur events by @caarlos0 in #749
  • feat: improve handling ctrl+c and timeouts by @caarlos0 in #747

Fixed

Other Stuff

New Contributors

Full Changelog: v0.14.5...v0.15.0


Verifying the artifacts

First, download the checksums.txt file, for example, with wget:

wget 'https://github.com/charmbracelet/gum/releases/download/v0.15.0/checksums.txt'

Then, verify it using cosign:

cosign verify-blob \
  --certificate-identity 'https://github.com/charmbracelet/meta/.github/workflows/goreleaser.yml@refs/heads/main' \
  --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
  --cert 'https://github.com/charmbracelet/gum/releases/download/v0.15.0/checksums.txt.pem' \
  --signature 'https://github.com/charmbracelet/gum/releases/download/v0.15.0/checksums.txt.sig' \
  ./checksums.txt

If the output is Verified OK, you can safely use it to verify the checksums of other artifacts you downloaded from the release using sha256sum:

sha256sum --ignore-missing -c checksums.txt

Done! You artifacts are now verified!

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v0.14.5

06 Sep 16:52
1917023
Compare
Choose a tag to compare

This is a small maintenance release to bump dependencies, update linter config, and adjust GoReleaser configuration.

Changelog

Bug fixes

Dependency updates

  • 6837ed2: feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661) (@dependabot[bot])
  • 8ab6253: feat(deps): bump github.com/charmbracelet/bubbletea from 1.0.0 to 1.1.0 (#665) (@dependabot[bot])
  • 65e46d6: feat(deps): bump github.com/charmbracelet/x/ansi from 0.2.2 to 0.2.3 (#656) (@dependabot[bot])

Other work


Verifying the artifacts

First, download the checksums.txt file, for example, with wget:

wget 'https://github.com/charmbracelet/gum/releases/download/v0.14.5/checksums.txt'

Then, verify it using cosign:

cosign verify-blob \
  --certificate-identity 'https://github.com/charmbracelet/meta/.github/workflows/goreleaser.yml@refs/heads/main' \
  --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
  --cert 'https://github.com/charmbracelet/gum/releases/download/v0.14.5/checksums.txt.pem' \
  --signature 'https://github.com/charmbracelet/gum/releases/download/v0.14.5/checksums.txt.sig' \
  ./checksums.txt

If the output is Verified OK, you can safely use it to verify the checksums of other artifacts you downloaded from the release using sha256sum:

sha256sum --ignore-missing -c checksums.txt

Done! You artifacts are now verified!

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v0.14.4

23 Aug 13:56
9c11289
Compare
Choose a tag to compare

Au revoir, bugs

This release fixes a buncha bugs and introduces a nice lil' quality-of-life feature.

Changelog

New!

Fixed

Deps

Docs

Other stuff


Verifying the artifacts

First, download the checksums.txt file, for example, with wget:

wget 'https://github.com/charmbracelet/gum/releases/download/v0.14.4/checksums.txt'

Then, verify it using cosign:

cosign verify-blob \
  --certificate-identity 'https://github.com/charmbracelet/meta/.github/workflows/goreleaser.yml@refs/heads/main' \
  --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
  --cert 'https://github.com/charmbracelet/gum/releases/download/v0.14.4/checksums.txt.pem' \
  --signature 'https://github.com/charmbracelet/gum/releases/download/v0.14.4/checksums.txt.sig' \
  ./checksums.txt

If the output is Verified OK, you can safely use it to verify the checksums of other artifacts you downloaded from the release using sha256sum:

sha256sum --ignore-missing -c checksums.txt

Done! You artifacts are now verified!

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v0.14.3

24 Jul 20:48
v0.14.3
Compare
Choose a tag to compare

Fixin’ more bugs

Hot on the heels of the last release (very hot, in fact), here’s one more quick point release to fix a regression in spinner.


Verifying the artifacts

First, download the checksums.txt file, for example, with wget:

wget 'https://github.com/charmbracelet/gum/releases/download/v0.14.3/checksums.txt'

Then, verify it using cosign:

cosign verify-blob \
  --certificate-identity 'https://github.com/charmbracelet/meta/.github/workflows/goreleaser.yml@refs/heads/main' \
  --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
  --cert 'https://github.com/charmbracelet/gum/releases/download/v0.14.3/checksums.txt.pem' \
  --signature 'https://github.com/charmbracelet/gum/releases/download/v0.14.3/checksums.txt.sig' \
  ./checksums.txt

If the output is Verified OK, you can safely use it to verify the checksums of other artifacts you downloaded from the release using sha256sum:

sha256sum --ignore-missing -c checksums.txt

Done! You artifacts are now verified!

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v0.14.2

24 Jul 19:26
Compare
Choose a tag to compare

Fixin’ bugs

This is a maintenance release to pull in various fixes from huh upstream. As a bonus, macOS binaries are now also signed and notarized courtesy @goreleaser.

Thanks for using Gum!

Changelog

New

  • sign and notarize macos binaries in #612

Changed

  • use in-house utility packages in #616

Fixed

  • drop left padding in choose in #597
  • fix race conditon where spinner could mis-render in #621
  • fix a bug where choose could crash when spacebar is pressed twice #587
  • fix a bug where the foreground color could not be set in choose #614
  • fix a bug where foreground could not be set in write #583
  • fix a bug where keypresses could crash choose #580
  • restore y/n keybindings to confirm #568
  • restore centering to buttons in confirm #566

New Contributors

Full Changelog: v0.14.1...v0.14.2


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or Discord.

v0.14.1

25 May 19:05
v0.14.1
657c76e
Compare
Choose a tag to compare

What's Changed

Fixes

New Contributors

Full Changelog: v0.14.0...v0.14.1


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or Discord.

v0.14.0

29 Apr 18:29
v0.14.0
295a671
Compare
Choose a tag to compare

Gum + Huh?

Gum v0.14.0 is a major internal refactor which uses huh? internally for choose, confirm, file, input, write inputs!

All functionality remains the same, but you will notice some minor visual changes / improvements.

If you haven't already, check it out:




Changes

New Contributors

Full Changelog: v0.13.0...v0.14.0


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or Slack.

v0.13.0

12 Dec 16:59
v0.13.0
a11d1ff
Compare
Choose a tag to compare

Changelog

New Features

Add --select-if-one flag to gum choose and gum filter.

> gum choose --select-if-one "option"
> option

Bug fixes


Verifying the artifacts

First, download the checksums.txt file, for example, with wget:

wget 'https://github.com/charmbracelet/gum/releases/download/v0.13.0/checksums.txt'

Then, verify it using cosign:

cosign verify-blob \
  --certificate-identity 'https://github.com/charmbracelet/meta/.github/workflows/goreleaser.yml@refs/heads/main' \
  --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
  --cert 'https://github.com/charmbracelet/gum/releases/download/v0.13.0/checksums.txt.pem' \
  --signature 'https://github.com/charmbracelet/gum/releases/download/v0.13.0/checksums.txt.sig' \
  ./checksums.txt

If the output is Verified OK, you can safely use it to verify the checksums of other artifacts you downloaded from the release using sha256sum:

sha256sum --ignore-missing -c checksums.txt

Done! You artifacts are now verified!

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v0.12.0

27 Nov 20:42
v0.12.0
dd557ba
Compare
Choose a tag to compare

Gum Log πŸͺ΅

Version 0.12.0 of gum features a brand new log command. Gum log logs messages to the terminal at using different levels and styling using the charmbracelet/log library.

To get started, simply run:

gum log
# Log some debug information.
gum log --structured --level debug "Creating file..." name file.txt
# DEBUG Unable to create file. name=temp.txt

# Log some error.
gum log --structured --level error "Unable to create file." name file.txt
# ERROR Unable to create file. name=temp.txt

See charmbracelet/log for more usage.

Running gum log with debug and error levels

What's Changed

New Contributors

Full Changelog: v0.11.0...v0.12.0


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v0.11.0

21 Jul 20:55
v0.11.0
f5b09a4
Compare
Choose a tag to compare

Pager Search, Timeouts, and Bug fixes

This release of Gum includes several features and bug fixes to make your Gum usage more smooooth! 🧈

What’s Changed

New

  • Pager search functionality (by @MikaelFangel) in #321
  • Strip ANSI for gum filter and gum choose when output is not a TTY
  • Non-positive widths will cause gum write will use the entire terminal width
  • GUM_FORMAT_THEME / GUM_FORMAT_LANGUAGE environment variables
  • --no-sort flag for gum filter
  • Customizable cursor modes
  • Customizable cursor line text
  • Add --timeout flag to all subcommands (by @deicon)

Fixed

  • Respect file path argument in filepicker

Other stuff

  • Switch to termenv.EnvColorProfile() by @kennyp in #387

New Contributors

Full Changelog: v0.10.0...v0.11.0


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.