Skip to content

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

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#67
renovate[bot] wants to merge 1 commit intomainfrom
renovate/github.com-charmbracelet-huh-2.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Apr 8, 2026

This PR contains the following updates:

Package Change Age Confidence
github.com/charmbracelet/huh v1.0.0v2.0.3 age confidence

Release Notes

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

v2.0.3

Compare Source

This patch release fixes two UX issues where multiline options might get cutoff when navigating, and the other is related to ensuring the viewport width is updated after a resize.

Changelog

Fixed

The Charm logo

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

v2.0.2

Compare Source

Paste Paste Paste

This patch release fixes an issue where sometimes, a paste event, might get triggered multiple times. Enjoy!

Changelog

Fixed
Docs

The Charm logo

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

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 • نحنُ نحب المصادر المفتوحة


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 renovate bot added the dependencies label Apr 8, 2026
@renovate
Copy link
Copy Markdown
Contributor Author

renovate bot commented Apr 8, 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.3 requires go >= 1.25.8; switching to go1.25.9
go: downloading go1.25.9 (linux/amd64)
go: github.com/charmbracelet/huh/v2@v2.0.3: parsing go.mod:
	module declares its path as: charm.land/huh/v2
	        but was required as: github.com/charmbracelet/huh/v2

@claude
Copy link
Copy Markdown

claude bot commented Apr 8, 2026

Claude finished @renovate[bot]'s task in 1m 10s —— View job


Code Review: fix(deps): update module github.com/charmbracelet/huh to v2

Tasks

  • Gather context and analyze PR
  • Review go.mod changes
  • Identify all huh package usages in codebase
  • Assess migration requirements
  • Post review feedback

Summary

Do not merge this PR. Renovate itself flagged it as broken, and the analysis below confirms it. Upgrading huh from v1 to v2 is a non-trivial migration that requires several coordinated changes beyond what Renovate can auto-generate.


Critical Issues

1. Wrong module path in go.mod

huh v2 changed its module path to use a vanity domain. The PR incorrectly sets:

github.com/charmbracelet/huh/v2 v2.0.3  ❌

It should be:

charm.land/huh/v2 v2.0.3  ✅

This is exactly what Renovate's own artifact error message says:

module declares its path as: charm.land/huh/v2 but was required as: github.com/charmbracelet/huh/v2

The code will not compile with the current go.mod.

2. go.sum not updated

Renovate reported it could not update go.sum (Command failed: go get -t ./...). The go.sum file still only has v1 hashes. A valid v2 import requires updated checksums.

3. Source code import path not updated

internal/prompt/prompt.go:12 still imports the old path:

import "github.com/charmbracelet/huh"

This needs to change to:

import "charm.land/huh/v2"

With the alias kept as huh for minimal churn:

import huh "charm.land/huh/v2"

4. Transitive dependency versions are stale

huh v2 is built on Bubble Tea v2 and Lip Gloss v2, but go.mod still pins v1 versions of those libraries as indirect dependencies:

github.com/charmbracelet/bubbletea v1.3.6    ❌  (needs v2.x)
github.com/charmbracelet/lipgloss v1.1.1-... ❌  (needs v2.x)
github.com/charmbracelet/bubbles v0.21.1-... ❌  (may be removed in huh v2)

These transitive deps need a full go mod tidy after the import paths and source code are corrected.


API Changes to Verify

After fixing the import path, the usage in internal/prompt/prompt.go should be checked for v2 API compatibility:

Usage Line Status
huh.NewInput() 68 Likely compatible, verify
huh.ErrUserAborted 74 Verify still exported in v2

The v2 release notes mention accessible mode is form-level only now, but this file uses huh in standalone field mode (.Run()), so that may require verification too.


What Needs to Happen

A proper v2 upgrade requires:

  1. Change go.mod require from github.com/charmbracelet/huh/v2charm.land/huh/v2
  2. Update internal/prompt/prompt.go import from github.com/charmbracelet/huhcharm.land/huh/v2
  3. Run go mod tidy to resolve all transitive dependencies (bubbletea v2, lipgloss v2, etc.)
  4. Verify the huh.ErrUserAborted and huh.NewInput().Run() API still works as expected under v2
  5. Run tests to confirm nothing regressed

This PR should be closed. A fresh branch with all of these changes made together would be the right approach.

Fix this →%20Change%20go.mod%20require%20entry%20from%20github.com%2Fcharmbracelet%2Fhuh%2Fv2%20to%20charm.land%2Fhuh%2Fv2%202)%20Update%20internal%2Fprompt%2Fprompt.go%20import%20from%20github.com%2Fcharmbracelet%2Fhuh%20to%20charm.land%2Fhuh%2Fv2%203)%20Run%20go%20mod%20tidy%20to%20update%20all%20transitive%20deps%20(bubbletea%20v2%2C%20lipgloss%20v2%2C%20etc.)%204)%20Verify%20huh.ErrUserAborted%20and%20huh.NewInput().Run()%20still%20work%20under%20v2%20API&repo=boneskull/gh-stack)

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedgithub.com/​charmbracelet/​huh/​v2@​v2.0.3100100100100100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants