Skip to content

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

@github-actions

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/huhcharm.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

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions