Anthropic stopped shipping cli.js in the npm package starting v2.1.113; the package became a thin loader that dispatches to a per-platform Bun standalone binary. The previous installer cp'd cli.js from the npm tarball, which is why every install on v2.1.113+ fails with ENOENT. This release rewrites the install pipeline to extract cli.js source directly from the user's locally-installed Bun standalone binary (__BUN segment, anchored on the file:///$bunfs/.../cli.js path), rewrites virtual /$bunfs paths to local vendor/, runs cli.js under Bun runtime instead of Node, and reapplies the existing 23 regex patches. Highlights - Extract cli.js from Mach-O / ELF / PE __BUN segment (the same source Bun bundled at build time — not stale, not injected). - Auto-install Bun runtime; require ripgrep up front (Bun's bundled rg is unreachable when running extracted cli.js outside the standalone bundle, so we depend on system rg). - Wrapper now stamps the source version and detects drift on every launch. When the user upgrades Claude Code, ClawGod transparently re-extracts and re-patches before invoking the user's command. - Patcher made resilient: regex tokens widened to [\\w$]+ for Bun's newer minified identifiers; updated message-list filter and auto-mode patches for v2.1.119 source shape; sentinel-based verification catches future silent regex misses. - New `clawgod` command alongside `claude` — unambiguous entry point that survives Windows .exe / .cmd shadowing and official self-update overwriting `claude`. - Critical fix: launcher write no longer follows symlinks. Previously `echo > $CLAUDE_BIN` clobbered the real binary when $CLAUDE_BIN was the official symlink to ~/.local/share/claude/versions/<v>; we now rm the entry first. - Default features.json adds tengu_prompt_cache_1h_config allowlist so 1h prompt cache actually engages (fixes silent 5m TTL fallback that drove cache_creation token waste). Verified: macOS arm64 against v2.1.117/2.1.118/2.1.119 native binaries; 23 patches applied with 0 failures; auto-repatch correctly handles version transitions; claude / clawgod / claude.orig coexist cleanly. Closes #40 Closes #41 Closes #42 Closes #43 Closes #45
6.2 KiB
ClawGod
God mode for Claude Code.
This is NOT a third-party Claude Code client. ClawGod is a runtime patch applied on top of the official Claude Code. It works with any version — as Claude Code updates, ClawGod automatically re-extracts and re-patches against the new version on the next launch.
Prerequisites
Install these before running the ClawGod installer:
| Tool | Why | Install |
|---|---|---|
| Claude Code (native binary) | ClawGod patches the official Bun standalone binary you already have | claude.ai/install.sh (macOS/Linux) or claude.ai/install.ps1 (Windows) |
| ripgrep | Required by Claude Code's Grep tool | brew install ripgrep / apt install ripgrep / winget install BurntSushi.ripgrep.MSVC |
| Node.js >= 18 | Used by the patcher | nodejs.org |
Bun is the runtime that executes the patched cli.js — the installer auto-installs it if missing.
Install
macOS / Linux:
curl -fsSL https://github.com/0Chencc/clawgod/releases/latest/download/install.sh | bash
Windows (PowerShell):
irm https://github.com/0Chencc/clawgod/releases/latest/download/install.ps1 | iex
Green logo = patched. Orange logo = original.
What it does
Feature Unlocks
| Patch | What you get |
|---|---|
| Internal User Mode | 24+ hidden commands (/share, /teleport, /issue, /bughunter...), debug logging, API request dumps |
| GrowthBook Overrides | Override any feature flag via config file |
| Agent Teams | Multi-agent swarm collaboration, no flags needed |
| Computer Use | Screen control without Max/Pro subscription (macOS) |
| Auto-mode | Unlocks auto-mode for third-party API users (no firstParty gate) |
| Ultraplan | Multi-agent planning via Claude Code Remote |
| Ultrareview | Automated bug hunting via Claude Code Remote |
Restriction Removals
| Patch | What's removed |
|---|---|
| CYBER_RISK_INSTRUCTION | Security testing refusal (pentesting, C2, exploits) |
| URL Restriction | "NEVER generate or guess URLs" instruction |
| Cautious Actions | Forced confirmation before destructive operations |
| Login Notice | "Not logged in" startup reminder |
Visual
| Patch | Effect |
|---|---|
| Green Theme | Brand color → green. Patched at a glance |
| Message Filters | Shows content hidden from non-Anthropic users |
Reliability
| Feature | What it does |
|---|---|
| 1h Prompt Cache | Forces 1h TTL allowlist on (was effectively 5m → much higher cache_creation token usage) |
| Auto Re-patch | Detects when the user's native Claude binary has been upgraded; transparently re-extracts and re-patches on next launch |
Commands
claude # Patched Claude Code (replaces the official launcher)
clawgod # Same as `claude`, explicit & guaranteed entry point
claude.orig # Original unpatched version (auto-backed-up)
clawgod is unambiguous: on Windows where claude.exe may shadow claude.cmd, clawgod.cmd always works. Even after official self-update overwrites claude, clawgod keeps running the patched build.
Configuration
~/.clawgod/provider.json is auto-created on first run. Setting apiKey lets you skip OAuth entirely and point ClawGod at any Anthropic-compatible endpoint.
{
"apiKey": "sk-ant-...",
"baseURL": "https://api.anthropic.com",
"model": "",
"smallModel": "",
"timeoutMs": 3000000
}
apiKeyset → ClawGod injects it asANTHROPIC_API_KEYand isolates from~/.claude/settings.json. Works with Anthropic, DeepSeek, and OpenAI-compatible gateways. A non-AnthropicbaseURLalso populatesANTHROPIC_AUTH_TOKENfor gateway auth.apiKeyempty → OAuth path. Runclaude auth loginonce;~/.claudekeeps hosting your subagents, skills, and MCP settings.
How it works
Since @anthropic-ai/claude-code v2.1.113, the npm package no longer ships cli.js — it's a thin loader that dispatches to platform-specific Bun standalone binaries. ClawGod adapts:
- Locates the user's installed native Bun binary in
~/.local/share/claude/versions/ - Extracts the embedded
cli.jssource from the__BUNsegment (Mach-O / ELF / PE) - Extracts the embedded
.nodenative modules (audio-capture, image-processor, computer-use-*, url-handler) into~/.clawgod/vendor/ - Rewrites
/$bunfs/...virtual paths to point at the extracted modules - Applies 23 regex-based patches (version-agnostic — same patches work across many releases)
- The
claude/clawgodlaunchers run the patched cli.js under the Bun runtime
A .source-version stamp in ~/.clawgod/ records which native version was patched. On every launch the wrapper compares it against the latest binary in versions/; if the user upgraded Claude Code via the official installer, ClawGod auto-re-patches on the next run.
Update
The installer is idempotent — run it again to refresh the patched copy:
macOS / Linux:
curl -fsSL https://github.com/0Chencc/clawgod/releases/latest/download/install.sh | bash
Windows:
irm https://github.com/0Chencc/clawgod/releases/latest/download/install.ps1 | iex
In most cases you don't need to do this — when Claude Code self-updates, ClawGod's auto-re-patch picks up the new version automatically on the next claude / clawgod invocation.
Uninstall
macOS / Linux:
curl -fsSL https://github.com/0Chencc/clawgod/releases/latest/download/install.sh | bash -s -- --uninstall
hash -r # refresh shell cache
Windows:
irm https://github.com/0Chencc/clawgod/releases/latest/download/install.ps1 -OutFile install.ps1; .\install.ps1 -Uninstall
Uninstall restores claude.orig → claude and removes the clawgod alias.
After install or uninstall, restart your terminal or run
hash -rif the command doesn't take effect immediately.
License
GPL-3.0 — Not affiliated with Anthropic. Use at your own risk.
