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

# AI Plugin

> Install the Control Plane AI Plugin in Claude Code, Codex, or Antigravity CLI.

## Install

<Tabs>
  <Tab title="Claude Code" icon="https://mintcdn.com/controlplanecorporation/rFQpIcXts1y-5L7u/icons/claude.svg?fit=max&auto=format&n=rFQpIcXts1y-5L7u&q=85&s=8b0f9fcceff42ac846ff975af5126fb4" width="248" height="248" data-path="icons/claude.svg">
    Add the marketplace, install the plugin, then reload:

    ```text theme={null}
    /plugin marketplace add https://github.com/controlplane-com/ai-plugin.git
    /plugin install cpln@controlplane
    /reload-plugins
    ```

    <Tip>
      To enable auto-update, run `/plugin`, use the `<` / `>` arrow keys to navigate to the **Marketplaces** tab, select **controlplane**, and choose **Enable auto-update**. Otherwise update manually with `/plugin marketplace update controlplane` followed by `/reload-plugins`.
    </Tip>
  </Tab>

  <Tab title="Codex" icon="https://mintcdn.com/controlplanecorporation/rFQpIcXts1y-5L7u/icons/codex.svg?fit=max&auto=format&n=rFQpIcXts1y-5L7u&q=85&s=7f6290d9a955377990c873b308593f35" width="2406" height="2406" data-path="icons/codex.svg">
    Add the plugin marketplace:

    ```bash theme={null}
    codex plugin marketplace add https://github.com/controlplane-com/ai-plugin.git
    ```

    Start Codex, open `/plugins`, navigate to **Control Plane**, then install the `cpln` plugin.

    <Tip>
      **Enable plugin hooks for guardrail injection (recommended).** Codex ships with `plugin_hooks` off by default. Enable it in `~/.codex/config.toml` so the plugin's `SessionStart` hook can inject CLI conventions and guardrails:

      ```toml theme={null}
      [features]
      plugins = true
      plugin_hooks = true
      ```

      After restart, `/plugins` → **Control Plane** → **Hooks** should show `SessionStart`.
    </Tip>

    <Tip>
      Codex does not auto-update plugin marketplaces. When a new release is published, run the upgrade command and restart Codex:

      ```bash theme={null}
      codex plugin marketplace upgrade controlplane
      ```
    </Tip>
  </Tab>

  <Tab title="Antigravity CLI" icon="https://mintcdn.com/controlplanecorporation/rFQpIcXts1y-5L7u/icons/antigravity.png?fit=max&auto=format&n=rFQpIcXts1y-5L7u&q=85&s=48d54825666f9af129853a040db724a6" width="128" height="128" data-path="icons/antigravity.png">
    Install the plugin straight from GitHub:

    ```bash theme={null}
    agy plugin install https://github.com/controlplane-com/ai-plugin/plugins/cpln
    ```

    Confirm it loaded with `agy plugin list`.
  </Tab>
</Tabs>

## Sign in

<Note>
  The plugin bundles the MCP server and configures every client with the `full` [toolset profile](/ai/mcp#toolset-profiles).
</Note>

Each tool triggers OAuth its own way — see your tool's setup page for the specifics. Once your browser lands on Control Plane:

<Steps>
  <Step title="Sign in to Control Plane">
    Use Google, GitHub, Microsoft, or SAML.
  </Step>

  <Step title="Authorize orgs">
    Pick the orgs this AI client may access and click **Authorize**.
  </Step>
</Steps>

## Try it

<CodeGroup>
  ```text Troubleshoot a workload theme={null}
  /cpln:troubleshoot my-api --gvc production
  ```

  ```text Set up secret access theme={null}
  My "my-api" workload needs to read the "db-password" secret.
  ```

  ```text Migrate a Kubernetes manifest theme={null}
  /cpln:migrate-k8s ./k8s/deployment.yaml
  ```

  ```text Natural language theme={null}
  Deploy this app on Frankfurt and give me the public URL.
  ```
</CodeGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Usage Examples" icon="lightbulb" href="/ai/examples">
    Practical prompts for common Control Plane workflows
  </Card>

  <Card title="AI Plugin on GitHub" icon="github" href="https://github.com/controlplane-com/ai-plugin">
    Source, full inventory of skills, agents, commands, and guardrails
  </Card>
</CardGroup>
