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

# Tool Setup

> Configure AI coding tools to route through Unbound using the CLI

The `unbound setup` command configures AI coding tools to route through Unbound. It handles authentication, environment variables, and tool-specific config files automatically.

If you are not logged in and `--api-key` is not provided, the browser opens automatically to authenticate before setup begins.

## Interactive setup

Run with no arguments to select tools from an interactive menu:

```bash theme={null}
unbound setup
```

## Default bundle

Install Cursor, Claude Code (hooks), and Codex (hooks) in one command:

```bash theme={null}
unbound setup --all
```

## Individual tools

### Cursor

```bash theme={null}
unbound setup cursor
```

### Claude Code

Claude Code supports two modes:

```bash theme={null}
unbound setup claude-code --gateway        # Unbound as the AI provider — no Anthropic subscription needed
unbound setup claude-code --subscription   # Hooks only — keep your existing Anthropic subscription
```

Run without a flag for interactive mode selection.

### Gemini CLI

```bash theme={null}
unbound setup gemini-cli
```

### Codex

```bash theme={null}
unbound setup codex --gateway              # Unbound as the AI provider — no OpenAI subscription needed
unbound setup codex --subscription         # Hooks only — keep your existing OpenAI subscription
```

## Instruction-only tools

These tools require manual configuration. The CLI prints the API key and base URL to enter in each tool's settings.

| Tool              | Command                       |
| ----------------- | ----------------------------- |
| Roo Code          | `unbound setup roo-code`      |
| Cline             | `unbound setup cline`         |
| Kilo Code         | `unbound setup kilo-code`     |
| Direct API access | `unbound setup custom-access` |

## One-step login + setup

Combine authentication and setup in a single command with `--api-key`:

```bash theme={null}
# Single tool:
unbound setup cursor --api-key <key>

# Multiple tools (use explicit mode names when combining):
unbound setup cursor claude-code-gateway --api-key <key>

# Login, then select interactively:
unbound setup --api-key <key>
```

When specifying multiple tools in one command, use the explicit form names:

| Short form                   | Explicit form              |
| ---------------------------- | -------------------------- |
| `claude-code --gateway`      | `claude-code-gateway`      |
| `claude-code --subscription` | `claude-code-subscription` |
| `codex --gateway`            | `codex-gateway`            |
| `codex --subscription`       | `codex-subscription`       |

## Remove configuration

```bash theme={null}
unbound setup cursor --clear
unbound setup claude-code --clear
unbound setup gemini-cli --clear
unbound setup codex --clear
```

***

## One-step onboarding

`unbound onboard` runs `setup --all` followed by device discovery in a single command. Useful for new user enrollment:

```bash theme={null}
unbound onboard --api-key <USER_KEY> --discovery-key <DISCOVERY_KEY>
```

***

## MDM setup (admin, requires root)

For organization admins enrolling devices via MDM, `unbound setup mdm` configures all users on the device:

```bash theme={null}
# Install the default bundle for all users:
sudo unbound setup mdm --admin-api-key KEY --all

# Specific tools:
sudo unbound setup mdm --admin-api-key KEY cursor codex-subscription
sudo unbound setup mdm --admin-api-key KEY claude-code-subscription codex-subscription gemini-cli

# Remove MDM config:
sudo unbound setup mdm --admin-api-key KEY --clear cursor
```

For device-wide onboarding in one step:

```bash theme={null}
sudo unbound onboard-mdm --admin-api-key <ADMIN_KEY> --discovery-key <DISCOVERY_KEY>
```

<Note>
  MDM setup requires root and is intended for administrators deploying Unbound across an organization's device fleet. See [MDM Integrations](/mdm-integrations/overview) for deployment guides.
</Note>
