English | 简体中文
Use your local Codex CLI from inside Antigravity (AGY) for code reviews, adversarial design reviews, or delegated coding tasks — originally ported from OpenAI's official openai/codex-plugin-cc and continuously enhanced beyond a 1:1 port for Antigravity and real-world engineering workflows.
Note
Architecture & Quota Notice: This plugin uses a pure rules + skills layout and registers no custom/plugin agents (agents/). Everything runs directly in Antigravity's default main agent via local Codex CLI, avoiding extra subagent forwarding token overhead and always staying on the default main-agent rate (while Google has since reverted the 4× custom/plugin agent quota multiplier introduced in agy 1.5.17+ — see antigravity-cli#1890 — running in the default main agent keeps the plugin insulated from similar policy changes). When upgrading from v1.1.0 or earlier, git pull or re-running the installer automatically removes the legacy agents/ directory.
codex-reviewskill for standard read-only Codex code review (working tree or branch diff)codex-adversarial-reviewskill for steerable challenge reviews questioning design choices, tradeoffs, and failure modescodex-rescueskill to delegate investigations, fixes, or follow-up work directly to Codexcodex-jobsskill (status,result,cancel,stop-broker) to track and manage background Codex runscodex-setupskill to check local Codex CLI availability and authenticationgpt-5-4-promptingskill + reference library for structured Codex / GPT-5.4 prompting- Shared
codex app-serverbroker with automatic idle shutdown and detached background workers for bothreviewandtaskruns
- ChatGPT subscription (incl. Free) or OpenAI API key configured in local Codex CLI (
codex login) - Codex CLI with
codex app-serversupport (npm install -g @openai/codex) - Node.js 18.18 or later (macOS, Linux, WSL2, and Windows supported)
No npm install, build step, or manual edits to ~/.gemini/config/config.json are required. Antigravity automatically discovers the plugin on the next turn once it is placed in ~/.gemini/config/plugins/codex-plugin-agy.
Paste this prompt directly into Antigravity:
Install the
codex-plugin-agyplugin fromhttps://github.com/yuhhhong/codex-plugin-agyinto~/.gemini/config/plugins/codex-plugin-agy(keep existing plugins and do not hand-editconfig.json). After installing, run itssetup --jsoncheck to verify Node, Codex CLI, and login status, then report the result.
macOS / Linux / WSL2:
git clone https://github.com/yuhhhong/codex-plugin-agy.git ~/.gemini/config/plugins/codex-plugin-agyWindows (PowerShell):
git clone https://github.com/yuhhhong/codex-plugin-agy.git "$env:USERPROFILE\.gemini\config\plugins\codex-plugin-agy"To update later, pull inside the plugin directory:
git -C ~/.gemini/config/plugins/codex-plugin-agy pullIf you downloaded a ZIP archive or cloned the repo elsewhere, run the cross-platform installer (copies plugin files by default, so deleting the source folder later will not break the plugin):
macOS / Linux / WSL2:
sh ./install.sh # copy install (default)
sh ./install.sh --link # symlink install for local development
sh ./install.sh --uninstall # uninstallWindows (PowerShell):
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 # copy install (default)
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -Link # junction install for local development
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -Uninstall # uninstallIf you use the agy CLI:
agy plugin validate --strict .
agy plugin install .Run the uninstall flag above, or simply remove ~/.gemini/config/plugins/codex-plugin-agy (%USERPROFILE%\.gemini\config\plugins\codex-plugin-agy on Windows).
Once enabled, you can trigger the plugin naturally in Antigravity (or run the companion CLI directly):
Ask Antigravity to check Codex setup (triggers codex-setup), or run:
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs setupIf Codex is installed but not logged in yet, run codex login in your terminal.
Runs Codex's built-in reviewer (read-only) against uncommitted working-tree changes or a branch diff (--base <ref>). Supports --wait and --background.
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs review --wait
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs review --background --base mainRuns a steerable challenge review that pressure-tests assumptions, tradeoffs, race conditions, rollback safety, and failure modes. Accepts optional focus text after flags.
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs adversarial-review --wait "challenge the caching and retry design"
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs adversarial-review --background --base main "audit concurrency and data consistency"Hands debugging, investigation, or implementation tasks directly to Codex via the codex-rescue skill. Supports --write, repeatable --add-dir <dir> (for multi-repo or Git worktree edits in one session), --cwd <dir> / -C <dir>, --background, --resume-last, --model <model|spark>, and --effort <none|minimal|low|medium|high|xhigh>.
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs task --write "fix the failing unit test with the smallest safe patch"
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs task --write --add-dir ../sibling-repo --add-dir ../worktree-dir "update the shared API contract across repos"
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs task --cwd ../sibling-repo --write "fix validation only inside the target repo"
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs task --background --write "investigate and fix the flaky integration test"
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs task --resume-last --write "apply the top fix from the last run"Note:
--model sparkmaps togpt-5.3-codex-spark. Leave--modeland--effortunset to use your Codex defaults from~/.codex/config.tomlor.codex/config.toml.
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs status
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs status <job-id> --wait
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs result <job-id>
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs cancel <job-id>
node ~/.gemini/config/plugins/codex-plugin-agy/scripts/codex-companion.mjs stop-brokerCompleted tasks also print codex resume <session-id> so you can continue the thread directly in the Codex CLI or App.
This project started as a port of openai/codex-plugin-cc and evolves independently for Antigravity and practical development workflows:
- Native Antigravity Plugin Layout: Uses root
plugin.json,rules/AGENTS.md, andskills/*/SKILL.md(with no custom/pluginagents/), persisting state under~/.gemini/config/plugin-data/codex-plugin-agy/statewith no Claude-specific paths or env vars. - Runtime & Job Management Enhancements: Adds unified detached background workers for both tasks and reviews (
task-worker/review-worker), automatic idle broker shutdown withstop-broker, and cross-workspace job tracking. - Ongoing Workflow Extensions & Trimming: Omits Claude-specific features (
transferand Claudehooks.json) while adding Antigravity-focused improvements such as multi-repository and Git worktree support.
For complete flags, refer to node scripts/codex-companion.mjs --help and skills/*/SKILL.md. For version-by-version additions and fixes, see CHANGELOG.md or GitHub Releases.
Ported from openai/codex-plugin-cc under the Apache License 2.0. Original LICENSE and NOTICE files are preserved.