Claude Code Wrapper
Run Anthropic's powerful claude-code agent locally completely for free. KeyKing intercepts the CLI, blocks its cloud connections, and forces it through your local proxy pool.
Zero-Config Interceptor
Terminal Command
$ keyking-claudeSimply type keyking-claude instead of claude. The wrapper automatically checks if Anthropic's CLI is installed and executes it inside a secure sub-process. All original arguments are transparently forwarded.
How The Interceptor Works
- Local Proxy Redirection: Overrides
ANTHROPIC_BASE_URLtohttp://127.0.0.1:8787. - Zero-Config Auth: Injects a placeholder
ANTHROPIC_API_KEY="kk-zero-config". KeyKing fulfills the request securely from the vault so your real keys are never exposed to the terminal session. - Cloud Bypass Prevention: Strips AWS credentials (
AWS_PROFILE,AWS_ACCESS_KEY_ID) to prevent Claude Code from attempting to bypass the local proxy via Bedrock. - Provider Override: Forcefully injects CLI settings via
--settingsto explicitly disable Claude's native integrations for GCP Vertex and AWS Bedrock, guaranteeing traffic routes over standard REST APIs compatible with KeyKing. - Environment Isolation: Uses
exec(Bash) andsetlocal(Windows) to strictly confine overrides so your parent terminal session remains completely unaffected.