install.sh: install Codex CLI dependency for codex plugin
This commit is contained in:
@@ -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
|
||||
|
||||
+12
@@ -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."
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user