> ## Documentation Index
> Fetch the complete documentation index at: https://docs.randomlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Hotkey Reference

> Complete reference of all commands and keyboard shortcuts available in Slate CLI

<Info>
  This reference covers all available commands and hotkeys in Slate CLI, with interaction commands prioritized for quick access.
</Info>

## Quick Reference

<Tabs>
  <Tab title="Essential Shortcuts">
    <AccordionGroup>
      <Accordion title="Agent Interaction" defaultOpen>
        <Steps titleSize="p">
          <Step title="Ctrl+X then E">
            **Open external editor** - Compose long prompts in your preferred editor
          </Step>

          <Step title="Ctrl+X then M">
            **Open model picker** - Switch between available models
          </Step>

          <Step title="Ctrl+O">
            **Toggle subagent overlay** - View active subagent sessions
          </Step>

          <Step title="Ctrl+Y">
            **Navigate to parent session** - Return to the parent session from a subagent session
          </Step>

          <Step title="Alt+Up">
            **Edit last queued message** - Pop the latest queued follow-up message back into the composer for editing
          </Step>

          <Step title="Ctrl+X then Q">
            **Edit queue in editor** - Open all queued messages as `---`-separated markdown blocks in your external editor
          </Step>

          <Step title="Ctrl+- / Super+Z">
            **Undo** - Undo the last input edit (on Windows, Ctrl+Z also works as undo)
          </Step>

          <Step title="Ctrl+L">
            **Focus input** - Move focus back to the input box from dialogs or other UI regions
          </Step>

          <Step title="Ctrl+Shift+S">
            **Show shell output** - Expand the shell output panel
          </Step>

          <Step title="Ctrl+Shift+B">
            **Hide shell output** - Collapse the shell output panel
          </Step>

          <Step title="Ctrl+C">
            **Clear input / Exit** - Clears the composer when it has text; exits the application when the composer is empty
          </Step>

          <Step title="Ctrl+D">
            **Exit** - Exits the application when the composer is empty
          </Step>
        </Steps>
      </Accordion>

      <Accordion title="Shell Mode">
        <Steps titleSize="p">
          <Step title="!">
            **Enter shell mode** - Type `!` to enter bash command mode
          </Step>

          <Step title="↑/↓ arrows">
            **Navigate history** - Browse through previous commands
          </Step>

          <Step title="Tab">
            **Autocomplete** - Complete commands and file paths
          </Step>
        </Steps>
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="All Shortcuts">
    <AccordionGroup>
      <Accordion title="Text Editing">
        <CodeGroup>
          ```text Movement theme={null}
          Ctrl+A          Move to beginning of line
          Ctrl+E          Move to end of line
          Ctrl+B / ←      Move left one character
          Ctrl+F / →      Move right one character
          Alt+B           Move back one word
          Alt+F           Move forward one word
          ↑               Move up one line
          ↓               Move down one line
          Home            Move to beginning of line
          End             Move to end of line
          ```

          ```text Deletion theme={null}
          Ctrl+K          Kill (delete) to end of line
          Ctrl+U          Kill (delete) to beginning of line
          Ctrl+W          Delete word to the left
          Alt+Backspace   Delete word to the left
          Alt+Delete      Delete word to the right
          Ctrl+D          Delete character under cursor
          Ctrl+H          Backspace
          Backspace       Delete character before cursor
          Delete          Delete character under cursor
          ```

          ```text Special theme={null}
          Ctrl+L          Focus input box
          Ctrl+P          Navigate history up
          Enter           Submit input (without Ctrl/Meta)
          Ctrl+Enter      Insert newline
          Meta+Enter      Insert newline
          Escape          Cancel current operation
          Double Escape   Enter chat reverse search mode
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Navigation & UI">
        <CodeGroup>
          ```text Dialog Navigation theme={null}
          ↑/↓             Navigate options in dialogs
          Enter           Select current option
          Escape          Cancel/close dialog
          Ctrl+C          Cancel/close dialog
          ```

          ```text Input Navigation theme={null}
          Tab             Autocomplete commands and file paths
          Escape          Cancel/clear input or interrupt agent
          Double Escape   Enter chat reverse search mode
          ```

          ```text Session Management theme={null}
          /sessions       Switch between sessions
          /queue-mode     Toggle queue vs interrupt behavior while busy
          /queue-edit     Edit queued messages in external editor as --- separated markdown blocks
          /exit           Exit application
          Ctrl+C          Graceful shutdown
          ```

          ```text Queue theme={null}
          Alt+Up          Pop latest queued message back into composer
          Ctrl+X then Q   Edit queued messages as ---‑separated blocks in external editor
          /queue-edit     Edit queued messages in external editor as --- separated markdown blocks
          ```
        </CodeGroup>
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

## Slash Commands

<Info>
  All commands start with `/` and support autocomplete with Tab
</Info>

### Core Commands

<Cards cols={2}>
  <Card title="/help" icon="question">
    Show the manual page with all available commands
  </Card>

  <Card title="/sessions" icon="folder">
    Switch to a different session or view available sessions
  </Card>

  <Card title="/models" icon="robot">
    Open the model picker to change the active model
  </Card>

  <Card title="/retry" icon="rotate">
    Retry the last message
  </Card>

  <Card title="/subagents" icon="sitemap">
    View subagent session details and diffs
  </Card>

  <Card title="/usage" icon="chart-bar">
    Show credit usage (remaining and used)
  </Card>

  <Card title="/billing (aliases: /plan, /subscription, /org)" icon="credit-card">
    Switch between personal and organization billing contexts
  </Card>

  <Card title="/docs" icon="book">
    Open Slate documentation in your browser
  </Card>

  <Card title="/new" icon="plus">
    Start a new chat session (`/clear` is still supported as an alias)
  </Card>

  <Card title="/mcps" icon="plug">
    Manage MCP servers and tools
  </Card>

  <Card title="/bug-report" icon="bug">
    Submit a bug report
  </Card>

  <Card title="/exit" icon="door-open">
    Exit the application
  </Card>

  <Card title="/queue-mode" icon="layer-group">
    Toggle between queuing messages while the agent is busy, or interrupting the current run and sending your message next
  </Card>

  <Card title="/queue-edit" icon="pen-to-square">
    Edit queued messages in external editor as --- separated markdown blocks
  </Card>
</Cards>

### Agent & Session Controls

<AccordionGroup>
  <Accordion title="/rename - Rename the current session">
    Rename the active session.
  </Accordion>

  <Accordion title="/timestamps (alias: /timestamp) - Toggle message timestamps">
    Show or hide message timestamps in the current session.
  </Accordion>

  <Accordion title="/permission-mode (aliases: /perm-mode, /yolo) - Toggle session permission mode">
    Toggle between default permission prompts and session yolo mode.
  </Accordion>

  <Accordion title="/model-next (aliases: /next-model, /cycle-model) - Cycle the main model">
    Switch to the next configured main model.
  </Accordion>

  <Accordion title="/effort-next (aliases: /next-effort, /cycle-thinking) - Cycle thinking level">
    Switch to the next available thinking/effort level for the current model.
  </Accordion>

  <Accordion title="/editor - Open external editor">
    Open your configured external editor for composing a prompt.
  </Accordion>

  <Accordion title="/config (aliases: /settings, /approvals) - Open workspace config">
    Open workspace configuration and permissions.
  </Accordion>
</AccordionGroup>

### Workspace Management

<AccordionGroup>
  <Accordion title="/workspace (alias: /workspaces) - Manage workspace directories">
    Open the workspace manager to add, remove, and review workspace directories.
  </Accordion>

  <Accordion title="/add-dir - Quick workspace addition">
    Open workspace management with quick-add flow for directories.
  </Accordion>
</AccordionGroup>

### Theme Commands

<Cards cols={2}>
  <Card title="/theme" icon="palette">
    Open the theme picker and switch themes
  </Card>

  <Card title="/theme (alias: /themes)" icon="eye">
    Alias support for opening the theme picker
  </Card>

  <Card title="/man (alias: /manual)" icon="wand-magic-sparkles">
    Open the built-in manual page
  </Card>
</Cards>

### System Commands

<AccordionGroup>
  <Accordion title="Authentication & Account">
    <Steps titleSize="p">
      <Step title="/auth">
        Login to your Slate account
      </Step>

      <Step title="/logout">
        Logout from your current account
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="Application Management">
    <Steps titleSize="p">
      <Step title="/version">
        Check the current version of Slate CLI
      </Step>

      <Step title="/docs">
        Open Slate documentation in your browser
      </Step>

      <Step title="/config">
        Open workspace configuration and permissions
      </Step>

      <Step title="/man">
        Open the built-in manual page
      </Step>

      <Step title="/usage">
        View credit usage and remaining balance
      </Step>

      <Step title="/billing (aliases: /plan, /subscription, /org)">
        Switch billing context (personal/organization)
      </Step>

      <Step title="/mcps">
        Manage MCP servers and tools
      </Step>

      <Step title="/workspace (alias: /workspaces)">
        Open workspace manager
      </Step>

      <Step title="/add-dir">
        Quick-add a workspace directory
      </Step>

      <Step title="/queue-mode">
        Toggle queue vs interrupt behavior while the agent is busy
      </Step>

      <Step title="/queue-edit">
        Edit queued messages in external editor as --- separated markdown blocks
      </Step>

      <Step title="/exit">
        Exit the application gracefully
      </Step>
    </Steps>
  </Accordion>
</AccordionGroup>

## Shell Mode

<Info>
  Type `!` at the beginning of a line to enter shell mode for direct command execution
</Info>

### Shell Mode Features

<Columns cols={2}>
  <div>
    **Command Execution**

    * Run any shell command directly
    * Commands execute in the current workspace
    * Output is captured and displayed
    * Exit codes are reported
  </div>

  <div>
    **History & Completion**

    * Full command history with **↑/↓** arrows
    * **Tab** completion for commands and paths
    * Persistent history across sessions
  </div>
</Columns>

### Common Shell Operations

<CodeGroup>
  ```bash File Operations theme={null}
  !ls -la              # List files in detail
  !pwd                 # Show current directory
  !cd src              # Change directory
  !cat README.md       # Display file contents
  !mkdir new-folder    # Create directory
  ```

  ```bash Git Operations theme={null}
  !git status          # Check git status
  !git diff            # Show changes
  !git add .           # Stage changes
  !git commit -m "msg" # Commit changes
  !git push            # Push to remote
  ```

  ```bash Development theme={null}
  !npm install         # Install dependencies
  !npm test            # Run tests
  !npm run build       # Build project
  !python script.py    # Run Python script
  !cargo build         # Build Rust project
  ```
</CodeGroup>

## Special Key Combinations

<Tabs>
  <Tab title="Dialog Controls">
    | Key        | Action             |
    | ---------- | ------------------ |
    | **Enter**  | Confirm/Select     |
    | **Escape** | Cancel/Close       |
    | **Ctrl+C** | Force close/Cancel |
    | **↑/↓**    | Navigate options   |
    | **Tab**    | Move to next field |
  </Tab>

  <Tab title="Paste Mode">
    <Note>
      Slate automatically detects when you're pasting content and handles it appropriately
    </Note>

    * **Paste detection** is automatic
    * **Multi-line pastes** are preserved
    * **File paths** are automatically referenced when dragged and dropped
    * **Code blocks** maintain formatting
  </Tab>
</Tabs>

## Tips & Tricks

<AccordionGroup>
  <Accordion icon="book-bookmark" title="Efficient Navigation">
    * Press **Tab** after typing `/` to see all available commands with autocomplete
    * Use the **up arrow** in shell mode to quickly find previous commands
    * Drag and drop files directly into the prompt for automatic path references
  </Accordion>

  <Accordion icon="head-side-gear" title="Productivity Shortcuts">
    * **Ctrl+X then E** opens your system's default editor for composing complex prompts
    * **Ctrl+X then M** opens the model picker to switch models without leaving the chat
    * Use `/workspace add .` to quickly add the current directory
    * Chain shell commands with `!command1 && command2`
  </Accordion>

  <Accordion icon="code" title="Advanced Usage">
    * Use **Ctrl+O** to inspect subagent sessions while they run
    * Theme switching persists across sessions
  </Accordion>
</AccordionGroup>

## Exit Codes

<Note>
  Understanding exit codes helps diagnose issues when commands fail
</Note>

| Code    | Description                      |
| ------- | -------------------------------- |
| **0**   | Success                          |
| **1**   | General error or invalid usage   |
| **2**   | Misuse of shell command          |
| **126** | Command found but not executable |
| **127** | Command not found                |
| **128** | Invalid exit argument            |
| **130** | User interrupted (**Ctrl+C**)    |
