Skip to content

[plan] Upgrade charmbracelet/huh to charm.land/huh/v2 v2.0.3 #24313

Description

@github-actions

Objective

Upgrade the charmbracelet/huh interactive form library from github.com/charmbracelet/huh v0.8.0 to charm.land/huh/v2 v2.0.3, removing the orphan github.com/charmbracelet/lipgloss v1 dependency that exists solely due to huh v0.8.0.

Context

From discussion #24261 (Go Fan module review). gh-aw has already migrated to:

  • charm.land/bubbletea/v2 v2.0.2
  • charm.land/lipgloss/v2 v2.0.2
  • charm.land/bubbles/v2 v2.1.0

But huh is still on the old path, forcing github.com/charmbracelet/lipgloss v1 to remain as an orphan dependency. There's even a comment in pkg/styles/huh_theme.go acknowledging this workaround.

Steps

  1. Run go get charm.land/huh/v2@v2.0.3
  2. Update all 13 import sites across pkg/console/ and pkg/cli/ from github.com/charmbracelet/huh → charm.land/huh/v2 (can use sed -i 's|github.com/charmbracelet/huh|charm.land/huh/v2|g' $(grep -rl 'github.com/charmbracelet/huh' --include='*.go'))
  3. Fix any compilation errors from API changes between v0 and v2 (see upgrade guide at github.com/charmbracelet/huh releases)
  4. Run go mod tidy to remove github.com/charmbracelet/huh and github.com/charmbracelet/lipgloss (v1) from go.mod/go.sum
  5. Verify github.com/charmbracelet/lipgloss no longer appears in go.mod as a direct dependency

Files to Modify

  • go.mod / go.sum — dependency update
  • All 13 files in pkg/console/ and pkg/cli/ that import github.com/charmbracelet/huh
  • pkg/styles/huh_theme.go — import change from github.com/charmbracelet/lipgloss to charm.land/lipgloss/v2 (v1 only needed for huh compat)

Acceptance Criteria

  • go.mod no longer contains github.com/charmbracelet/huh
  • go.mod no longer contains github.com/charmbracelet/lipgloss as a direct dependency
  • All imports updated to charm.land/huh/v2
  • make build succeeds
  • make test-unit passes
  • Interactive forms still work (forms render, selections work)

Generated by Plan Command for issue #discussion #24261 · ● 188.9K · ◷

  • expires on Apr 5, 2026, 1:46 PM UTC

Activity

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions