TUI
APX ships two interactive terminal modes that go beyond one-shot apx exec calls:
| Mode | Command | Best for |
|---|---|---|
| Terminal coding assistant | apx code | Multi-turn coding sessions with full system context, tool use, model switching |
| Agent REPL | apx chat <agent> | Back-and-forth conversation with a specific project agent |
Both modes persist conversation threads — you can pick up where you left off.
apx code — terminal coding assistant
Section titled “apx code — terminal coding assistant”apx code launches the APX TUI: a full-screen terminal application built on OpenTUI + Solid.js
that streams responses, shows tool traces, and lets you switch models or agents without leaving
the session.
apx code # default super-agent modeapx code --project my-project # pin to a specific projectapx code --agent reviewer # route chat to a project agent$ apx code apx code · First Project orchestrator ▸ claude-code ───────────────────────────────────────────────────────────────────── › Review the open PRs and summarize them ⏺ reading 3 changed files cart.js · checkout.js · api/stripe.js ✓ summary ready — 2 risks, 1 nit ───────────────────────────────────────────────────────────────────── › type a message… ⌃P palette · ⌃C quit · ? help
What the TUI provides
Section titled “What the TUI provides”- Streaming responses — text streams in progressively as the model generates it.
- Tool traces — each tool call and its result appears inline in the transcript.
- Command palette (
Ctrl+P) — switch model or agent without exiting. - Queue while thinking — type your next message while the agent is still responding; it queues and fires immediately after the current reply finishes.
- Interrupt (
Ctrl+IorCtrl+Cwhile running) — abort the current request; a secondCtrl+Cexits. - Message Actions — click a user message to copy it, re-ask about it, or promote it to the front of the queue.
- Scroll —
↑/↓,PgUp/PgDn, orMeta+↑/Meta+↓(jump to top/bottom).
Keyboard shortcuts
Section titled “Keyboard shortcuts”| Key | Action |
|---|---|
Enter | Send message (or queue if agent is thinking) |
Ctrl+P | Open command palette |
Ctrl+I | Interrupt current request |
Ctrl+C | Interrupt (first press) / Exit (second press) |
Ctrl+A / Ctrl+E | Move cursor to start / end of input |
Ctrl+U | Delete from cursor to start of line |
Ctrl+W | Delete previous word |
PgUp / PgDn | Scroll transcript |
Meta+↑ / Meta+↓ | Jump to top / bottom of transcript |
Tab | Cycle input mode |
exit or quit | Type to close |
Requirements
Section titled “Requirements”apx code uses Bun to run the TUI TypeScript source directly. If bun is
not on your PATH, set BUN_PATH in your environment. If Bun is unavailable, apx code falls
back to the built-in terminal renderer (no Solid.js).
apx chat — interactive agent REPL
Section titled “apx chat — interactive agent REPL”apx chat is a lightweight, dependency-free readline REPL for multi-turn conversations with a
project agent. It stores every exchange as a conversation thread and lets you resume one with
--conversation <id>.
apx chat reviewer # new conversationapx chat reviewer --conversation abc123 # continue an existing threadapx chat reviewer --model gpt-5.2 # override model for this session$ apx chat reviewer apx chat · reviewer (backend reviewer · ollama:llama3.2:3b) type a message · /help for commands · ⌃D to exit you ▸ what's my role in this project? reviewer ▸ You're the backend reviewer — I check PRs for correctness, error handling, and test coverage before they merge. you ▸ _
The prompt shows the agent slug followed by >. Type your message and press Enter. Exit with
Ctrl+D, exit, or quit.
Conversation persistence
Section titled “Conversation persistence”Every exchange is appended to a Markdown conversation file under:
~/.apx/projects/<project-id>/agents/<slug>/conversations/Each conversation has a unique id. Use apx conversations list to see them and
apx conversations get to read the full exchange.
apx conversations
Section titled “apx conversations”| Command | Description |
|---|---|
apx conversations list <agent> | List stored exec/chat conversations for an agent. |
apx conversations get <agent> <id> | Print one conversation with all turns. |
apx conversations list reviewerapx conversations get reviewer abc123Alias: apx conv list reviewer, apx conv show reviewer abc123.
CLI vs TUI
Section titled “CLI vs TUI”Use the CLI (apx exec) for:
- Scripted one-shot calls from shell pipelines or CI.
- Passing output to other tools.
- Logging a single exchange to the message store.
Use the TUI (apx code) for:
- Interactive coding sessions where you want streaming output, tool visibility, and model switching.
- Extended multi-turn work where the full transcript is useful.
Use the REPL (apx chat) for:
- Back-and-forth with a specific project agent.
- Conversations you want to resume later by id.
- Situations where Bun is not available or a minimal interface is preferred.