> ## 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), Codex (hooks), Copilot (hooks), and Augment (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.

<Warning>
  The bare `unbound setup claude-code` (no flag) and `unbound setup codex` (no flag) commands open an interactive prompt to pick a mode. In a non-interactive shell (CI, SSH with `< /dev/null`, MDM bootstrap) the prompt has no input source and the command exits immediately without writing any config. Always pass `--gateway` or `--subscription` explicitly in headless environments.
</Warning>

### 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
```

### GitHub Copilot

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

Hooks-based — works with both the VS Code extension and the `copilot` CLI on your existing Copilot subscription.

### Augment Code

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

Hooks-based — works with both the Augment VS Code extension and the Auggie CLI.

## 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
unbound setup copilot --clear
unbound setup augment --clear
```

Remove every tool's configuration in one command:

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

## Uninstall everything

`unbound nuke` (alias `unbound uninstall`) removes Unbound entirely and returns the CLI to a fresh state: it clears tool configuration and deletes your stored credentials (`~/.unbound/config.json`). When it finishes, run `unbound login` (or `unbound onboard`) to set things up again.

The scope follows your privileges — no flag to pick:

```bash theme={null}
# Without root: clears your tools + credentials (MDM/system-level config is skipped)
unbound nuke

# With root: also clears MDM (system-level) config for all users on the device
sudo unbound nuke
```

Add `--yes` to skip the confirmation prompt.

***

## Setup flags

| Flag         | Purpose                                                                                                                                                             |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--api-key`  | Authenticate inline rather than via the browser flow                                                                                                                |
| `--all`      | Install the default bundle (Cursor + Claude Code hooks + Codex hooks + Copilot hooks + Augment hooks)                                                               |
| `--clear`    | Remove a tool's configuration instead of installing it                                                                                                              |
| `--backfill` | Re-apply setup against tools that are already installed. Useful after upgrading the hook bundle so existing installs pick up the new hooks without a full reinstall |

***

## 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)

Scope is automatic: run `unbound setup` / `unbound onboard` **with `sudo`** to configure every user on the device (MDM/org scope), or **without `sudo`** to set up just the current user. For organization admins enrolling devices via MDM, run `unbound setup` with `sudo` to configure all users on the device:

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

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

# Remove config:
sudo unbound setup --clear cursor
```

For device-wide onboarding in one step:

```bash theme={null}
sudo unbound onboard --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>
