Interactive ChatNEW
The Sophon CLI REPL — pinned input, slash commands, @-mentions, image attach, and live streaming.
Running sophon with no arguments drops you into the interactive chat REPL — a full-screen conversation with your agent that streams responses, renders Markdown, runs slash commands, and lets you attach files and images without leaving the terminal. It's the surface you'll spend the most time in.
sophon # bare invocation → interactive chat
sophon chat # identical — explicit formEntering and exiting
sophon chat accepts two options for picking up where you left off:
sophon chat --session <id> # -s : resume an existing session by ID
sophon chat --agent <id> # -a : chat with a specific agent (default: from config)Without --session the CLI creates a fresh session on connect; without --agent it uses defaultAgent from your config. The Gateway must be reachable at --gateway-url (default http://localhost:8080) — if the connection fails, the REPL tells you to start it with sophon start.
To leave, type /exit, or press Ctrl+C twice within ~1.5 seconds. A single Ctrl+C clears the current line (or cancels a running task) and keeps you in the REPL.
Pinned input & status band
The input zone is pinned to the bottom of the terminal while the conversation scrolls above it, so the prompt never disappears mid-stream. You can keep typing while a task runs — queued input is sent as soon as the current turn completes — and multi-line input grows with your text up to 6 rows.
Above the input sits a live status band:
- The active turn (
●) shows its latest phase — thinking, tool use, memory lookups — as the agent works. - Each delegated subagent (
○) gets its own row with its name, task, and elapsed time, ticking every second. When more are running than fit, a+N moretail summarizes the overflow. - The footer ribbon and header card show settings badges — the current thinking level and auto-approve risk ceiling — whenever they differ from the defaults.
Pinned input is on by default on capable terminals. The CLI automatically falls back to the classic framed prompt when the terminal can't support it: non-interactive stdin, redirected output, a dumb TERM, a window smaller than 40×12, or the Dashboard's embedded terminal. Everything still works in the fallback — you just lose the pinned layout.
To opt out explicitly, set SOPHON_CLI_PINNED=0 (or "pinnedInput": false in cli.json). To switch off the entire enhanced experience, set SOPHON_CLI_V2=0 (or "v2": false). See Configuration.
Key bindings
| Key | Action |
|---|---|
Enter | Send the message |
Shift+Enter | Insert a newline (multi-line input) |
↑ / ↓ | Recall and walk through previous entries |
← / → / Home / End | Move the cursor within the buffer |
Delete | Forward-delete the character under the cursor |
Ctrl+W | Delete the previous word |
Ctrl+U | Clear the whole line |
Ctrl+C | Cancel — press twice within ~1.5s to exit |
Ctrl+T | Attach an image (prompts for a path) |
Tab | Accept a slash / mention completion |
Esc | Dismiss the open menu |
Pasted text is auto-detected (bracketed paste) and inserted as a single block, so multi-line snippets land intact instead of triggering a send per line.
Slash commands
Type / at the start of an empty line to open a searchable picker, or type the command directly. The dispatcher is the single source of truth, so the menu always reflects what actually runs.
| Command | What it does |
|---|---|
/new [agent] | Start a new session (optionally with a different agent) |
/sessions | List recent sessions |
/resume <id|title> | Resume a session by ID or title |
/agent <id> | Switch to a different agent |
/agents | List available agents |
/provider [id|type] [modelId] | List providers, or set a per-session provider/model override; /provider reset clears it |
/thinking <auto|off|fast|full> | Set the extended-thinking level (persists as defaultThinking) |
/rename <title> | Rename the current session |
/export [format] [path] | Export the transcript (md / json / txt) |
/attach <path> | Upload a file and send it with your next message |
/save [n] [path] | Download the Nth attachment from the last batch |
/plan | Show the current plan |
/tasks | List active tasks on the server |
/approvals | List pending approvals |
/auto-approve [on [none|low|medium|high] | off | show] | Auto-approve requests up to a risk ceiling (default high); the stored ceiling is kept when you turn it off |
/cancel | Cancel the running task or plan |
/canvas [<action>] | Act on the agent's canvas frame for the current session |
/help | Show all available commands |
/exit | Leave the REPL |
/theme and /tokens are on the roadmap. To change the look today, set the SOPHON_THEME environment variable; to pick a model for the session, use /provider — the full list lives in the Model Catalog.
@-mentions
Type @ to open the file picker and pull a file reference into your message. Completion is wired to your current working directory and filters as you type: keep typing to narrow the list, browse with ↑/↓, and press Tab or Enter to insert the reference inline. Esc closes the picker but keeps the @filter text you typed in the buffer, so nothing is lost.
Agent (@agent:<id>) and session (@session:<id|title>) mention categories are on the roadmap — today @ completes files.
Pasting and image attach
Press Ctrl+T to attach an image — the CLI prompts for a path and queues the file. A confirmation line like [attached photo.png] is echoed, and the image is uploaded and sent alongside your next message. Use /attach <path> for non-image files (it uploads to Documents and sends immediately), and /save [n] to pull an attachment the agent sent back down to disk.
In-REPL rendering
Assistant output is buffered and rendered as themed Markdown once the turn completes — headings, bold, italic, lists, block quotes, tables, links, and fenced code blocks all render with syntax highlighting through the active theme. Responses stream live so you see them build token by token, and intermediate phases (thinking, tool use, memory lookups, skill execution) surface as labeled status lines while the agent works. See Extended Thinking for how reasoning is produced.
The enhanced surface also frames each turn between separators with the agent name, opens with a greeting header (time-of-day plus the current date), and can show a contextual footer ribbon with token count, the active key hints (↩ send · ⇧↩ newline · / cmds · ⌃C cancel), and settings badges for the thinking level and auto-approve ceiling when they're non-default.
The enhanced editor and themed UI — pinned input, multi-line editor, slash picker, @-mention completion, framed turns, header and footer chrome — are the default experience. To fall back to the legacy prompt, set SOPHON_CLI_V2=0 or "v2": false in ~/.sophon/config/cli.json. See Configuration.
Related
- Configuration — config file keys, env overrides, and the
v2/pinnedInputopt-outs - Themes — color schemes and selection priority
- Command Reference — every
sophonsubcommand - Model Catalog — the providers and models
/providercan select - Extended Thinking — how reasoning is surfaced