Skip to the content.

ghc-proxy

A GitHub Copilot API proxy written in Rust. It exposes standard OpenAI and Anthropic compatible HTTP endpoints so any tool — Claude Code, the Codex CLI, the OpenAI/Anthropic SDKs, and more — can talk to GitHub Copilot models.

Documentation: Getting Started · Configuration · API Reference · Claude Code & Codex


What it does

   Your tool                ghc-proxy                  GitHub Copilot
┌──────────────┐  OpenAI/  ┌──────────────┐  disguised ┌──────────────┐
│ Claude Code  │ Anthropic │  translate   │  as the    │ api.github   │
│ Codex CLI    ├──────────►│  + filter    ├───────────►│ copilot.com  │
│ OpenAI SDK   │   HTTP    │  + retry     │  VS Code   │              │
└──────────────┘           └──────────────┘  client    └──────────────┘

The proxy authenticates to GitHub Copilot by faithfully impersonating the official VS Code Copilot Chat client, then re-shapes requests and responses so OpenAI- and Anthropic-native clients work unmodified.

Highlights

Quick start

# Build
cargo build --release

# Run — first launch in a terminal opens the interactive setup wizard
./target/release/ghc-proxy

Point any OpenAI client at http://127.0.0.1:8314/v1:

curl http://127.0.0.1:8314/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4o", "messages": [{"role": "user", "content": "Hello!"}]}'

Continue with the Getting Started guide.


ghc-proxy is a community project and is not affiliated with or endorsed by GitHub or Microsoft. Use it in accordance with the GitHub Copilot terms of service.