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

# Prerequisites

> Install and authenticate the Claude Code or Codex CLI agents that power TermMate's chat sessions inside Sublime Text and VS Code editors.

TermMate connects to external CLI-based agents to drive its core capabilities. Complete the steps below before starting a chat session.

## 1. Install TermMate

### Sublime Text

<img src="https://mintcdn.com/termmate/eAR6DMESBKxwyRGr/images/command-palette.png?fit=max&auto=format&n=eAR6DMESBKxwyRGr&q=85&s=de2d0fef8a55e64878230350173eafa8" alt="Install TermMate via Package Control" width="950" height="444" data-path="images/command-palette.png" />

Install TermMate via [Package Control](https://packagecontrol.io/packages/TermMate):

1. Open the Command Palette (`Cmd+Shift+P` on macOS, `Ctrl+Shift+P` on Windows/Linux).
2. Type `Package Control: Install Package` and press `Enter`.
3. Search for `TermMate` and press `Enter`.

<img src="https://mintcdn.com/termmate/eAR6DMESBKxwyRGr/images/package-control-install.png?fit=max&auto=format&n=eAR6DMESBKxwyRGr&q=85&s=215ed55d5c615cd48df079c40d27bd0f" alt="Select Install Package" width="950" height="444" data-path="images/package-control-install.png" />

<img src="https://mintcdn.com/termmate/eAR6DMESBKxwyRGr/images/package-control-termmate.png?fit=max&auto=format&n=eAR6DMESBKxwyRGr&q=85&s=5e74894c92209b126713053e2fa6efb8" alt="Search TermMate" width="950" height="444" data-path="images/package-control-termmate.png" />

### VS Code

Install TermMate from the Visual Studio Code Marketplace:

[marketplace.visualstudio.com → TermMate](https://marketplace.visualstudio.com/items?itemName=termmate-app.termmate-vs)

Or search **TermMate** directly in the VS Code Extensions panel (`Cmd+Shift+X`).

<img src="https://mintcdn.com/termmate/eAR6DMESBKxwyRGr/images/vs-ext-termmate.png?fit=max&auto=format&n=eAR6DMESBKxwyRGr&q=85&s=fcc1cc942085f5d673508e3f273b9088" alt="Search TermMate in VS Code" width="950" height="444" data-path="images/vs-ext-termmate.png" />

## 2. Install Agent CLI

The easiest way to install an agent is directly from within your editor: open the Command Palette, type `TermMate: Install Agent`, and select the agent you want. TermMate will run the installation in a dedicated panel and notify you when it's complete. You can also run `TermMate: Install Agent` at any time later to add more agents.

**Or install manually from your terminal:**

### Claude Code (Recommended)

Claude Code is Anthropic's official terminal-based coding agent.

```bash theme={null}
curl -fsSL https://claude.ai/install.sh | bash
```

### Codex

Codex is OpenAI's coding agent.

<Tabs>
  <Tab title="macOS / Linux">
    ```bash theme={null}
    curl -fsSL https://chatgpt.com/codex/install.sh | sh
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
    ```
  </Tab>
</Tabs>

### Pi Agent

Pi Agent is a Gemini-powered coding agent by Pi.

```bash theme={null}
curl -fsSL https://pi.dev/install.sh | sh
```

<Note>
  TermMate automatically detects CLI installation paths across multiple environments, including **Homebrew**, **npm-global**, **Yarn**, and common local binary directories. You typically don't need to manually configure environment variables or search paths.
</Note>

## 3. Authentication

Once installed, authenticate the agents via your terminal before starting a session in TermMate. Alternatively, you can skip CLI login by setting API keys directly in TermMate's settings (`Preferences → Package Settings → TermMate → Settings`):

```json theme={null}
{
    "env": {
        "ANTHROPIC_API_KEY": "sk-ant-...",
        "OPENAI_API_KEY": "sk-...",
        "GEMINI_API_KEY": "your-gemini-api-key"
    }
}
```

### Claude Code

```bash theme={null}
/login
```

### Codex

```bash theme={null}
codex login
```

### Pi Agent

```bash theme={null}
/login
```
