Skip to content

TUI Terminal Mode EN

zhenhun edited this page Sep 4, 2026 · 1 revision

中文 | English

Besides the GUI, BIT ships with a built-in terminal mode (TUI), suited for SSH / headless environments.

Launching

bit        # In an interactive terminal, just type this to enter the TUI
bit tui    # Same effect (explicit form)

Detection rule: when stdin is an interactive terminal (TTY), bare bit enters the TUI; TTY-less launch methods—double-clicking in Finder / .desktop icons / open -a / auto-update restarts—still open the desktop app, with no interference between the two.

(The bit command is available after installing the CLI; if it isn't installed, run the in-app binary path directly.)

Commands

Command Description
/help Show help
/sessions List sessions
/new [title] Create a new session and switch to it
/use <id> Switch session (a leading prefix of the id is enough)
/tools List tools
/mem <content> Save a memory
/mems View memories
/install-cli Install the bit command into the terminal PATH
/quit Quit

Any other input is treated as a chat message; the tool call process is displayed line by line.

Running Alongside the Desktop App

The TUI and the desktop app share the same data directory, so they can run at the same time without conflicts (sessions, tools, and memories are shared in real time). Quitting the TUI does not affect the desktop app.

Pipe Behavior

  • Exits cleanly when stdin closes (EOF), which suits scripting scenarios
  • Invalid commands, a corrupted ai_config.json, or an unreachable AI never cause a crash; after reporting the error, the REPL remains usable

Usage on Remote Machines

The TUI depends only on the local binary and needs no graphical environment. On a headless server:

# Use a brand-new data directory directly in TUI mode
BIT_DATA_DIR=~/.bit-server bit tui

Configure the AI provider the same way as the desktop app (ai_config.json), or directly reuse a data directory synced over from the desktop machine.

Clone this wiki locally