From 418a6ce4c2345dd50813ef6e1e980e3ab11ce9b0 Mon Sep 17 00:00:00 2001 From: Tim Evans Date: Sun, 7 Jun 2026 12:41:45 +0100 Subject: [PATCH] install.sh: install Codex CLI dependency for codex plugin --- README.md | 3 +++ install.sh | 12 ++++++++++++ memory/project_plugin_sync.md | 6 +++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 47c4ef1..fb5a386 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ Private repo syncing Claude Code config across machines. **Not tracked:** `settings.local.json` — accumulates one-off permissions per session, machine-specific. +**CLI dependencies:** `install.sh` also installs the Codex CLI (`npm install -g @openai/codex`) when missing, +since the `codex@openai-codex` plugin shells out to it. Requires `npm` on the target machine. + ## Install on a new machine ```bash diff --git a/install.sh b/install.sh index 187db5b..eed5ae4 100755 --- a/install.sh +++ b/install.sh @@ -32,5 +32,17 @@ mkdir -p "$MEMORY_DIR" cp "$SCRIPT_DIR/memory/"*.md "$MEMORY_DIR/" echo " Installed: memory files -> $MEMORY_DIR" +# CLI dependencies — Codex CLI, required by the codex@openai-codex plugin to actually run. +if command -v codex >/dev/null 2>&1; then + echo " Codex CLI already present: $(codex --version 2>/dev/null | head -1)" +elif command -v npm >/dev/null 2>&1; then + echo " Installing Codex CLI (npm install -g @openai/codex)..." + npm install -g @openai/codex >/dev/null 2>&1 \ + && echo " Installed: Codex CLI $(codex --version 2>/dev/null | head -1)" \ + || echo " WARNING: Codex CLI install failed — run manually: npm install -g @openai/codex" +else + echo " WARNING: npm not found — install the Codex CLI manually: npm install -g @openai/codex" +fi + echo "" echo "Done. Restart Claude Code for settings to take effect." diff --git a/memory/project_plugin_sync.md b/memory/project_plugin_sync.md index ade6523..da33b3f 100644 --- a/memory/project_plugin_sync.md +++ b/memory/project_plugin_sync.md @@ -22,7 +22,11 @@ is NOT synced and should not be — each server re-fetches plugins from its mark **How to apply:** After installing/removing any plugin, run `~/Git/claude-config/sync.sh` to push the updated `settings.json` to GitHub. On another server, `git pull && ./install.sh`, then start Claude Code — it auto-installs -the enabled plugins from `claude-plugins-official`. Rule: any plugin from a *non-official* marketplace +the enabled plugins from `claude-plugins-official`. CLI dependency: the `codex@openai-codex` plugin shells out to the Codex CLI (`@openai/codex`, binary `codex`). +`install.sh` installs it via `npm install -g @openai/codex` when missing, so it propagates to every server that +runs the installer (requires npm on the target machine). + +Rule: any plugin from a *non-official* marketplace must have that marketplace added to `extraKnownMarketplaces` in `settings.json`, or it won't install on other servers. Both non-official marketplaces in use (`openai-codex` → `openai/codex-plugin-cc`, `claude-code-warp` → `warpdotdev/claude-code-warp`) are now registered there.