# Install SpringBrand in Codex CLI

Install SpringBrand in Codex CLI with a key, OAuth, or the client Plugin.

## 1. Install with a key (recommended)

Choose one option to install SpringBrand CLI for Codex CLI: send the prompt in your Agent chat, or run the command yourself.

### Option A: Agent chat

Paste this prompt into Codex CLI. If asked for a key, open [Account Settings → MCP API Keys](https://rapp.springbrand.ai/account-settings?section=mcp-api-keys) and click **View installation key** or **Create key**.

**Copyable · Paste into your Agent chat**

```text
Install or update SpringBrand CLI for Codex CLI using https://plugin.springbrand.ai/INSTALL.cli.codex.md. Configure only Codex CLI. If you need an installation key, ask me for it.
```

### Option B: Run the command yourself

Get a key from [Account Settings → MCP API Keys](https://rapp.springbrand.ai/account-settings?section=mcp-api-keys), then replace `{{INSTALL_KEY}}` in this reference command before running it. The command as shown cannot run.

**Reference example · Replace {{INSTALL_KEY}} before running**

```shell
npx -y @springbrand/cli@latest connect codex --url https://connector.springbrand.ai/mcp --api-key {{INSTALL_KEY}}
```

After installation, check the report for a healthy connection and open a new Codex CLI session if asked.

## 2. If you cannot use a key: OAuth

If you cannot use a key, ask your Agent to follow the OAuth instructions in the installation guide. You can also run the command below yourself after clearing any saved key and `SPRINGBRAND_API_KEY`, then finish browser sign-in. A saved key can prevent OAuth from starting; see the [production guide](https://plugin.springbrand.ai/INSTALL.md) for how to clear it.

**Manual OAuth command · Clear saved keys first**

```shell
npx -y @springbrand/cli@latest connect codex --url https://connector.springbrand.ai/mcp
```

## 3. If the SpringBrand CLI fails: Codex Plugin

Use the host’s native Plugin path only if the SpringBrand CLI installer cannot run or reports an installation failure. Check for an existing SpringBrand Plugin or MCP entry before adding another.

These are **Codex CLI commands**, not SpringBrand CLI commands. Codex CLI 0.147.0+ uses them to add the SpringBrand Marketplace, install the Plugin, and sign in to its bundled MCP connection.

**Codex Plugin fallback · Run only after CLI failure**

```shell
codex plugin marketplace add springbrand-lab/springbrand-agent-setup
codex plugin add springbrand@springbrand
codex mcp login springbrand
```

Open a new session after installation. Do not create another global SpringBrand MCP entry for the same Plugin.

## Authorize and verify

For CLI setup, check the CLI report. For the Plugin, follow its sign-in and connection checks above. Then open a new Codex CLI session.

## Next steps

- [Run your first task](/developers/docs/quickstart#run-your-first-task): Send a first prompt and see SpringBrand tools in action.
- [Connect another agent](/developers/docs/connect/codex-desktop): Install SpringBrand in ChatGPT Desktop and more.
