Skip to Content
ModelsCodex

Codex

Use OpenAI’s coding agent directly in Blueberry’s terminal.

What is Codex?

Codex is OpenAI’s agentic coding tool that runs in your terminal. It can read your codebase, suggest changes, write code, and run commands. Running Codex inside Blueberry gives it richer context about your workspace.

Installation

Install Codex globally via npm:

npm install -g @openai/codex

Check the official Codex documentation  for the latest installation instructions.

Setup

1. Configure Your API Key

Codex requires an OpenAI API key. Set it as an environment variable:

export OPENAI_API_KEY=your-api-key

You can add this to your shell profile (~/.zshrc or ~/.bashrc) so it persists across sessions.

2. Run Codex in Blueberry

  1. Open a terminal tab in Blueberry
  2. Navigate to your project directory
  3. Start Codex:
codex

Codex will start an interactive session with access to your project files.

How Blueberry Provides Context

Running Codex inside Blueberry’s terminal means it can:

  • Access your full project directory from the terminal
  • See command output alongside your code in the editor
  • Work while you monitor changes in the live preview panel

Blueberry’s integrated environment lets you watch Codex’s changes take effect in real time through the preview panel and editor.

Key Capabilities

  • Understand and navigate large codebases
  • Generate and edit code across multiple files
  • Run shell commands and react to output
  • Explain existing code and suggest improvements
  • Help with debugging and error resolution

Learn More

Last updated on