CodeWeaver
Lightweight, zero-dependency local proxy bridging Claude Code Anthropic API calls to Gemini CLI Google OAuth sessions.
Why it exists
Claude Code is a fast CLI tool for terminal coding, but Anthropic API token costs add up quickly during extended refactoring sessions. Google OAuth sessions provide generous daily quotas for personal development. CodeWeaver translates protocol formats in flight so Claude Code connects directly to Gemini models.
How it works
- Listens locally on port 8099 with zero external npm dependencies using native Node.js `http` and `crypto`.
- Reads session credentials from `~/.pi/agent/auth.json` and auto-refreshes Google OAuth tokens.
- Translates Anthropic Messages API payloads, tools, and system prompts into Google Generative Language format in flight.
- Handles quota resilience: automatically fails over overflowing requests from Pro models to Flash when rate limits are approached.
What happened
Replaced heavy containerized proxy setups with a single script that boots in 15ms. Ran end-to-end coding loops across complex repositories without hitting Anthropic billing caps.
What I'd change
I'd implement streaming response pass-through for tool calls to reduce perceived latency on large file edits.