Skip to content

TUI

APX ships two interactive terminal modes that go beyond one-shot apx exec calls:

ModeCommandBest for
Terminal coding assistantapx codeMulti-turn coding sessions with full system context, tool use, model switching
Agent REPLapx 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 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.

Terminal window
apx code # default super-agent mode
apx code --project my-project # pin to a specific project
apx code --agent reviewer # route chat to a project agent
apx
$ 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
apx code — full-screen TUI with chat transcript and input bar
  • 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+I or Ctrl+C while running) — abort the current request; a second Ctrl+C exits.
  • 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, or Meta+↑/Meta+↓ (jump to top/bottom).
KeyAction
EnterSend message (or queue if agent is thinking)
Ctrl+POpen command palette
Ctrl+IInterrupt current request
Ctrl+CInterrupt (first press) / Exit (second press)
Ctrl+A / Ctrl+EMove cursor to start / end of input
Ctrl+UDelete from cursor to start of line
Ctrl+WDelete previous word
PgUp / PgDnScroll transcript
Meta+↑ / Meta+↓Jump to top / bottom of transcript
TabCycle input mode
exit or quitType to close

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

Terminal window
apx chat reviewer # new conversation
apx chat reviewer --conversation abc123 # continue an existing thread
apx chat reviewer --model gpt-5.2 # override model for this session
apx
$ 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 ▸ _
apx chat reviewer — readline REPL with agent prompt

The prompt shows the agent slug followed by >. Type your message and press Enter. Exit with Ctrl+D, exit, or quit.

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.


CommandDescription
apx conversations list <agent>List stored exec/chat conversations for an agent.
apx conversations get <agent> <id>Print one conversation with all turns.
Terminal window
apx conversations list reviewer
apx conversations get reviewer abc123

Alias: apx conv list reviewer, apx conv show reviewer abc123.


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.