How 0chencc/clawgod works
ClawGod patches the official Claude Code runtime and launches the patched CLI rather than providing a replacement client. The main workflow is: the user launches Claude Code, the ClawGod wrapper loads provider settings and runtime controls, then starts the patched bundle; optional OpenAI-compatible configuration routes API traffic through a translation proxy. The patcher, native-binary extraction, and re-patching support version updates. README capabilities such as feature unlocks, restriction removals, reliability fixes, and Lean Settings are represented at subsystem level. Some update and patcher connections rely on README statements because their source was not fully sampled.
Main entry points: cli.cjs ClawGod launcher · patch.mjs Bundle patcher · extract-natives.mjs Native extraction · repatch.mjs Upgrade re-patching
Components 17
Launch and configuration
- ClawGod launcher
src/shared/cli.cjs - Provider settings
tools/provider-import/src/main.rs - Feature gates
src/shared/feature-gates.cjs - Runtime helpers
src/shared/runtime-helpers.cjs
Runtime patching
- Bundle patcher
src/shared/patch.mjs - Native extraction
src/shared/extract-natives.mjs - Upgrade re-patching
src/shared/repatch.mjs - Patch post-processing
src/shared/post-process.mjs - Patched Claude bundle
Runtime features
- Feature and restriction patches
src/shared/patch.mjs - Lean Settings
src/shared/cli.cjs - Bun renderer shim
src/shared/bun-ant-shim.cjs
Provider integration
- API translation proxy
src/shared/openai-proxy.cjs - Provider setup CLI
tools/provider-import/src/main.rs
Other components
- Claude Code user
- Official Claude Code
- OpenAI-compatible API
Connections 19
- Claude Code user → ClawGod launcher: launches
README.md - ClawGod launcher → Official Claude Code: replaces launcher
README.md - ClawGod launcher → Provider settings: reads settings
src/shared/cli.cjs - Provider setup CLI → Provider settings: writes settings
tools/provider-import/src/main.rs - Provider setup CLI → OpenAI-compatible API: queries models
tools/provider-import/src/main.rs - ClawGod launcher → Feature gates: loads gates
src/shared/cli.cjs - ClawGod launcher → Runtime helpers: loads helpers
src/shared/cli.cjs - ClawGod launcher → Bun renderer shim: loads shim
src/shared/cli.cjs - ClawGod launcher → API translation proxy: starts proxy
src/shared/cli.cjs - ClawGod launcher → Lean Settings: applies toggles
src/shared/cli.cjs - Official Claude Code → Native extraction: provides binary
README.md - Native extraction → Bundle patcher: supplies bundle
- Bundle patcher → Patched Claude bundle: patches bundle
README.md - Patched Claude bundle → Official Claude Code: runs as CLI
README.md - Upgrade re-patching → Native extraction: re-extracts on update
README.md - Upgrade re-patching → Bundle patcher: re-patches on update
README.md - Patch post-processing → Patched Claude bundle: processes output
- Patched Claude bundle → Feature and restriction patches: enables patched features
README.md - API translation proxy → OpenAI-compatible API: translates requests
src/shared/openai-proxy.cjs