Skip to main content

What the TUI is for

The TUI is the fastest way to poke at the loop without writing extra code. It is useful for:
  • trying prompts
  • watching streamed output
  • seeing when tool calls happen
  • checking that your saved provider configuration works
It is not a general CLI framework. Today it is a small interactive shell around loop.RunLoop.

Starting a session

Run:
go run .
On first run, the app launches onboarding and writes ~/.config/hrns/config.json. After that, it prints the active provider and model and waits for input.

Built-in commands

Change model

/model <model>
This updates the current provider’s saved default model in the config file.

Reset conversation

/new
This clears the accumulated conversation history.

Show help

/help
This prints the available commands.

List saved providers

/providers
This prints the names of providers stored in the config file.

Add a provider

/connect
This runs the same prompt sequence as first-run onboarding and saves another provider entry.

What gets streamed back

The loop emits chunk types and the TUI renders them differently:
  • assistant text chunks
  • reasoning chunks
  • tool call start notifications
  • error chunks
Tool-call results are used to continue the conversation, but the current TUI does not print the raw tool result body back to the screen as a separate visible block.

Session behavior

The TUI keeps a messages slice in memory and appends your prompts plus assistant/tool messages after each turn. That means later prompts in the same session include earlier context unless you run /new. Provider state is slightly different:
  • the provider client is built once when the TUI starts
  • /model persists a new model value for the current provider
  • /connect saves another provider, but the active session keeps using the client that was already created

Good prompts for exploration

Use prompts that make the model inspect the repo:
Read main.go and explain how hrns boots.
List the files in ./skills and summarize how skills are discovered.
Fetch https://example.com and tell me what came back.

Known limits

  • The system prompt is hardcoded.
  • Provider switching is not live; restart after /connect.
  • There is no non-interactive exec mode.
  • /model expects an argument.
For anything beyond quick experiments, build your own entrypoint on top of the packages instead of stretching the TUI too far.