Skip to main content
This guide will get you from zero to running Claude Code via GitHub Copilot in under 5 minutes.

Prerequisites

Before you begin, make sure you have:
Active GitHub Copilot subscription (Individual, Business, or Enterprise)
Node.js 18 or higher installed (download here)
Claude Code installed globally: npm install -g @anthropic-ai/claude-code
If you prefer Docker, check out the Docker setup guide for running the proxy as a persistent container.

Installation

1

Clone the repository

Clone the project to your local machine:
git clone https://github.com/samarth777/claude-code-copilot.git
cd claude-code-copilot
The project has zero dependencies — no npm install needed!
2

Authenticate with GitHub

Run the authentication script to connect your GitHub Copilot account:
node scripts/auth.mjs
This will:
  1. Open your browser automatically to GitHub’s device authorization page
  2. Display a one-time code in your terminal
  3. Wait for you to enter the code and authorize the application
  4. Save your access token to ~/.claude-copilot-auth.json
╔══════════════════════════════════════════════════════════╗
   GitHub Copilot Authentication for Claude Code
╚══════════════════════════════════════════════════════════╝

Initiating GitHub OAuth device code flow...

┌──────────────────────────────────────────────────────────┐

   Your code:  ABCD-1234

   Open this URL in your browser:
   https://github.com/login/device

   Enter the code above and authorize the application.

└──────────────────────────────────────────────────────────┘

(Browser opened automatically)

Waiting for authorization...
 Authenticated as: yourusername (Your Name)
 Token saved to: /home/user/.claude-copilot-auth.json
Your token is saved locally and never shared with anyone except GitHub Copilot.
3

Start Claude Code

Use the launcher script to automatically start the proxy and Claude Code:
./scripts/launch.sh
The launcher will:
  • Check if you’re authenticated
  • Start the proxy server (via Docker if available, otherwise as a Node.js process)
  • Launch Claude Code with the correct environment variables
 Proxy already running on port 18080
Starting Claude Code via Copilot...

Claude Code is ready!
4

Select a model

Inside Claude Code, use the /model command to view and switch between available models:
/model
You can choose from:
  • claude-opus-4-6 — Most capable
  • claude-sonnet-4-5 — Balanced
  • claude-sonnet-4 — Fast
  • claude-haiku-4-5 — Fastest
Start with claude-sonnet-4-5 for the best balance of speed and capability.

Verify it’s working

Try a simple prompt to verify everything is working:
Write a hello world function in Python
You should see Claude Code respond using your GitHub Copilot subscription!

Alternative: Manual startup

If you prefer to start the proxy manually instead of using the launcher script:
1

Start the proxy server

node scripts/proxy.mjs
The proxy will start on port 18080 by default.
2

Launch Claude Code with environment variables

In a separate terminal:
ANTHROPIC_BASE_URL=http://localhost:18080 ANTHROPIC_API_KEY=copilot-proxy claude
Make sure to set both environment variables. Claude Code needs ANTHROPIC_BASE_URL to point to the proxy and ANTHROPIC_API_KEY to authenticate (the value can be anything except empty).

Troubleshooting

Your GitHub token may have expired. Re-authenticate:
rm ~/.claude-copilot-auth.json
node scripts/auth.mjs
Port 18080 is already in use. Kill the existing process:
lsof -ti:18080 | xargs kill -9
Or use a different port:
COPILOT_PROXY_PORT=18081 node scripts/proxy.mjs
Make sure both environment variables are set when launching Claude Code:
ANTHROPIC_BASE_URL=http://localhost:18080 ANTHROPIC_API_KEY=copilot-proxy claude
The ANTHROPIC_API_KEY can be any non-empty string — the proxy doesn’t validate it.
This project requires Node.js 18 or higher. Check your version:
node --version
If you’re on an older version, upgrade from nodejs.org.
Install Claude Code globally:
npm install -g @anthropic-ai/claude-code
Then verify it’s installed:
claude --version

Next steps

Docker setup

Run the proxy as a persistent container that survives reboots

Web search

Enable web search for up-to-date information

Configuration

Customize ports, auth file location, and more

Architecture

Learn how the proxy translates between APIs