Skip to main content

Commands

TF Code's interactive TUI offers two ways to discover and run commands:

TriggerWhat it does
Ctrl+POpens the command palette — a searchable list of every registered command, with keybind hints and categories.
/Shows slash command autocomplete at the cursor. Includes both built-in commands and dynamic server-side commands (custom, MCP, plugin-sourced). Type a few characters to filter, then press Enter.

Many commands work in both modes — if a command has a slash alias, you can run it by typing /name or by opening the palette with Ctrl+P and selecting it.


Slash Commands

Type / at the start of the prompt to see autocomplete. Commands are grouped by category.

Session

CommandAliasesDescription
/new/clearCreate a new session
/sessions/resume, /continueSwitch to an existing session
/renameRename the current session
/shareShare the session or copy a share link
/unshareStop sharing the current session
/timelineJump to a specific message
/forkFork the session from a chosen message
/compact/summarizeCompact the session context (optional instructions, e.g. /compact Keep the API definitions)
/undoUndo the previous message and its changes
/redoRedo a previously undone message
/copyCopy the full session transcript
/exportExport the session transcript to your editor
/timestamps/toggle-timestampsShow or hide message timestamps
/thinking/toggle-thinkingShow or hide model reasoning blocks

Agent & Model

CommandAliasesDescription
/modelsSwitch model
/agentsSwitch agent (Build, Plan, TF Engineer)
/profileSwitch profile
/mcpsToggle MCP servers
/pluginsToggle built-in plugins

Workspace & Provider

CommandAliasesDescription
/workspacesManage workspaces (experimental)
/connectConnect a provider

System

CommandAliasesDescription
/statusView TF Code status
/themesSwitch theme
/helpOpen the built-in help
/changelogView the changelog
/updateAuto-update settings
/exit/quit, /qExit the application

Prompt

CommandAliasesDescription
/editorOpen the prompt in your external $EDITOR
/skillsBrowse and invoke installed skills
/promptsBrowse and insert saved prompts
/tf_mcpBrowse ToothFairyAI MCP tools
/hooksManage session hooks

Built-in Server Commands

These commands are provided by TF Code itself and appear in slash autocomplete alongside the TUI commands above.

CommandDescription
/initCreate or update the AGENTS.md project instructions file
/reviewReview changes (uncommitted by default; supports commit, branch, or pr targets). Runs as a subtask.

Dynamic Commands

TF Code also discovers commands from several runtime sources:

SourceHow it appearsExample
Custom commandsAny .md file in .tfcode/command/ or .tfcode/commands/, or entries in tfcode.json under command. Supports $ARGUMENTS, $1, $2 placeholders./.my-command <args>
MCP promptsPrompts from connected MCP servers appear with a :mcp suffix./summarize:mcp
Builtin plugin commandsAvailable only when the corresponding plugin is enabled in config./goal (from the goal plugin)
SkillsInvoked via /skills rather than directly.

Keyboard Shortcuts

The default leader key is Ctrl+X (shown as <leader> below). All keybinds are configurable in tui.json under keybinds.

Sessions & Navigation

ShortcutAction
<leader>lSwitch session (/sessions)
<leader>nNew session (/new)
<leader>gJump to message (/timeline)
<leader>cCompact session (/compact)
<leader>xExport session (/export)
<leader>uUndo message (/undo)
<leader>rRedo message (/redo)
<leader>yCopy last assistant message
Ctrl+RRename session
Ctrl+DDelete session
<leader>bToggle sidebar
<leader>hToggle code block concealment
EscapeInterrupt active session

Agent & Model

ShortcutAction
TabNext agent
Shift+TabPrevious agent
<leader>aList agents (/agents)
<leader>mList models (/models)
F2Next recently used model
Shift+F2Previous recently used model
Ctrl+FToggle model favorite
Ctrl+AOpen provider list (from model dialog)
Ctrl+TCycle reasoning effort

Scrolling

ShortcutAction
PageUp / Ctrl+Alt+BScroll up one page
PageDown / Ctrl+Alt+FScroll down one page
Ctrl+Alt+UScroll up half page
Ctrl+Alt+DScroll down half page
Ctrl+Alt+YScroll up one line
Ctrl+Alt+EScroll down one line
Ctrl+G / HomeFirst message
Ctrl+Alt+G / EndLast message

System

ShortcutAction
Ctrl+POpen command palette
<leader>tSwitch theme (/themes)
<leader>sView status (/status)
<leader>eOpen external editor (/editor)
<leader>q / Ctrl+C / Ctrl+DExit
Ctrl+ZSuspend terminal

Input Editing

ShortcutAction
ReturnSubmit prompt
Shift+Return / Ctrl+Return / Alt+Return / Ctrl+JInsert newline
Ctrl+VPaste from clipboard
Ctrl+CClear input
Ctrl+AMove to start of line
Ctrl+EMove to end of line
Ctrl+W / Ctrl+BackspaceDelete word backward
Alt+D / Ctrl+DeleteDelete word forward
Ctrl+KDelete to end of line
Ctrl+UDelete to start of line
Ctrl+Shift+DDelete entire line
Ctrl+- / Cmd+ZUndo input
Ctrl+. / Cmd+Shift+ZRedo input

Creating Custom Commands

Add a Markdown file to .tfcode/command/ (or .tfcode/commands/):

mkdir -p .tfcode/command
<!-- .tfcode/command/commit.md -->
---
description: "Write and run a conventional commit"
---

Look at the staged changes with `git diff --cached` and create a conventional commit.

Placeholders in the template body are replaced at invocation:

  • $ARGUMENTS — everything after the command name
  • $1, $2, … — individual positional arguments

Example:

/refactor "Extract the auth middleware into its own module"

The file appears as /refactor in slash autocomplete automatically.