Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .codex/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Codex reads this project configuration only after you trust the project.
# Codex reads project instructions from `AGENTS.md` by default. This project keeps them in `CLAUDE.md`.
project_doc_fallback_filenames = ["CLAUDE.md"]

[mcp_servers.chrome-host]
command = "sh"
args = ["scripts/mcps/chrome-host/mcp-entry.sh"]
2 changes: 2 additions & 0 deletions docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ services:
- terminal-history:/home/developer/.terminal_history
- claude-config:/home/developer/.config/claude
- claude-state:/home/developer/.local/state/claude
- codex:/home/developer/.codex
- copilot:/home/developer/.copilot
- copilot-config:/home/developer/.config/copilot
- opencode-config:/home/developer/.config/opencode
Expand Down Expand Up @@ -86,6 +87,7 @@ volumes:
terminal-history:
claude-config:
claude-state:
codex:
copilot:
copilot-config:
opencode-config:
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ volumes:
terminal-history:
claude-config:
claude-state:
codex:
copilot:
copilot-config:
opencode-config:
Expand Down
13 changes: 13 additions & 0 deletions docker/react_ui_devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,23 @@ RUN curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path
# * <https://github.com/github/copilot-cli/issues/1750>
RUN curl -fsSL https://gh.io/copilot-install | PREFIX="$HOME/.local" bash

# Install Codex CLI
# The standalone native build lives outside the Codex data directory (`~/.codex`), so the `codex`
# volume holds only data. Run `codex update` to update the binary.
ARG CODEX_VERSION=0.167.1
RUN mkdir -p "$HOME/.codex" && \
export PATH="$HOME/.local/bin:$PATH" && \
curl -fsSL https://chatgpt.com/codex/install.sh | \
CODEX_HOME="$HOME/.local/share/codex-install" CODEX_NON_INTERACTIVE=1 CODEX_RELEASE="${CODEX_VERSION}" sh && \
rm -rf "$HOME/.local/share/codex-install/tmp"
# Run Codex without its own sandbox, which does not work in the container (see the file)
COPY files/etc/codex/config.toml /etc/codex/config.toml

# Wrapper scripts for AI coding assistants ensure they are available in PATH
# and handle necessary environment variable setup
COPY --chmod=+x files/usr/local/bin/copilot /usr/local/bin/copilot
COPY --chmod=+x files/usr/local/bin/claude /usr/local/bin/claude
COPY --chmod=+x files/usr/local/bin/codex /usr/local/bin/codex
COPY --chmod=+x files/usr/local/bin/opencode /usr/local/bin/opencode
COPY --chmod=+x files/usr/local/bin/docker-entrypoint /usr/local/bin/docker-entrypoint
COPY --chmod=+x files/home/$USERNAME/shell-init.sh ${HOME}/shell-init.sh
Expand Down
6 changes: 6 additions & 0 deletions docker/react_ui_devcontainer/files/etc/codex/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# System-wide Codex configuration for the `devcontainer`.
# Codex's Linux sandbox needs user namespaces, which Docker blocks by default. Commands that run in
# other containers through Docker-from-Docker also need `sudo` and the Docker socket. Codex therefore
# runs commands without its own sandbox and the container isolates them. User and project
# configuration can override this.
sandbox_mode = "danger-full-access"
11 changes: 11 additions & 0 deletions docker/react_ui_devcontainer/files/usr/local/bin/codex
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# The Codex binary lives outside its data directory (`~/.codex`), so it belongs to the image, not the volume.
# The standalone updater needs the installation directory in `CODEX_HOME`. Appending `~/.local/bin` to PATH
# (lowest priority) lets the updater find the binary there without modifying shell profiles.
if [ "${1:-}" = "update" ]; then
CODEX_HOME="/home/developer/.local/share/codex-install" PATH="$PATH:/home/developer/.local/bin" \
exec /home/developer/.local/bin/codex "$@"
fi

exec /home/developer/.local/bin/codex "$@"
9 changes: 9 additions & 0 deletions scripts/mcps/chrome-host/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ works — point its config at the script.
}
```

**Codex** — `.codex/config.toml` (repo root, applied once the project is
trusted):

```toml
[mcp_servers.chrome-host]
command = "sh"
args = ["scripts/mcps/chrome-host/mcp-entry.sh"]
```

**OpenCode** — `opencode.json` (repo root):

```json
Expand Down
2 changes: 1 addition & 1 deletion scripts/mcps/chrome-host/mcp-entry.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# Referenced by .mcp.json / opencode.json as the `chrome-host` MCP server command.
# Referenced by .mcp.json / .codex/config.toml / opencode.json as the `chrome-host` MCP server command.
#
# Spawns chrome-devtools-mcp inside the node container (via mcp-launch.sh),
# whether the assistant runs in the devcontainer or on the host. Docker needs
Expand Down
10 changes: 7 additions & 3 deletions src/docs/contribute/ai-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ The `devcontainer` ships several AI coding assistants (see
[General Guidelines](./general-guidelines.md#what-the-devcontainer-contains)):

* **Claude Code**
* **Codex**
* **GitHub Copilot CLI**
* **OpenCode**

Expand Down Expand Up @@ -69,11 +70,14 @@ through Docker Compose). See `.env.dist` for the available options.
A dedicated browser window opens using a throwaway profile, so your everyday
browser and its logins are untouched. The command is safe to re-run.

2. **Trust the project's MCP servers.** All three assistants are pre-configured
in the repository. Each asks you once, on first run, to trust the project's
MCP servers — approve it.
2. **Trust the project's MCP servers.** All four assistants are pre-configured
in the repository. Each asks you once, on first run, to trust the project
or its MCP servers — approve it.

* **Claude** and **GitHub Copilot CLI** read the project's `.mcp.json`.
* **Codex** reads the project's `.codex/config.toml` once you trust the
project. The file also points Codex to the project instructions in
`CLAUDE.md`.
* **OpenCode** reads the project's `opencode.json`.

3. **Use it.** The assistant can now navigate, click, screenshot, and inspect
Expand Down
2 changes: 1 addition & 1 deletion src/docs/contribute/general-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ by wrapping commands to run in the appropriate service containers.
* **Shells:** Bash, Zsh (with Oh My Zsh), Fish
* **Editors:** Vim, Nano
* **Tools:** Git, SSH client, Docker CLI (Docker-from-Docker)
* **AI coding assistants:** Claude Code, GitHub Copilot CLI, Open Code
* **AI coding assistants:** Claude Code, Codex, GitHub Copilot CLI, Open Code

#### Local Layer (`react-ui_devcontainer_local`)

Expand Down
Loading