Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@animeshkundu/github-router

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@animeshkundu/github-router

A reverse proxy that exposes GitHub Copilot as OpenAI and Anthropic compatible API endpoints.

latest
Source
npmnpm
Version
0.3.10
Version published
Weekly downloads
15
87.5%
Maintainers
1
Weekly downloads
 
Created
Source

github-router

CI npm License: MIT

Use your GitHub Copilot subscription to power Claude Code, Codex CLI, or any OpenAI/Anthropic-compatible tool.

github-router is a local reverse proxy that translates standard API formats to GitHub Copilot's backend. One command to start, copy-paste configs for your tools.

[!WARNING] Unofficial. Not supported by GitHub. May break. Use responsibly. Review the GitHub Copilot Terms and Acceptable Use Policies.

Quick Start

# 1. Authenticate (one-time)
npx github-router@latest auth

# 2. Start the proxy
npx github-router@latest start

The server runs at http://localhost:8787. Now pick your tool below.

Use with Claude Code

Option A: Interactive (recommended)

npx github-router@latest start --claude-code

Select your models, a launch command gets copied to your clipboard. Paste it in a new terminal.

Option B: Copy-paste config

Create .claude/settings.json in your project:

{
  "env": {
    "ANTHROPIC_BASE_URL": "http://localhost:8787",
    "ANTHROPIC_API_KEY": "dummy",
    "ANTHROPIC_AUTH_TOKEN": "dummy",
    "ANTHROPIC_MODEL": "gpt-4.1",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "gpt-4.1",
    "ANTHROPIC_SMALL_FAST_MODEL": "gpt-4.1-mini",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "gpt-4.1-mini",
    "DISABLE_NON_ESSENTIAL_MODEL_CALLS": "1",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  },
  "permissions": {
    "deny": ["WebSearch"]
  }
}

Then run claude as normal.

Use with Codex CLI

npx github-router@latest start --codex

Or set the env vars yourself:

export OPENAI_BASE_URL="http://localhost:8787/v1"
export OPENAI_API_KEY="dummy"
codex --full-auto -m gpt-5.3-codex

Use with any OpenAI-compatible tool

Point any tool at http://localhost:8787/v1:

curl http://localhost:8787/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4.1", "messages": [{"role": "user", "content": "Hello"}]}'

API Endpoints

EndpointMethodFormat
/v1/chat/completionsPOSTOpenAI Chat Completions
/v1/responsesPOSTOpenAI Responses (Codex models)
/v1/messagesPOSTAnthropic Messages
/v1/messages/count_tokensPOSTAnthropic token counting
/v1/modelsGETOpenAI model list
/v1/embeddingsPOSTOpenAI embeddings
/v1/searchPOSTWeb search
/usageGETCopilot usage & quotas

OpenAI-compatible endpoints are also available without the /v1 prefix (for example, /chat/completions). Anthropic endpoints are only available under /v1/messages.

Model / endpoint compatibility
Model/chat/completions/responses/v1/messages
gpt-4.1, gpt-4oYesYesNo
gpt-5.3-codex, gpt-5.2-codexNoYesNo
claude-opus-4.6, claude-sonnet-4.6YesNoYes
o3, o4-miniYesYesNo

Docker

Pre-built images on GitHub Container Registry:

docker pull ghcr.io/animeshkundu/github-router:latest
docker run -p 8787:8787 -e GH_TOKEN=your_token ghcr.io/animeshkundu/github-router

Or build locally:

docker build -t github-router .
docker run -p 8787:8787 -e GH_TOKEN=your_token github-router
Docker Compose
services:
  github-router:
    build: .
    ports:
      - "8787:8787"
    environment:
      - GH_TOKEN=your_github_token_here
    restart: unless-stopped
Persistent token storage
mkdir -p ./github-router-data
docker run -p 8787:8787 -v $(pwd)/github-router-data:/root/.local/share/github-router github-router

CLI Reference

github-router start [options]    Start the proxy server
github-router auth               Authenticate with GitHub
github-router check-usage        Show Copilot usage/quotas
github-router debug              Print diagnostic info
FlagDescriptionDefault
--port, -pPort8787
--verbose, -vDebug loggingfalse
--account-type, -aindividual / business / enterpriseindividual
--rate-limit, -rMin seconds between requests-
--wait, -wQueue requests instead of rejecting on rate limitfalse
--manualApprove each request manuallyfalse
--github-token, -gPass token directly (skip auth flow)-
--claude-code, -cGenerate Claude Code launch commandfalse
--codexGenerate Codex CLI launch commandfalse
--show-tokenPrint tokens to consolefalse
--proxy-envUse HTTP_PROXY/HTTPS_PROXY env varsfalse

Development

bun install          # Install deps
bun run dev          # Dev server with hot reload
bun test             # Run tests
bun run lint:all     # Lint
bun run typecheck    # Type check
bun run build        # Build for distribution

License

MIT

Keywords

proxy

FAQs

Package last updated on 05 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts