non-interactive wrapper - huhx
#782
cabljac
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/cabljac/huhx
I've built some beautiful TUIs using
huhand I love it. My problem is i'm lazy and it can be a pain to drive a highly interactive TUI from an agent. From what I understand, the usual fix is a parallel flag path that duplicates your validation logic and drifts over time.This weekend I built a module
huhxto fix this. Wrap your huh form in a runner, wire up your Cobra command, and it runs as a TUI on a terminal and accepts flags, env vars, or a YAML answer file everywhere else. Same form, same validators, same branching logic.That last part is what makes it useful for agents. An LLM orchestrator can drive any huhx CLI by passing an answer file or --answer key=val flags. No terminal simulation, no stdout scraping, no separate headless mode to keep in sync.
I wondered if anyone else has had a similar issue, or whether i've missed some obvious happy path for what i'm talking about :D
Beta Was this translation helpful? Give feedback.
All reactions