feat(installer): add Codex CLI engine option to install.sh#219
feat(installer): add Codex CLI engine option to install.sh#219FanqingM wants to merge 2 commits intoxvirobotics:mainfrom
Conversation
The installer's interactive menu previously only exposed Claude Code and
Kimi, even though the runtime has supported `engine: "codex"` since the
Codex CLI integration landed. Users following the README's "三引擎" promise
had to hand-edit bots.json afterwards. This patch surfaces Codex as a
first-class choice:
- Phase 4b: add "3) Codex CLI" option; detects `codex` on PATH and prints
install/login hints when missing.
- Phase 5 bots.json generation: when engine=codex, emit
`engine: "codex"` with `codex: { approvalPolicy: "never", sandbox:
"workspace-write" }` for Feishu, Telegram, and WeChat bot entries
(matches bots.example.json).
- .env: new comment block with CODEX_EXECUTABLE_PATH /
CODEX_APPROVAL_POLICY / CODEX_SANDBOX hints.
- Next Steps: add `codex login` reminder and Codex CLI install pointer
when the binary is missing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…flow Previously the Codex branch only detected the CLI on PATH and printed a "go install it yourself" warning, which was inconsistent with how Claude Code and Kimi engines behave (both auto-install their CLIs). Now the Codex branch runs `npm install -g @openai/codex` via the existing npm_install_global helper — same path Claude Code uses. Fallback warning is still there if the npm install fails. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Follow-up: added auto-install of Codex CLI via Confirmed |
floodsung
left a comment
There was a problem hiding this comment.
Looks good — installer changes match the runtime support already in place (engines/codex, bots.example.json) and the auto-install via npm install -g @openai/codex keeps parity with how Claude Code and Kimi engines are bootstrapped. Codex defaults (approvalPolicy: never, sandbox: workspace-write) align with the CLAUDE.md note that interactive approvals can't be surfaced back through IM.
Suggesting maintainer spot-check the end-to-end installer run on a clean machine before merge (item still unchecked in the test plan).
|
When can this PR be officially merged? |
Summary
codexon PATH during install and print install/login hints when missing — MetaBot still gets fully configured so users can install Codex after.engine=codexis picked, generatebots.jsonentries withengine: "codex"andcodex: { approvalPolicy: "never", sandbox: "workspace-write" }for Feishu / Telegram / WeChat bots. Matchesbots.example.jsonand honors the CLAUDE.md note that interactive approvals can't be surfaced back to IM under Codex..envnow emits a Codex auth comment block withCODEX_EXECUTABLE_PATH/CODEX_APPROVAL_POLICY/CODEX_SANDBOXplaceholders instead of forcing a Claude/Kimi header.codex login(and the Codex CLI install link if the binary is missing).Before this PR, users who wanted Codex had to finish the installer with Claude and then hand-edit
bots.json— the runtime already supported it, the installer just didn't expose it.Context
Reported by a user running
install.shwho saw only Claude / Kimi in the menu despite CLAUDE.md and README promising Codex support. Runtime side (src/engines/codex/executor.ts,bots.example.json, README) was already in place — this patch is installer-only.Test plan
bash -n install.sh— syntax OKnode -eJSON generator withengine=codex— produces valid JSON matchingbots.example.jsoncodex loginflow works after install on a machine with Codex CLI present🤖 Generated with Claude Code