Skip to content

TUI

Using the Anthracode terminal user interface.

Anthracode provides an interactive terminal interface or TUI for working on your projects with an LLM.

Running Anthracode starts the TUI for the current directory.

Terminal window
anthracode

Or you can start it for a specific working directory.

Terminal window
anthracode /path/to/project

Once you’re in the TUI, you can prompt it with a message.

Give me a quick summary of the codebase.

You can reference files in your messages using @. This does a fuzzy file search in the current working directory.

How is auth handled in @packages/functions/src/api/index.ts?

The content of the file is added to the conversation automatically.


Start a message with ! to run a shell command.

!ls -la

The output of the command is added to the conversation as a tool result.


When using the Anthracode TUI, you can type / followed by a command name to quickly execute actions. For example:

/help

Most commands also have keybind using ctrl+x as the leader key, where ctrl+x is the default leader key. Learn more.

Here are all available slash commands:


Add a provider to Anthracode. Allows you to select from available providers and add their API keys.

/connect

Compact the current session. Alias: /summarize

/compact

Keybind: ctrl+x c


Toggle tool execution details. This command is only available as a keybind, not a slash command.

Keybind: ctrl+x d


Open external editor for composing messages. Uses the editor set in your EDITOR environment variable. Learn more.

/editor

Keybind: ctrl+x e


Exit Anthracode. Aliases: /quit, /q

/exit

Keybind: ctrl+x q


Export current conversation to Markdown and open in your default editor. Uses the editor set in your EDITOR environment variable. Learn more.

/export

Keybind: ctrl+x x


Show the help dialog.

/help

Guided setup for creating or updating AGENTS.md. Learn more.

/init

List available models.

/models

Keybind: ctrl+x m


Start a new session. Alias: /clear

/new

Keybind: ctrl+x n


Redo a previously undone message. Only available after using /undo.

Internally, this uses Git to manage the file changes. So your project needs to be a Git repository.

/redo

Keybind: ctrl+x r


List and switch between sessions. Aliases: /resume, /continue

/sessions

Keybind: ctrl+x l


List available themes.

/themes

Keybind: ctrl+x t


Toggle the visibility of thinking/reasoning blocks in the conversation. When enabled, you can see the model’s reasoning process for models that support extended thinking.

/thinking

Undo last message in the conversation. Removes the most recent user message, all subsequent responses, and any file changes.

Internally, this uses Git to manage the file changes. So your project needs to be a Git repository.

/undo

Keybind: ctrl+x u


Undo the last context compaction, restoring the full pre-compaction conversation. Alias: /undo-compact

/uncompact

Safe to call when no compaction has occurred — it is a no-op if no snapshot exists. Each call undoes one level of compaction; call repeatedly to undo multiple compactions.


Open the statistics dialog showing 4 tabbed views: token usage, tool usage, session timing, and model performance breakdown.

/stats

Also available via the CLI without the TUI:

Terminal window
anthracode stats

Switch to terse output mode, reducing verbosity of tool execution details and agent responses. Useful for monitoring progress without full output.

/terse

Return to normal verbosity output mode after using /terse.

/normal

Initialize a Git repository for the current project if one does not already exist. Required for undo/redo functionality.

/git-init

Both the /editor and /export commands use the editor specified in your EDITOR environment variable.

Terminal window
# Example for nano or vim
export EDITOR=nano
export EDITOR=vim
# For GUI editors, VS Code, Cursor, VSCodium, Windsurf, Zed, etc.
# include --wait
export EDITOR="code --wait"

To make it permanent, add this to your shell profile; ~/.bashrc, ~/.zshrc, etc.

Popular editor options include:

  • code - Visual Studio Code
  • cursor - Cursor
  • windsurf - Windsurf
  • nvim - Neovim editor
  • vim - Vim editor
  • nano - Nano editor
  • notepad - Windows Notepad
  • subl - Sublime Text

Some editors need command-line arguments to run in blocking mode. The --wait flag makes the editor process block until closed.


You can customize TUI behavior through tui.json (or tui.jsonc).

tui.json
{
"theme": "anthracode",
"keybinds": {
"leader": "ctrl+x"
},
"scroll_speed": 3,
"scroll_acceleration": {
"enabled": false
},
"diff_style": "auto",
"mouse": true
}

This is separate from anthracode.jsonc, which configures server/runtime behavior.

  • theme - Sets your UI theme. Learn more.
  • keybinds - Customizes keyboard shortcuts. Learn more.
  • scroll_acceleration.enabled - Enable macOS-style scroll acceleration for smooth, natural scrolling. When enabled, scroll speed increases with rapid scrolling gestures and stays precise for slower movements. This setting takes precedence over scroll_speed and overrides it when enabled.
  • scroll_speed - Controls how fast the TUI scrolls when using scroll commands (minimum: 0.001, supports decimal values). Defaults to 3. Note: This is ignored if scroll_acceleration.enabled is set to true.
  • diff_style - Controls diff rendering. "auto" adapts to terminal width, "stacked" always shows a single-column layout.
  • mouse - Enable or disable mouse capture in the TUI (default: true). When disabled, the terminal’s native mouse selection/scrolling behavior is preserved.

Use ANTHRACODE_TUI_CONFIG to load a custom TUI config path.


You can customize various aspects of the TUI view using the command palette (ctrl+p). These settings persist across restarts.


Toggle whether your username appears in chat messages. Access this through:

  • Command palette: Search for “username” or “hide username”
  • The setting persists automatically and will be remembered across TUI sessions