Commands
TF Code's interactive TUI offers two ways to discover and run commands:
| Trigger | What it does |
|---|---|
Ctrl+P | Opens 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
| Command | Aliases | Description |
|---|---|---|
/new | /clear | Create a new session |
/sessions | /resume, /continue | Switch to an existing session |
/rename | — | Rename the current session |
/share | — | Share the session or copy a share link |
/unshare | — | Stop sharing the current session |
/timeline | — | Jump to a specific message |
/fork | — | Fork the session from a chosen message |
/compact | /summarize | Compact 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-timestamps | Show or hide message timestamps |
/thinking | /toggle-thinking | Show or hide model reasoning blocks |
Agent & Model
| Command | Aliases | Description |
|---|---|---|
/models | — | Switch model |
/agents | — | Switch agent (Build, Plan, TF Engineer) |
/profile | — | Switch profile |
/mcps | — | Toggle MCP servers |
/plugins | — | Toggle built-in plugins |
Workspace & Provider
| Command | Aliases | Description |
|---|---|---|
/workspaces | — | Manage workspaces (experimental) |
/connect | — | Connect a provider |
System
| Command | Aliases | Description |
|---|---|---|
/status | — | View TF Code status |
/themes | — | Switch theme |
/help | — | Open the built-in help |
/changelog | — | View the changelog |
/update | — | Auto-update settings |
/exit | /quit, /q | Exit the application |
Prompt
| Command | Aliases | Description |
|---|---|---|
/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.
| Command | Description |
|---|---|
/init | Create or update the AGENTS.md project instructions file |
/review | Review 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:
| Source | How it appears | Example |
|---|---|---|
| Custom commands | Any .md file in .tfcode/command/ or .tfcode/commands/, or entries in tfcode.json under command. Supports $ARGUMENTS, $1, $2 placeholders. | /.my-command <args> |
| MCP prompts | Prompts from connected MCP servers appear with a :mcp suffix. | /summarize:mcp |
| Builtin plugin commands | Available only when the corresponding plugin is enabled in config. | /goal (from the goal plugin) |
| Skills | Invoked 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
| Shortcut | Action |
|---|---|
<leader>l | Switch session (/sessions) |
<leader>n | New session (/new) |
<leader>g | Jump to message (/timeline) |
<leader>c | Compact session (/compact) |
<leader>x | Export session (/export) |
<leader>u | Undo message (/undo) |
<leader>r | Redo message (/redo) |
<leader>y | Copy last assistant message |
Ctrl+R | Rename session |
Ctrl+D | Delete session |
<leader>b | Toggle sidebar |
<leader>h | Toggle code block concealment |
Escape | Interrupt active session |
Agent & Model
| Shortcut | Action |
|---|---|
Tab | Next agent |
Shift+Tab | Previous agent |
<leader>a | List agents (/agents) |
<leader>m | List models (/models) |
F2 | Next recently used model |
Shift+F2 | Previous recently used model |
Ctrl+F | Toggle model favorite |
Ctrl+A | Open provider list (from model dialog) |
Ctrl+T | Cycle reasoning effort |
Scrolling
| Shortcut | Action |
|---|---|
PageUp / Ctrl+Alt+B | Scroll up one page |
PageDown / Ctrl+Alt+F | Scroll down one page |
Ctrl+Alt+U | Scroll up half page |
Ctrl+Alt+D | Scroll down half page |
Ctrl+Alt+Y | Scroll up one line |
Ctrl+Alt+E | Scroll down one line |
Ctrl+G / Home | First message |
Ctrl+Alt+G / End | Last message |
System
| Shortcut | Action |
|---|---|
Ctrl+P | Open command palette |
<leader>t | Switch theme (/themes) |
<leader>s | View status (/status) |
<leader>e | Open external editor (/editor) |
<leader>q / Ctrl+C / Ctrl+D | Exit |
Ctrl+Z | Suspend terminal |
Input Editing
| Shortcut | Action |
|---|---|
Return | Submit prompt |
Shift+Return / Ctrl+Return / Alt+Return / Ctrl+J | Insert newline |
Ctrl+V | Paste from clipboard |
Ctrl+C | Clear input |
Ctrl+A | Move to start of line |
Ctrl+E | Move to end of line |
Ctrl+W / Ctrl+Backspace | Delete word backward |
Alt+D / Ctrl+Delete | Delete word forward |
Ctrl+K | Delete to end of line |
Ctrl+U | Delete to start of line |
Ctrl+Shift+D | Delete entire line |
Ctrl+- / Cmd+Z | Undo input |
Ctrl+. / Cmd+Shift+Z | Redo 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.