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

# Codex

> Configure Codex to use with cmd

## Overview

While cmd's agent mode can autonomously take on complex tasks, you might prefer to bring in an external agent.<br />
Setting up Codex gives you access to powerful agentic capabilities through cmd's native interface in Xcode.

## Prerequisites

Before configuring Codex in cmd, you need to have Codex installed and set up on your system.

<Steps>
  <Step title="Install Codex">
    Follow [the official setup guide](https://conductor.build) to install Codex.
  </Step>

  <Step title="Verify Installation">
    Ensure Codex is working properly by running it from your terminal:

    ```bash theme={null}
    codex --version
    ```
  </Step>

  <Step title="Login in Codex">
    Launch Codex in your terminal to authenticate with your ChatGPT subscription or API key
  </Step>
</Steps>

## Configuring Codex in cmd

Once Codex is installed and configured, you can enable it in cmd:

<Steps>
  <Step title="Open AI Provider Settings">
    Go to **Settings > AI Providers** in cmd
  </Step>

  <Step title="Configuration">
    cmd should **automatically detect** where Codex is installed on your system.

    Otherwise, or if you need specific launch arguments, you can manually specify how to launch Codex

    1. Click **"Add Provider"** or **"Configure"** for Codex
    2. Provide the path to the Codex binary
    3. Optionally, specify a custom command if you use a specific way to run Codex

    <AccordionGroup>
      <Accordion title="Example: Direct binary path">
        If you have Codex installed in a specific location:

        ```bash theme={null}
        /usr/local/bin/codex
        ```
      </Accordion>

      <Accordion title="Example: Homebrew install">
        If installed via Homebrew:

        ```bash theme={null}
        /opt/homebrew/bin/codex
        ```
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="Enable Codex">
    Toggle **"Enable"** for Codex
  </Step>
</Steps>

## Using Codex

Once enabled, Codex will appear in your model selection:

<Steps>
  <Step title="Select Codex">
    In the cmd interface, open the model selector and choose **"Codex"**
  </Step>

  <Step title="Start Using">
    You can now use Codex's advanced agentic capabilities:

    * Multi-step task execution
    * Integrates with your existing Codex configuration, include `Agent.md`
    * Rich native UI in cmd
  </Step>
</Steps>

<Tip>
  Codex appears in the model selector just like any other AI model, but as an external agent it provides advanced capabilities that go beyond simple chat interactions.
</Tip>
