Skip to content

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.

Run the following command in your terminal to open an interactive session, then type a message and press Enter to send it:

Terminal window
bub chat

You can also pass an initial prompt at startup:

Terminal window
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; excludes ttft and tool execution time; shows speed:- tok/s if the provider omits usage).

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).

Expand or collapse the model’s reasoning output in the terminal (display-only):

,thinking

Change the model’s reasoning effort (takes effect on the next Turn and persists in the session Tape):

,reasoning_effort high

bub run defaults to session ID cli:local, while bub chat defaults to cli_session. Pass --session-id to share history between them:

Terminal window
bub chat --session-id cli:echo
bub run --session-id cli:echo "Summarize what we discussed."

Input starting with , (the default command prefix) skips the model and calls the matching tool directly:

Terminal window
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=true backs up the main Tape and sidecar to <BUB_HOME>/tapes/ with a UTC timestamp and .bak suffix, then resets the Tape with a new session/start anchor. Omitting archive=true clears without backing up.
  • ,tape.handoff advances the context start and stores summary in the anchor’s state, without automatically generating a summary. See Tape.

In bub chat, pass background=true to start a long-running command in the background:

,bash command='npm run dev' background=true

Use 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-12345678
  • offset and limit are character offsets (not line numbers); pass the returned next_offset to the next read.
  • Foreground bash calls wait 30 seconds by default (configurable via timeout_seconds). On timeout, the process moves to the background and returns a shell_id instead of failing. Background processes are cleaned up when the app exits.