Skip to content

TUI

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

Running SlopCode starts the TUI for the current directory.

Terminal window
slopcode

Or you can start it for a specific working directory.

Terminal window
slopcode /path/to/project

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

Give me a quick summary of the codebase.

The main TUI adds a session strip, draft tabs, an open-files sidebar, and a file explorer so you can move between active threads without leaving the terminal.

Use the sidebar to jump between files, or keep drafts open while another session is still running.


Edit

SlopCode includes an embedded editor with bundled Neovim support for focused edits inside the TUI.

Use it when you want to inspect or patch files without switching to a separate terminal pane.


Queue

Follow-up prompts are queued by default, so one run finishes before the next one starts.

You can pause the active item, resume it ahead of queued work, and remove queued prompts when priorities change.


Suggest

Prompt input supports model-powered autocomplete with ghost text.

Suggestions stay inline, and history mode hides them when you switch to timeline navigation.

Use /models-completion to choose a different model for prompt autocomplete. This does not change the active chat model; it only changes the fast model SlopCode uses for inline suggestions.


Trust edits

The TUI can auto-accept edit permission prompts for the current session. This keeps focused patch series moving while still leaving command and external-directory approvals under your normal permission rules.

Use the permission_auto_accept_toggle keybind when you want to turn this edit-only shortcut on or off.


Track

The prompt bar shows the current phase, queue state, and token pressure while a run is active.

This makes it easier to notice when a long task is still planning, executing, or nearing the context limit.


File references

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.


Bash commands

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.

Use /shells to pick the default shell SlopCode should use for ! commands, PTY sessions, and the bash tool. The selected shell is saved as shell.program in your global config.


Commands

When using the SlopCode 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:


connect

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

/connect

compact

Compact the current session. Alias: /summarize

/compact

Keybind: ctrl+x c


editor

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

/editor

Keybind: ctrl+x e


exit

Exit SlopCode. Aliases: /quit, /q

/exit

Keybind: ctrl+x q


export

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


help

Show the help dialog.

/help

Keybind: ctrl+x h


history

Toggle history mode for session navigation.

/history

Keybind: history_mode_toggle defaults to ctrl+y


init

Create or update AGENTS.md file. Learn more.

/init

Keybind: ctrl+x i


models

List available models. The model dialog lets you favorite models, jump to provider selection, and toggle between the latest filtered list and all available models.

/models

Keybind: ctrl+x m


models-completion

Choose model overrides for prompt autocomplete. Use this when you want chat responses on a large model but inline suggestions from a faster or cheaper model.

/models-completion

new

Start a new session. Alias: /clear

/new

Keybind: ctrl+x n


redo

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


sessions

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

/sessions

Keybind: ctrl+x l


shells

Choose the shell executable used by shell mode, PTY sessions, and the bash tool. Alias: /shell

/shells

share

Share current session. Learn more.

/share

Keybind: ctrl+x s


themes

List available themes.

/themes

Keybind: ctrl+x t


thinking

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

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


unshare

Unshare current session. Learn more.

/unshare

History mode

Use history mode when you want to navigate existing session messages and traces without moving your hands to the mouse.

While history mode is active, up and down move between prompts, left and right move between traces, and space runs the context action.

Pressing space expands or collapses tool output, and opens a child task session when the selected item supports it.

History mode also lets you inspect prompts, traces, tool output, and visible reasoning blocks from one place.

Use history_mode_toggle (defaults to ctrl+y) to exit history mode and return to normal edit mode.

Unlike normal prompt input history (history_previous and history_next), history mode navigates rendered session content instead of cycling through text in the input box.


Move

Workspace switching lets the TUI retarget the current session to another folder without closing the app.

Warping is useful when you need the same conversation context in a nearby repo or sibling package.


Editor setup

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.


Configure

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

tui.json
{
"$schema": "https://slopcode.dev/tui.json",
"theme": "slopcode",
"keybinds": {
"leader": "ctrl+x"
},
"scroll_speed": 3,
"scroll_acceleration": {
"enabled": true
},
"diff_style": "auto",
"mouse": false
}

This is separate from slopcode.json, which configures server/runtime behavior.

Options

  • 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 - Enables mouse capture. Set it to false to preserve native terminal mouse behavior like selection and scrollback.

Use SLOPCODE_TUI_CONFIG to load a custom TUI config path.


Customization

You can customize various aspects of the TUI view using the command palette (ctrl+x h or /help). These settings persist across restarts.


Username display

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