Skip to content

Terminal UI

Sloppy ships with a full-screen terminal UI for local agent work. It uses the same runtime, workspace, project resolution, providers, agents, sessions, MCP servers, and persistence as the rest of Sloppy, but keeps the main chat loop inside your terminal.

Use it when you want the fastest local path: open a project directory, start Sloppy, ask questions, attach files, switch models, and resume the same session later without opening the Dashboard.

Start the TUI

From a project directory:

bash
sloppy

The explicit command is:

bash
sloppy tui

Useful variants:

bash
sloppy tui --config-path /path/to/sloppy.json
sloppy -s <sessionId>
sloppy tui -s <sessionId>
sloppy models

sloppy with no subcommand opens the TUI. sloppy tui does the same thing explicitly. sloppy -s and sloppy tui -s resume an existing agent session for the current directory. sloppy models opens the same terminal picker directly in model-selection mode and exits after a model is chosen.

The TUI bootstraps Sloppy in-process, so you do not need a separate sloppy run server for a local terminal chat. It still uses the same sloppy.json and workspace files.

What It Opens

On startup the TUI:

  • resolves or creates a Sloppy project for the current working directory
  • restores the last selected agent and session for that project
  • creates a default sloppy agent when no user agents exist
  • resumes the newest session for the selected agent, or creates a TUI chat session
  • stores TUI state under the workspace root at tui/state.json

The opening screen shows the active mode, model, project, agent, and provider. The bottom composer is where you type messages or slash commands.

Core Keys

KeyAction
EnterSend the current message or apply the selected picker item
TabCycle chat mode when typing normally; complete/apply a command, model, session, agent, provider, or file picker when one is open
EscClose the active picker or command palette
Up / DownMove through active picker suggestions
PageUp / PageDownScroll chat history by pages
Option+Up / Ctrl+UpScroll history upward by a few lines
Option+Down / Ctrl+DownScroll history downward by a few lines
Option+Home / Ctrl+HomeJump to the start of history
Option+End / Ctrl+EndJump back to the bottom
Ctrl+CExit the TUI

Chat modes cycle as Ask -> Build -> Plan -> Debug -> Ask. The selected mode is sent with the next user message.

Model and Provider Setup

Switch models with the picker:

text
/model

Or set a model directly:

text
/model openai:gpt-5.4-mini
/model anthropic:claude-sonnet-4-6

Configure providers from inside the TUI:

text
/provider
/provider openai-api <api-key> [model]
/provider openrouter <api-key> [model]
/provider gemini <api-key> [model]
/provider anthropic <api-key> [model]
/provider ollama
/openai-device
/anthropic-oauth

/provider opens a provider picker. API-key providers save a model entry into sloppy.json. ollama uses the local Ollama server. /openai-device starts Codex device auth. /anthropic-oauth starts the Anthropic browser OAuth flow and expects the callback URL to be pasted back with /anthropic-callback <url>.

Sessions, Agents, and Context

CommandPurpose
/agentsSwitch agent
/sessions or /resumeSwitch session for the current agent and project
/newCreate a checkpointed new session from the current one
/fork <task>Create a child session and optionally send the task immediately
/statusShow project, agent, session id, resume command, model, provider, and pet state
/compactRequest a memory checkpoint for the current session
/stopInterrupt the current run tree

Use /status when you need the exact resume command:

text
/status

The card includes a shortcut such as:

bash
sloppy -s <sessionId>

Attach Files and Project Paths

Use @path inside a message to inline project files as explicit context:

text
Please review @Sources/sloppy/TUI/SloppyTUIScreen.swift

The TUI indexes project files and offers @path completions. Paths with spaces are escaped automatically. Up to eight @path references from a single message are expanded into the prompt context.

You can also attach files by pasting file paths into the composer. On macOS, Ctrl+V can attach file or image data from the clipboard. Individual pasted attachments are limited to 25 MiB.

For git context:

text
/diff
/context changes
/context diff

/diff displays the current working tree diff. /context changes attaches the latest watched change list to the next message. /context diff attaches the git diff to the next message.

Slash Commands

CommandPurpose
/helpShow TUI commands and scroll keys
/statusShow current project, agent, session, model, provider, and resume command
/petToggle the terminal Sloppie pet and show its face/status
/agentsSwitch agent
/sessions, /resumeSwitch session
/newCreate a new session
/clearClear local TUI cards
/stopInterrupt the current run
/restore, /upRestart the current session after a failed or interrupted run
/undoUndo file changes from the last completed TUI turn
/redoRedo the last undone TUI turn
/btw <message>Ask a side question without changing the current main message flow
/compactRequest session compaction
/add_dir <path>Add a working directory to the current session
/fork <task>Branch the current conversation
/bar <color>Change the left accent bar color
/copyCopy the last assistant response to the clipboard on macOS
/diffShow uncommitted git changes
/effort low|medium|high|defaultSet reasoning effort for future messages
/skillsShow enabled agent skills and their slash aliases
/editorReturn focus to the composer
/model [model]Open the model picker or switch directly
/context changes|diffQueue workspace changes or git diff for the next message
/tasksShow project tasks
/mcpsShow MCP server statuses
/provider [id key model]Configure or switch providers
/openai-deviceStart OpenAI Codex device auth
/anthropic-oauthStart Anthropic OAuth
/anthropic-callback <url>Complete Anthropic OAuth
/quit or /exitExit the TUI

Skill-provided slash commands also appear in the command palette and are forwarded to the agent when invoked.

/restore and /up send a recovery message into the active session transcript. Use them after a transient failure, such as a lost network request, when you want the agent to continue the previous unfinished task without creating a new session.

Undo and redo history is scoped to the active session during the current TUI run. Switching sessions restores that session's own undo stack without mixing changes from other chats.

State and Persistence

The TUI uses the configured Sloppy workspace, so sessions, messages, agents, tasks, memories, logs, and MCP configuration remain shared with the Dashboard and CLI.

TUI-only state is small and local:

  • last selected agent and session per project
  • unsent composer drafts per project/agent/session
  • terminal pet visibility

This state is stored at:

text
<workspace-root>/tui/state.json

The default workspace root is controlled by workspace.basePath and workspace.name in sloppy.json.

Built from docs/ and styled to match the live Dashboard shell.