Developer Infrastructure

Claude Code. Powered by the Gemini CLI session you already have.

Route Claude Code requests through Gemini CLI authentication using a lightweight local compatibility proxy. No separate Gemini API key required. Zero npm dependencies.

Get Started in 60s
Run: export ANTHROPIC_BASE_URL="http://localhost:8099" && claude
Client
Claude Code CLI
Anthropic /v1/messages
→
Local Proxy (localhost:8099)
CodeWeaver Core
Schema & SSE Stream Bridge
→
Provider
Google Gemini API
OAuth Handshake (Token Reuse)
Real-Time Translation

See how Anthropic requests map to Gemini

CodeWeaver intercepts outgoing Anthropic client schemas, normalizes function declarations to Vertex AI specification, and translates incoming chunks into Server-Sent Events.

ANTHROPIC INPUT (FROM CLAUDE CODE) PORT 8099
{
  "model": "claude-3-5-sonnet-20241022",
  "tools": [{
    "name": "read_file",
    "description": "Read repository file",
    "input_schema": {
      "type": "object",
      "properties": {
        "path": { "type": "string" }
      }
    }
  }],
  "stream": true
}
GEMINI OUTPUT (TRANSLATED PAYLOAD) VERTEX AI SPEC
{
  "contents": [...],
  "tools": [{
    "functionDeclarations": [{
      "name": "read_file",
      "description": "Read repository file",
      "parameters": {
        "type": "OBJECT",
        "properties": {
          "path": { "type": "STRING" }
        }
      }
    }]
  }]
}
Engineering Specifications

Built for transparent local execution

No external cloud dependencies, no intermediate telemetry, and no complex configuration files required.

Standard Library

Zero npm Dependencies

Implemented purely with Node.js built-in modules (`http`, `crypto`, `fs`, `path`). Fast startup, negligible memory overhead, and no supply-chain risks.

Authentication

Automated Token Handoff

Extracts and refreshes OAuth access credentials directly from your existing Google Gemini CLI configuration (`~/.pi/agent/auth.json` or local token store).

Protocols

Full SSE Streaming

Maps Gemini streaming chunks into Anthropic `content_block_delta` Server-Sent Events, ensuring interactive typing animations in Claude Code remain fluid.

Compatibility Matrix

Transparent Model Mapping

Requests targeting Anthropic model strings are automatically routed to the corresponding Gemini model tiers.

Claude Code Model Request Translated Gemini Target Capability Status
claude-3-5-sonnet-* gemini-2.5-pro Deep reasoning, code generation, tool calls Supported
claude-3-5-haiku-* gemini-2.5-flash Fast context retrieval, file summarization Supported
claude-3-opus-* gemini-2.5-pro (Stripped Tools) Safety classifier bypass & subagent routines Supported
Getting Started

Running CodeWeaver in three commands

Ensure you have Node.js 18+ and an authenticated Gemini CLI session on your machine.

01

Clone the repository

Clone the lightweight repository to your local development environment.

git clone https://github.com/sooraj-makala/CodeWeaver.git && cd CodeWeaver
02

Start the proxy server

Runs the local HTTP daemon on port 8099 with zero dependency installation needed.

node proxy.js
03

Launch Claude Code

Direct Claude Code to route requests through the local proxy endpoint.

export ANTHROPIC_BASE_URL="http://localhost:8099" && export ANTHROPIC_API_KEY="dummy" && claude