Skip to content

feat: embed codex, claude, and grok CLIs + add docker-compose - #4

Merged
nordz0r merged 5 commits into
mainfrom
feat/embedded-coding-clis
Sep 14, 2026
Merged

nordz0r merged 5 commits into
mainfrom
feat/embedded-coding-clis

Conversation

@nordz0r

@nordz0r nordz0r commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Embed coding CLIs into runtime image:
    • @openai/codex (Node/npm)
    • @anthropic-ai/claude-code (Node/npm)
    • Official xAI Grok standalone binary (multi-arch x86_64 / aarch64)
  • Smoke test: added assertion to prove which codex claude grok succeeds.
  • Local compose: added docker-compose.yaml with persistent volumes for .opencodex, .codex, .claude, and .grok.

Resolves operator need to configure and test client tooling directly inside the hub container.

- Install nodejs, npm, @openai/codex, and @anthropic-ai/claude-code
- Install official xAI Grok standalone binary (multi-arch x86_64/aarch64)
- Add verification assertions to scripts/smoke-test.sh
- Add docker-compose.yaml for local standalone development and testing
@coldtea-pr-lens

coldtea-pr-lens Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

◈ PR Lens

🟢 +2 new · 🟠 ~5 changed · 🔴 -0 removed · 1 flow · 5 files · commit 1a6518a


Architecture

Architecture diagram for nordz0r/opencodex-docker at 1a6518a

7 components touched across 4 lanes.

Open the interactive canvas


Inside the changed components — 2 views

Component view — Runtime and CLI Toolchains

OpenCodex Hub daemon integration with embedded coding CLIs and persistent volumes.

Architecture view of Component view — Runtime and CLI Toolchains in nordz0r/opencodex-docker

Component view — Build and Smoke Verification

Build orchestration, upstream resolution, CLI fetching, and smoke testing.

Architecture view of Component view — Build and Smoke Verification in nordz0r/opencodex-docker

Data flow

Data flow diagram for nordz0r/opencodex-docker at 1a6518a

Building and validating runtime with coding CLIs

Open the interactive canvas


View

  • Architecture lens
  • Data flow lens
  • Expand every detail

Tip

Open a diagram on the canvas, then press W or click play to walk through the change one step at a time.

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists.
  • Untick Architecture lens or Data flow lens under View to hide a diagram, or tick Expand every detail to open every section. The comment redraws in a few seconds.
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through.
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change.
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time.
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture and data flow row. Drawing still runs on every push.
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works.
  • Push a commit and the comment redraws for the new head. A slow older run never overwrites a newer one.
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion.

Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e14a354f1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Dockerfile
ARG GROK_VERSION=1.0.30
RUN npm install -g @openai/codex @anthropic-ai/claude-code \
&& rm -rf /root/.npm \
&& GROK_ARCH="$(case \"${TARGETARCH:-$(dpkg --print-architecture)}\" in amd64) echo x86_64 ;; arm64) echo aarch64 ;; *) echo \"unsupported: ${TARGETARCH}\" >&2; exit 1 ;; esac)" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove the escaped quotes from the architecture selector

Every image build fails at this layer: the \" sequences are passed literally to /bin/sh, so the case subject becomes "amd64" (or "arm64") rather than amd64/arm64. It consequently reaches the default branch and exits with unsupported, blocking the amd64 smoke build in .github/workflows/build.yml as well as multi-arch publishing.

Useful? React with 👍 / 👎.

Comment thread docker-compose.yaml
- OPENCODEX_HOME=/home/bun/.opencodex
- CODEX_HOME=/home/bun/.opencodex/codex-home
# Optional: set an explicit API token for proxy requests
# - OPENCODEX_API_AUTH_TOKEN=your-secret-token

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Supply an admission token in the new Compose configuration

On a fresh ocx-state volume, the entrypoint creates a 0.0.0.0 hub configuration, but this Compose file neither sets OPENCODEX_API_AUTH_TOKEN nor mounts the default /run/secrets/ocx_api_token token file. OpenCodex rejects non-loopback startup without one (as the existing smoke-test setup documents), so docker compose -f docker-compose.yaml up exits by default; the comment calling the token optional makes this especially likely. Make a token source required, as compose.yaml does.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a6518af4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Dockerfile
ARG UPSTREAM_COMMIT
RUN git clone --depth 1 --branch "v${UPSTREAM_VERSION}" \
https://github.com/lidge-jun/opencodex.git /tmp/opencodex-src \
RUN set -euo pipefail \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a shell that supports pipefail

The Dockerfile does not set SHELL, so this RUN instruction uses Linux's default /bin/sh; in the Debian-based Bun image that is dash, which rejects set -o pipefail with Illegal option. Consequently, the new source-fetch layer aborts before resolving or cloning upstream on every local and CI image build. Invoke Bash explicitly or remove pipefail while retaining appropriate pipeline error handling.

Useful? React with 👍 / 👎.

Comment thread docker-compose.yaml
Comment on lines +22 to +24
- ocx-codex:/home/bun/.codex
- ocx-claude:/home/bun/.claude
- ocx-grok:/home/bun/.grok

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Initialize the CLI volumes with bun ownership

After a user supplies the required hub token and starts this Compose file with fresh default volumes, ocx-claude and ocx-grok are mounted root-owned at paths the image never creates or chowns. The service runs as bun, so those CLIs cannot persist their login, configuration, or cache in their default homes; the smoke test only checks which, so it does not expose this. Initialize these volume targets as UID 1000 or avoid mounting uninitialized CLI home directories.

Useful? React with 👍 / 👎.

@nordz0r
nordz0r merged commit 1a6518a into main Sep 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant