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
/rename—Rename the current session
/share—Share the full session to the Knowledge Hub and copy a share link
/unshare—Stop sharing — deletes the session document from the Knowledge Hub
/shared—Browse sessions shared to your Knowledge Hub and import one
/import—Import a shared session by pasting a share URL or document ID
/timeline—Jump to a specific message
/fork—Fork the session from a chosen message
/compact/summarizeCompact the session context (optional instructions, e.g. /compact Keep the API definitions)
/undo—Undo the previous message and its changes
/redo—Redo a previously undone message
/copy—Copy the full session transcript
/export—Export the session transcript to your editor
/timestamps/toggle-timestampsShow or hide message timestamps
/thinking/toggle-thinkingShow or hide model reasoning blocks
/computer-use/toggle-computer-useToggle computer use (OS GUI control) for the current session — see Computer Use
/voice/toggle-voiceEnable or disable voice (mic input and spoken callouts) for the current session — see Voice

Agent & Model​

CommandAliasesDescription
/models—Switch model
/agents—Switch agent (Build, TF Engineer, TF Orchestrate)
/plan—Enter Plan mode (read-only except the plan file)
/task—Leave Plan mode and resume task execution
/profile—Switch profile
/mcps—Toggle MCP servers
/plugins—Toggle built-in plugins

Workspace & Provider​

CommandAliasesDescription
/workspaces—Manage workspaces (experimental)
/connect—Connect a provider

System​

CommandAliasesDescription
/status—View TF Code status
/themes—Switch theme
/help—Open the built-in help
/changelog—View the changelog
/update—Auto-update settings
/exit/quit, /qExit the application

Prompt​

CommandAliasesDescription
/editor—Open the prompt in your external $EDITOR
/skills—Browse and invoke installed skills
/prompts—Browse and insert saved prompts
/tf_mcp—Browse ToothFairyAI MCP tools
/hooks—Manage 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)
SkillsSkills are registered as slash commands automatically — typing /skill-name loads the skill's content into context. Also browsable via /skills./cybersecurity

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.