Skip to main content

TUI

The TUI is Anyy's interactive terminal app. Running anyy with no arguments launches it: a full-screen conversation surface with a multi-line composer, slash commands, completion, live tool progress, approval cards, and an operational status bar. It is the primary resident surface — for a single non-interactive reply instead, see one-shot chat; for the full set of CLI subcommands and flags, see the CLI reference.

Start The TUI

anyy

With no arguments, anyy starts the interactive terminal app and connects to the local gateway (starting one if needed). A few entrypoint flags change how that session begins:

FlagEffect
--role ROLESelect the initial Role for new sessions.
--resume SESSION_IDResume an existing session instead of starting fresh.
--profile NAMESelect the Anyy profile by name.
--home PATHUse a specific Anyy home directory.
--socket PATHConnect to a specific gateway socket.
--no-colorDisable colored output.

See the CLI reference for the complete flag list and the other anyy subcommands. The TUI needs a real interactive terminal; piping input into it (no TTY) makes it exit immediately.

When the terminal is tall enough (15 rows or more) and attached to a real TTY, the app pre-prints blank lines at startup so the composer sits at the bottom of the screen and the transcript grows upward into the scrollback above it. There is no alternate-screen takeover — your scrollback is preserved.

Why Use The TUI

The TUI is the richest way to work with Anyy:

  • Conversational, not one-shot. A persistent session with full transcript, streaming responses, and reasoning/tool detail you can show or hide.
  • A real multi-line composer. Insert newlines, paste large blocks (they collapse to a tidy placeholder), recall history, and edit with familiar readline-style keys.
  • Steer or interrupt mid-turn. Decide what typing does while the agent is working: queue it, steer the active turn, or interrupt.
  • In-place approvals. Approval and ChangePlan cards appear inline; approve or deny without leaving the conversation.
  • Operational at a glance. The status bar surfaces model, connection, context usage, and elapsed time; the model picker switches models live.

For scripting or a single answer, anyy chat is the better fit. The TUI is for sitting down and working with the assistant.

Keyboard Shortcuts

Editing keys follow common readline conventions. The composer is multi-line, so Enter sends and a separate key inserts a newline.

Sending and newlines

KeyAction
EnterSend the current message (or run a slash command).
Alt+EnterInsert a newline (multi-line input).
Ctrl+JInsert a newline (same as Alt+Enter).
\ then EnterA lone trailing backslash becomes a newline instead of sending.

Shift+Enter is intentionally not bound: on most terminals it is indistinguishable from Enter, so Alt+Enter / Ctrl+J are the supported newline keys.

Cursor movement and editing

KeyAction
Left / RightMove the cursor by one character (steps over a paste block as a unit).
Home / Ctrl+AMove to the start of the input.
End / Ctrl+EMove to the end of the input.
BackspaceDelete the character before the cursor (removes a whole paste block).
DeleteDelete the character after the cursor.
Ctrl+UDelete from the cursor to the start of the input.
Ctrl+KDelete from the cursor to the end of the input.
Ctrl+WDelete the word before the cursor (one paste block counts as one word).

History, completion, and navigation

KeyAction
Up / DownRecall previous / next submitted input (when the completion menu is closed).
TabApply the highlighted slash-command completion.
Up / DownMove the selection in the open completion menu.
PgUp / PgDownScroll the transcript; PgDown returns to the latest messages.
Shift+Up / Shift+DownScroll the transcript.

Turn control and exit

KeyAction
EscInterrupt the active turn (only while the agent is working).
Ctrl+CWhile working: interrupt the turn. Otherwise: clear a non-empty composer, or exit if it is already empty.
Ctrl+DExit the TUI immediately.
Enter (empty input, connection lost)Retry the gateway connection.

Slash Commands

Type / to open the completion menu; it merges local UI commands (handled inside the TUI) with runtime commands the gateway exposes for this surface (skills, tools, MCP, and more). As you type, matches are ranked by prefix; press Tab to apply the highlighted entry and Up/Down to move the selection.

/help lists the available commands grouped by category (Local, Runtime, Session, Model, Skills/Tools, Debug, Other); /help <name> shows detail for one command.

A few of the most-used local commands:

CommandWhat it does
/helpShow TUI help (optionally for one command).
/newStart a new session.
/resumeOpen the session picker, or resume by id.
/modelOpen the model picker for the active session.
/busySet busy input behavior: queue, steer, or interrupt.
/compactToggle compact transcript display.
/details, /reasoningControl tool-detail and reasoning visibility.
/statusbarToggle the status bar.
/copy, /pasteCopy the selection / assistant reply, or attach clipboard content.
/queueInspect or enqueue messages.
/undo, /retryUndo the last exchange, or retry the last user message.
/quitExit the TUI.

This is only a sample. For the complete, authoritative list of slash commands — including gateway runtime commands — see the slash-command reference.

Status Bar

The status bar is off by default; toggle it with /statusbar. When shown at the top, the title bar reads Anyy (plus the active Role when set) and a running indicator with a spinner while a turn is in flight, or the current status otherwise, and a connection <state> segment whenever the gateway link is not ready.

A separate context bar renders just above the composer and shows, joined by :

  • the active model id,
  • context usage as used/max [▓▓▓░░░░░░░] NN% (the percentage turns red as it approaches the limit),
  • a turn timer () while the agent works, or the last turn's duration () afterward.

Model Picker

/model opens the model picker for the current session. Move the selection with Up/Down (or j/k), press Enter to switch, and Esc or Ctrl+C to cancel. The list ends with ← Back and Cancel rows. When a provider offers many models (25 or more), a filter box appears at the top: just type to narrow the list, and press Esc once to clear the filter (a second Esc closes the picker). Switching applies to the active session and is confirmed inline.

If no models are available for the provider, the picker points you at anyy setup model.

Profile Panel

/profile shows the active profile details, and /config shows the active configuration, rendered inline in the transcript. These are read-only views for confirming which profile, Role, and settings the current session is using; use the anyy profile and anyy role subcommands (see the CLI reference) to change them.

Approval Cards

When the agent proposes a state-changing or root-capable operation, an approval card appears inline — a bordered box titled 需要批准 showing a Title: line, a Risk: level when present (■■■ high, ■■ medium, ■ low), an Approval ID: <id> line, a Summary:, and any proposed changes, commands, validation, and rollback steps, with the Y/Enter approve N deny controls at the bottom:

╭─ 需要批准 ──────────────────────────────────╮
│ Title: restart service │
│ Risk: ■■■ high │
│ Approval ID: approval_1 │
│ │
│ Y/Enter approve N deny │
╰─────────────────────────────────────────────╯

A ChangePlan approval is titled ChangePlan Approval and adds a ChangePlan ID: <id> line; a clarification prompt uses the same box style titled 需要确认. While a card is active:

KeyAction
Y or EnterApprove the operation.
NDeny the operation.
Esc / Ctrl+CLeave the card active and print a reminder of the keys.

A clarify prompt works similarly but accepts free-form text: type your answer (or a listed option number) and press Enter; the composer prompt shows your draft inline. Approve/deny and clarify decisions are sent to the gateway, which preserves the approval and audit semantics.

Tool Progress Display

As the agent runs tools, each tool appears in the transcript with its name and status, and — depending on the detail mode — its arguments, live progress, and result. Control how much is shown:

  • /details adjusts tool-detail visibility (including hiding tool output or expanding full args/progress/result).
  • /reasoning shows, hides, or inspects the assistant's reasoning.
  • /compact collapses each message and tool to a single line for a denser transcript.

Responses stream in live; a block cursor marks the streaming position until the turn completes.

Automatic Reconnect

The TUI subscribes to the gateway's event stream, which is authoritative for live turns. If that connection drops, the app prints connection lost; reconnecting and retries automatically with a backoff. The title bar and the top-of-screen line show the current connection <state> while it recovers, and queued drafts drain once the link is healthy again.

If reconnection ultimately fails, the app shows connection unavailable; press Enter to retry — pressing Enter with an empty composer triggers an immediate retry. While the connection is unavailable, Ctrl+C exits.

How The TUI Talks To Gateway

The TUI is a client of the resident gateway, not the agent loop itself. It owns only local rendering, input editing, completion, and visible queue state; the gateway owns sessions, tools, skills, approvals, ChangePlan, persistence, provider/model resolution, and background jobs.

Two channels connect them:

  • RPC carries your actions — sending a message, steering or interrupting a turn, running a runtime slash command, switching models, and approval/clarify decisions.
  • The event stream carries everything happening in the session — streamed text, tool progress, status changes, and approval prompts — and is the source of truth the transcript renders from.

Because the gateway is resident, sessions and history persist across TUI restarts: quit and relaunch (or --resume a session id) to pick up where you left off.