Terminal
Bub provides two terminal commands that share the same model, tools, and Tape storage:
bub run: processes a single message and exits; suited for one-off tasks and scripts.bub chat: starts an interactive REPL for multi-turn conversations.
Start an interactive session
Section titled “Start an interactive session”Run the following command in your terminal to open an interactive session, then type a message and press Enter to send it:
bub chatYou can also pass an initial prompt at startup:
bub chat "Inspect this repository and suggest a first task."Type ,help to list internal commands. Press Ctrl+D or enter ,quit or ,exit to leave.
The bottom status bar shows metrics for the latest model call:
ttft(time to first token): elapsed time before the first streamed chunk arrives.speed: average output tokens per second from the first chunk to the end of the response (includes reasoning tokens; excludesttftand tool execution time; showsspeed:- tok/sif the provider omits usage).
Steer a running agent
Section titled “Steer a running agent”If the agent starts going off track while you are waiting for a response or tool call—or if you want to add a quick constraint—you do not have to wait for the current turn to finish. Just type your new instruction and press Enter:
Do not modify files yet. List the problems and suggestions first.Adding instructions while a Turn is still running is called Steering. Bub places the message in the steering inbox; in-flight model or tool calls are not interrupted, and the agent reads the new instruction on the very next Step.
When a session is busy, Bub supports two admission actions:
| Action | When it takes effect | Use it for |
|---|---|---|
steer |
Injected into the next Step of the current Turn (or queued for the next Turn if the current Turn finishes first) | Correcting direction, adding constraints, or supplying info for the current task |
follow_up |
Queued and run as a new Turn in order after the current Turn finishes | Queuing an independent next task |
In bub chat, ordinary input entered during a run uses steer by default. To abort the running task immediately, enter ,quit (clears the pending queue and cancels active tasks).
View and adjust reasoning
Section titled “View and adjust reasoning”Expand or collapse the model’s reasoning output in the terminal (display-only):
,thinkingChange the model’s reasoning effort (takes effect on the next Turn and persists in the session Tape):
,reasoning_effort highChoose a session ID
Section titled “Choose a session ID”bub run defaults to session ID cli:local, while bub chat defaults to cli_session. Pass --session-id to share history between them:
bub chat --session-id cli:echobub run --session-id cli:echo "Summarize what we discussed."Run direct commands
Section titled “Run direct commands”Input starting with , (the default command prefix) skips the model and calls the matching tool directly:
bub run ",help"bub run ",fs.read path=README.md"You can enter commands directly inside bub chat as well. Press Ctrl+X to toggle between Agent mode and Shell mode (Shell mode prepends , automatically). Common commands include:
| Command | Purpose |
|---|---|
,model openai:gpt-5-mini |
Switch the model for the current session |
,reasoning_effort high |
Set reasoning effort for the current session |
,code_mode enable=true |
Enable code mode |
,tape.info |
Show entry count, anchors, and token usage |
,tape.search query=error |
Search current session history |
,tape.anchors |
List context anchors |
,tape.handoff name=reviewed summary='...' |
Advance the default context start and save a summary |
,tape.reset archive=true |
Back up and clear the current Tape |
,thinking |
Expand or collapse reasoning output |
Notes:
,tape.reset archive=truebacks up the main Tape and sidecar to<BUB_HOME>/tapes/with a UTC timestamp and.baksuffix, then resets the Tape with a newsession/startanchor. Omittingarchive=trueclears without backing up.,tape.handoffadvances the context start and storessummaryin the anchor’sstate, without automatically generating a summary. See Tape.
Run background processes
Section titled “Run background processes”In bub chat, pass background=true to start a long-running command in the background:
,bash command='npm run dev' background=trueUse the returned shell_id to read output incrementally or stop the process:
,bash.output shell_id=bsh-12345678,bash.output shell_id=bsh-12345678 offset=1200 limit=4000,bash.kill shell_id=bsh-12345678offsetandlimitare character offsets (not line numbers); pass the returnednext_offsetto the next read.- Foreground
bashcalls wait 30 seconds by default (configurable viatimeout_seconds). On timeout, the process moves to the background and returns ashell_idinstead of failing. Background processes are cleaned up when the app exits.