Grok BotSoftwareInfra & DevOpsAI score · 72/100AI-assisted edit · no obvious prompt-injection riskX

Have Grok Bot Install Claude Code, Codex CLI, and acpx with Usage Rules

Input: a system prompt → Processing: Grok Bot installs CLI tools, handles logins, validates execution → Output: a multi-model coding agent environment with invocation rules

ExperiencedStepsPromptWorkflow
Who
Advanced users who want to deploy Claude Code, Codex CLI, and acpx on their Grok Bot computer and establish cross-model invocation rules
You get
An isolated ~/.local multi-agent coding environment with auto-update scripts and clear usage boundaries
You need
Claude Code · Codex

Constraints

Requires shell access on the Grok Bot computer; system must meet Node 22.13+ (or be ready to download portable Node); needs Claude, OpenAI, and GitHub accounts for interactive login; no sudo used, all installations confined to ~/.local.

What they did

Author trevin wrote a complete prompt for Grok Bot to automatically install Claude Code, Codex CLI, and acpx (which enables cross-model invocation) on a computer, and establish rules for when to use these coding agents. The prompt covers install paths, Node version handling, interactive logins, validation commands, an auto-update script, and five usage boundary rules.

How it went

The author reported that this prompt can be handed directly to Grok Bot and unlocks powerful cross-model subscription coding scenarios (author_report). No specific execution time or failure cases were reported.

Worth knowing

This workflow has not been tested by our site (reproduction=not_tested). Known limitations: system Node below 22.13 requires manual portable Node download; the acpx symlink must be manually replaced with a wrapper script; login steps require user desktop takeover and cannot be fully automated; installation is confined to ~/.local without sudo. The author also provides an identical markdown version at share.trev.in.

Steps

  1. Install CLI tools to ~/.local

    Have Grok Bot execute the installation, placing all tools under ~/.local to survive computer updates. In order: install Claude Code via curl native installer; check Node version and download portable Node 22 to ~/.local/node22 with PATH updates if needed; use Node 22's npm to globally install Codex and acpx to ~/.local; manually replace the acpx symlink with a sh wrapper that calls Node 22's node; install standalone gh binary to ~/.local/bin if missing.

    Execution prompt · Source text。Grok Bot system prompt / instruction field to initiate installation

    Set up Claude Code, Codex CLI, and acpx on your computer, and add rules for when to use them.
    
    Install
    - Install everything under `~/.local` so it survives computer updates. Don't use sudo or put anything in /usr.
    - Claude Code: use the native installer (`curl -fsSL https://t.co/HbvsPfGOOW | bash`). Make sure `~/.local/bin` is on PATH.
    - acpx needs Node 22.13 or newer. If the system node is older, download a portable Node 22 .tar.gz to ~/.local/node22 and put its bin folder on PATH in ~/.bashrc and ~/.profile.
    - Codex: `npm i -g @openai/codex --prefix ~/.local` (use Node 22's npm).
    - acpx: `npm i -g acpx --prefix ~/.local`. Then replace the `~/.local/bin/acpx` symlink with a small sh wrapper that runs Node 22's node on acpx's dist/cli.js. Delete the symlink first so you don't overwrite cli.js.
    - `gh`: if it's missing, install the standalone binary to `~/.local/bin`.
  2. Interactive logins

    Grok Bot pauses and notifies the user when each login is ready for desktop takeover. Complete: Claude account login (claude.ai), Codex ChatGPT sign-in, and gh auth login (if not already authenticated). Afterward, Grok Bot runs verification commands.

    Execution prompt · Source text。Grok Bot system prompt / instruction field to handle interactive logins

    Logins (interactive, I'll do these)
    - Stop and tell me when each login is ready for me to take over on your desktop: claude (https://t.co/sHiUPYz83S account), codex (ChatGPT sign-in), and gh auth login if gh isn't already authenticated.
    - Afterward, verify with `claude auth status`, `codex login status`, and `gh auth status`.
  3. Validate acpx invocation

    In a temporary folder, run acpx commands to invoke claude and codex with a test instruction, confirming both return OK and exit code 0.

    Execution prompt · Source text。Grok Bot system prompt / instruction field to run validation

    Validate
    - In a temp folder, run: `acpx --cwd <tmp> --approve-reads --non-interactive-permissions deny claude exec "Reply with exactly: OK"`. Then run the same command with codex. Both should return OK and exit 0.
  4. Write auto-update script

    Create ~/.local/bin/update-ai-clis to update all three tools (and rewrite the acpx wrapper afterward). Set up a daily routine to run it, reinstall anything missing, never touch logins, and only message the user if something breaks or a version changes.

    Execution prompt · Source text。Grok Bot system prompt / instruction field to create update mechanism

    Keep updated
    - Write `~/.local/bin/update-ai-clis` to update all three (and rewrite the acpx wrapper afterward). Create a daily routine that runs it, reinstalls anything missing, never touches logins, and only messages me if something breaks or a version changes.
  5. Set usage rules and save to memory

    Write five invocation boundary rules to Grok Bot memory: do not use these CLIs by default; only use on request, for second opinions, comparisons, or when asked by name; prefer acpx for automated/headless runs; direct CLI use limited to logins, updates, and user-takeover interactive sessions; scope each run to one repo or scratch folder; reads-only by default, writes require approval; never push, merge, deploy, or send anything through them; output must indicate which agent produced it.

    Execution prompt · Source text。Grok Bot system prompt / instruction field to save usage rules to memory

    Usage rules (save to memory)
    - Don't use Claude Code, Codex, or acpx by default. My normal assistant and Cursor agents handle everyday work.
    - Use them on request, or for second-opinion reviews, head-to-head comparisons, or when I ask for one by name.
    - Prefer acpx for any automated or headless run. Use the CLIs directly only for logins, updates, and interactive sessions I take over.
    - Keep each run scoped to one repo or scratch folder. Allow reads only unless I approve writes. Never push, merge, deploy, or send anything through them.
    - Show me what they produced and say which agent produced it.

Prompt you can copy

Setup guidance · Source text。Grok Bot system prompt / instruction input to launch full installation and rule configuration

This block is the prompt. Ads are never placed here.

Set up Claude Code, Codex CLI, and acpx on your computer, and add rules for when to use them.

Install
- Install everything under `~/.local` so it survives computer updates. Don't use sudo or put anything in /usr.
- Claude Code: use the native installer (`curl -fsSL https://t.co/HbvsPfGOOW | bash`). Make sure `~/.local/bin` is on PATH.
- acpx needs Node 22.13 or newer. If the system node is older, download a portable Node 22 .tar.gz to ~/.local/node22 and put its bin folder on PATH in ~/.bashrc and ~/.profile.
- Codex: `npm i -g @openai/codex --prefix ~/.local` (use Node 22's npm).
- acpx: `npm i -g acpx --prefix ~/.local`. Then replace the `~/.local/bin/acpx` symlink with a small sh wrapper that runs Node 22's node on acpx's dist/cli.js. Delete the symlink first so you don't overwrite cli.js.
- `gh`: if it's missing, install the standalone binary to `~/.local/bin`.

Logins (interactive, I'll do these)
- Stop and tell me when each login is ready for me to take over on your desktop: claude (https://t.co/sHiUPYz83S account), codex (ChatGPT sign-in), and gh auth login if gh isn't already authenticated.
- Afterward, verify with `claude auth status`, `codex login status`, and `gh auth status`.

Validate
- In a temp folder, run: `acpx --cwd <tmp> --approve-reads --non-interactive-permissions deny claude exec "Reply with exactly: OK"`. Then run the same command with codex. Both should return OK and exit 0.

Keep updated
- Write `~/.local/bin/update-ai-clis` to update all three (and rewrite the acpx wrapper afterward). Create a daily routine that runs it, reinstalls anything missing, never touches logins, and only messages me if something breaks or a version changes.

Usage rules (save to memory)
- Don't use Claude Code, Codex, or acpx by default. My normal assistant and Cursor agents handle everyday work.
- Use them on request, or for second-opinion reviews, head-to-head comparisons, or when I ask for one by name.
- Prefer acpx for any automated or headless run. Use the CLIs directly only for logins, updates, and interactive sessions I take over.
- Keep each run scoped to one repo or scratch folder. Allow reads only unless I approve writes. Never push, merge, deploy, or send anything through them.
- Show me what they produced and say which agent produced it.

Give the entire prompt to Grok Bot at once; you will need to manually take over the desktop during the login phase.

Source

一段提示词让 Grok Bot 在你电脑上装好 Claude Code、Codex CLI 与 acpx,并写下何时调用哪个编码 Agent 的规则 · trevin · X · 2026-10-16T18:01:08.000Z

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related