What the TUI is for
The bundled runner is the fastest way to poke at the loop without writing extra code. In interactive mode it is useful for:- trying prompts
- watching streamed output
- seeing when tool calls happen
- checking that your saved provider configuration works
exec path around loop.RunLoop.
Starting a session
Run:~/.config/hrns/config.json. After that, it prints the active provider and model and waits for input.
Running a one-shot prompt
Useexec when you want one prompt, streamed output, and then process exit:
exec still loads the same saved config and still requires first-run onboarding to have happened already. Unlike the interactive mode, it does not preserve conversation history across runs. You can also pass -agent; if you pass -provider without -model, the selected provider’s saved default model is used.
Built-in commands
Change model
List available models
GET /models to the current provider and prints the returned model IDs.
Reset conversation
List saved providers
Switch provider
currentProvider, rebuilds the OpenAI-compatible client, and keeps the current conversation history in memory.
List agents
Switch agent
currentAgent and updates the active system message to that agent’s prompt.
Add a provider
Show help
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
Session behavior
The TUI keeps amessages 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
/modelpersists a new model value for the current provider/provider <name>rebuilds the client and updates the active model for the session/agent <agent>persists the selected agent and updates the active system message/connectsaves another provider and updatescurrentProviderin the config file, but the active session keeps using the existing client until you run/provider <name>or restart
Good prompts for exploration
Use prompts that make the model inspect the repo:Known limits
/connectalone does not switch the live client./modelexpects an argument./agentexpects an argument.