Skip to content

fix(deps): update module github.com/charmbracelet/huh to v2#70

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/github.com-charmbracelet-huh-2.x
Open

fix(deps): update module github.com/charmbracelet/huh to v2#70
renovate[bot] wants to merge 1 commit intomainfrom
renovate/github.com-charmbracelet-huh-2.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 9, 2026

This PR contains the following updates:

Package Change Age Confidence
github.com/charmbracelet/huh v0.8.0v2.0.1 age confidence

Release Notes

charmbracelet/huh (github.com/charmbracelet/huh)

v2.0.1

Compare Source

This patch release includes upgrading the minimum Go version, upgrade our Bubble Tea and Lip Gloss libraries to use that latest and greatest patches. Enjoy!


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.0

Compare Source

Huh? v2?

We're thrilled to announce the second major release of Huh!

[!NOTE]
We take API changes seriously, and we want to make the upgrade process as simple as possible.

❤️ Charm Land Import Path

We've updated our import paths to use vanity domains and use our domain to import Go packages.

// Before
import "github.com/charmbracelet/huh"

// After
import "charm.land/huh/v2"

🍵 Bubble Tea v2 & Lip Gloss v2

Huh v2 is built on the all-new Bubble Tea v2 and Lip Gloss v2, bringing all their improvements along for the ride:

  • The Cursed Renderer — optimized rendering built from the ground up on the ncurses algorithm
  • Better keyboard handling — progressive keyboard enhancements for modern terminals
  • Declarative views — no more fighting over terminal state
  • Built-in color downsampling — colors "just work" everywhere
  • And much more — see the Bubble Tea v2 release notes for the full picture

All these improvements come for free. Just upgrade and enjoy the performance and stability benefits.

🎨 Simpler Theming

Themes are now passed by value instead of pointer. This makes theme handling more straightforward and predictable.

// Before
form.WithTheme(huh.ThemeCharm())

// After
form.WithTheme(huh.ThemeCharm(false)) // false for light mode

All built-in themes now take a bool parameter to indicate whether the terminal has a dark background. Huh will automatically detect your terminal's background color, but you can also provide your own custom theme function:

type ThemeFunc func(isDark bool) *Styles

form.WithTheme(myCustomTheme)

🔍 View Hooks

Want to modify your form's view before it hits the screen? Now you can with WithViewHook:

form.WithViewHook(func(v tea.View) tea.View {
    // Modify the view properties
    v.AltScreen = true
    v.MouseMode = tea.MouseModeAllMotion
    return v
})

This is perfect for dynamically controlling terminal features, applying custom view transformations, or integrating Huh forms with larger Bubble Tea applications.

♿ Simplified Accessible Mode

The separate accessibility package is gone. Accessible mode is now built directly into Huh and controlled exclusively at the form level:

// Before - individual fields had their own accessible mode
input := huh.NewInput().
    Title("Name").
    WithAccessible(true)  // ❌ No longer exists on fields

select := huh.NewSelect[string]().
    Title("Pick one").
    Options(huh.NewOptions("A", "B", "C")...).
    WithAccessible(true)  // ❌ Removed from fields too

form := huh.NewForm(
    huh.NewGroup(input, select),
)

// After - only the form controls accessible mode
input := huh.NewInput().
    Title("Name")

select := huh.NewSelect[string]().
    Title("Pick one").
    Options(huh.NewOptions("A", "B", "C")...)

form := huh.NewForm(
    huh.NewGroup(input, select),
).WithAccessible(true)  // ✅ Set once at the form level

This makes accessible mode simpler and more consistent — one setting controls the entire form.

[!TIP]
We recommend detecting accessible mode through environment variables or configuration options to let users control accessibility on their terms.

🗂️ Better Model Handling

The internal Model type is now exposed, making it easier to work with Huh forms in Bubble Tea applications. This improves type safety and makes composition patterns more natural.

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    form, cmd := m.form.Update(msg)
    if f, ok := form.(huh.Model); ok {
        m.form = &f
    }
    return m, cmd
}

🧹 Cleaner Dependencies

Huh v2 benefits from the simplified dependency tree of Bubble Tea v2 and Lip Gloss v2. This means faster builds, smaller binaries, and fewer potential version conflicts.

🌈 More on Huh v2

Ready to migrate? Head over to the Upgrade Guide for the full migration checklist.


Changelog

New!
  • 523aee782c48d9c195b0300c36ced8b0920c296c: feat(ci): use goreleaser for releases (@​aymanbagabas)
  • 3e45cdcc6ed263dc7306dbbf92f93fbca5c7f742: feat: allow to set a view hook (@​caarlos0)
Fixed
  • df2a6889cde58e82d9410a4d54c19ec160106a2b: fix(test): remove unstyled whitespace from tests (@​bashbunni)
  • 76b6bb384f256fc8853e8c7de2c03c77a13aaf79: fix: bug (@​caarlos0)
  • 7968fed4a5de5c01ad9dfbf0f3ecf12fd9d369b7: fix: clamp (@​caarlos0)
  • fc6309db33b5af1fa41413ebeef6ff20e519d008: fix: examples, tests (@​caarlos0)
  • 81023725343a33e4a5a077a81028b1ccb1c9bcac: fix: lint issues (@​caarlos0)
  • 2e53e048dc727bf1d2311bcbead3946e1209fc70: fix: reader (@​caarlos0)
  • a71c3acb7509335c36a0fb62bff2a97b39db83be: fix: remove old accessible pkg (@​caarlos0)
  • e50afa6764b918486926772f4aa155501f804a4d: fix: rename to match (@​caarlos0)
  • 555b977a3bb72d97fded8c876d8916e7daa37dc2: fix: spinner accessiblity (@​caarlos0)
  • b882a1cb97ea96a4c9e9417932352bbd15bd89da: fix: spinner output (@​caarlos0)
  • 042dfb884f515de36f2358332ede80ba2e752112: fix: tests (@​caarlos0)
  • 2785463c98f8d2f213624905dd479047083a9dce: fix: todos (@​caarlos0)
  • 12c15968d1a65a411a906633e913bfa6ff2f7a8b: fix: update glamour, log, wish (@​caarlos0)
  • 61e9d3f59a5c74665b1389fd0f03b92233ee5992: fix: update to charm.land (@​caarlos0)
  • c698df8762cd35e38d239a2656eb026c4b6f1578: fix: use lipgloss for ansi aware wrapping instead of cellbuf (@​aymanbagabas)
Docs
  • 9a596540989d05d54b15c37e164ca3af505f49a0: docs: add v2 upgrade guide (@​aymanbagabas)
Other stuff
  • fc0c3f0de1363fcf8c89a288eba2479769706131: ci: build (@​caarlos0)
  • 8c333043c08ea712de340a7c4b4e6e8e6702b90e: ci: build fix (@​caarlos0)
  • 6a0c589948266ec03fd9b7c30f20381bf8fcbd7f: ci: fix build (@​caarlos0)
  • b2ec78379b6482d31cf40e284a9f089b6e4443d0: feat!(v2): spinner does not need to be its own module (@​caarlos0)
  • ec05babba233f6cd28a87f0ef30767fd019d2855: feat!: v2 (@​caarlos0)
  • 6421b744990e34a21e87c0e44334d2f69cad9398: wip (@​caarlos0)
  • 548eedbb356a3e48f5059ef7d9d28232551c4284: wip (@​caarlos0)
  • 47e59e9fc735900ed2308cd95f48f32e033062eb: wip (@​caarlos0)
  • 1d4dd36b74f5b0fd867eba5987b999b8e06f36b9: wip: v2 (@​caarlos0)

Feedback

Have thoughts on Huh v2? We'd love to hear about it. Let us know on…


Part of Charm.

The Charm logo

Charm热爱开源 • Charm loves open source • نحنُ نحب المصادر المفتوحة

v1.0.0

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
Copy link
Contributor Author

renovate bot commented Mar 9, 2026

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: go get -t ./...
go: module github.com/charmbracelet/huh/v2@v2.0.1 requires go >= 1.25.8; switching to go1.25.8
go: downloading go1.25.8 (linux/amd64)
go: github.com/charmbracelet/huh/v2@v2.0.1: parsing go.mod:
	module declares its path as: charm.land/huh/v2
	        but was required as: github.com/charmbracelet/huh/v2

@renovate renovate bot deployed to linting March 9, 2026 14:40 Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants