codexbox

OpenAI Codex CLI inside an aicodebox container. You talk to codexbox, codexbox talks to Codex, and Codex talks to OpenAI with an API key or your ChatGPT subscription.

The image is psyb0t/codexbox. It ships in a minimal variant and a full variant with every common development toolchain installed. The codexbox command on your host mounts the current directory into the container and runs Codex there with its approval prompts and its own sandbox turned off, because the container is the sandbox.

Ways in

Way in What you get Page
Interactive shell The Codex TUI in your current directory, continuing the last session The codexbox wrapper
One-shot exec codexbox exec "...", output to your terminal The codexbox wrapper
API mode POST /run, workspace files over HTTP, an OpenAI-compatible chat/completions endpoint API mode
MCP mode run_prompt and workspace file tools over streamable HTTP MCP mode
Telegram mode Codex in a Telegram chat, one workspace per chat Telegram mode
Cron mode Codex jobs on 6-field cron schedules, with run history Cron mode

Quick start

Docker is the only prerequisite.

curl -fsSL https://raw.githubusercontent.com/psyb0t/docker-codexbox/main/install.sh | bash

codexbox login --device-auth   # ChatGPT subscription, or export OPENAI_API_KEY=sk-...
codexbox                       # Codex TUI in the current directory
codexbox exec "fix the failing test in ./app"

Install covers the full image, local builds and the installer settings. Authentication explains the two ways Codex logs in.

What codexbox adds to aicodebox

The HTTP API, MCP server, Telegram bot and cron scheduler belong to the shared aicodebox base image. codexbox adds the Codex side:

  • the Codex CLI, installed under /home/aicode/.local so codex update works as the runtime user;
  • the Codex adapter, which turns a run request into codex exec arguments and reads Codex’s JSON event stream back;
  • an init script that seeds API-key auth and trusts the workspace;
  • an entrypoint that accepts every setting under a CODEXBOX_ name;
  • the host wrapper and its installer.

Pages

  • Install: installer, local builds, image variants and licensing.
  • The codexbox wrapper: host commands, host settings, nested launches and SSH.
  • Authentication: API key or ChatGPT subscription, models and reasoning effort.
  • Configuration: container settings, name aliasing, init scripts and ports.
  • Modes: how the server modes combine, with a page for each.
  • Codex adapter: how run options map to Codex flags, and session continuation.
  • Agent integrations: the skill and plugins for Claude Code, Codex and OpenClaw.
  • Troubleshooting: error messages and their fixes.
  • Development: building, linting, testing, CI and releases.