charm-huh

Build interactive terminal forms and prompts in Go using the huh library.

1|1|Updated Jul 6, 2026
One-click install
npx skills add https://github.com/gabesan21/project-of-projects --skill charm-huh-gabesan21
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: charm-huh
Source: https://github.com/gabesan21/project-of-projects/tree/main/.agents/skills/charm-huh
Command: npx skills add https://github.com/gabesan21/project-of-projects --skill charm-huh-gabesan21

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires charm.land/huh/v2.

What problem does it solve? Collecting user input in Go terminal applications requires handling navigation, validation, rendering, and key bindings manually. This Skill provides the usage contract for the huh library so agents can correctly build forms, prompts, and spinners in the vault's Go TUIs without re-deriving the API each time. ## Core Features & Use Cases - Declarative form construction: Define forms as groups of fields (Input, Text, Select, MultiSelect, Confirm, Note, FilePicker) with variable bindings, validation, and themes. - Bubble Tea integration: Embed a huh form as a tea.Model inside a larger Bubble Tea program, or run standalone forms and single prompts directly. - Dynamic fields and spinners: Recompute options when bindings change via OptionsFunc, and show post-submit feedback with the spinner package. - Use Case: When a kanban TUI needs the user to pick a task, confirm a stage transition, or edit card fields, generate the correct huh v2 code with proper bindings, validation, and ErrUserAborted handling. ## Quick Start Ask the agent to write a Go terminal form using huh v2 that lets the user select a task from a list and confirm the action, with values bound to variables.

Frequently Asked Questions about charm-huh

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a terminal form in Go with huh?▼

Create groups of fields with huh.NewGroup, pass them to huh.NewForm, bind each field to a variable with .Value(&var), then call form.Run(). The form handles navigation, validation, and rendering on top of Bubble Tea.

What is the difference between huh v1 and huh v2?▼

huh v2 is the current line under the module path charm.land/huh/v2, while legacy v1 lives at github.com/charmbracelet/huh. The two versions must not be mixed in the same Go module.

Can I embed a huh form inside a Bubble Tea program?▼

Yes, *huh.Form is a tea.Model, so you delegate Init, Update, and View to it inside your host program. Check form.State for huh.StateCompleted to know when the user finished and the bound values are ready.

Why does my huh form exit with an error when the user presses escape?▼

form.Run() returns huh.ErrUserAborted when the user cancels with esc or ctrl+c before submitting. Treat this as a normal cancellation path rather than passing it to log.Fatal as a generic failure.

How do I make huh select options update dynamically?▼

Use OptionsFunc with a binding variable as the second argument, for example OptionsFunc(fn, &country). Without that binding the function loses its cache and re-runs on every keystroke, which can freeze the form.

Does huh support accessible mode for screen readers?▼

Yes, form.WithAccessible(true) swaps the TUI for simple prompts suitable for screen readers. Note that WithTimeout does not work in accessible mode and returns ErrTimeoutUnsupported.