{"_id":"@animeshkundu/github-router","_rev":"4-e6471b94350bbc50663b94446c0a7bda","name":"@animeshkundu/github-router","dist-tags":{"latest":"0.3.10"},"versions":{"0.3.7":{"name":"@animeshkundu/github-router","version":"0.3.7","keywords":["proxy","github-copilot","openai-compatible","anthropic-compatible","claude-code","codex","reverse-proxy","copilot"],"author":{"name":"animeshkundu"},"license":"MIT","_id":"@animeshkundu/github-router@0.3.7","maintainers":[{"name":"animeshkundu","email":"animeshit1@gmail.com"}],"homepage":"https://github.com/animeshkundu/github-router","bugs":{"url":"https://github.com/animeshkundu/github-router/issues"},"bin":{"github-router":"dist/main.js"},"dist":{"shasum":"f76f2ae654fb9e7bf91f288350942ca3708f7e73","tarball":"https://registry.npmjs.org/@animeshkundu/github-router/-/github-router-0.3.7.tgz","fileCount":5,"integrity":"sha512-y9NtXq4b9+KHW8SVs2PUzhGqniMGnqI+vguK34yBmqLPmIAXvVd46T4Up7okvHO/1nAzuY9EfHYeGG6/uaGGHg==","signatures":[{"sig":"MEUCIQDw1DMqSvF7vJdeDchontmRKxo6Ns63BrLrHtvioqomigIgM8wEbgkHwb4MA2o1cY8kdnyYW3I9mMdQm6quGisL1Wg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":263488},"type":"module","gitHead":"9a6e84a44cf83ef294c2bef85829ae457c4f809c","scripts":{"dev":"bun run --watch ./src/main.ts","knip":"knip-bun","lint":"eslint --cache","test":"bun test","build":"tsdown","start":"NODE_ENV=production bun run ./src/main.ts","prepack":"bun run build","prepare":"simple-git-hooks","release":"bun publish --access public","lint:all":"eslint --cache .","typecheck":"tsc"},"_npmUser":{"name":"animeshkundu","email":"animeshit1@gmail.com"},"repository":{"url":"git+https://github.com/animeshkundu/github-router.git","type":"git"},"_npmVersion":"11.11.0","description":"A reverse proxy that exposes GitHub Copilot as OpenAI and Anthropic compatible API endpoints.","directories":{},"lint-staged":{"*":"bun run lint --fix"},"_nodeVersion":"24.14.0","dependencies":{"zod":"^4.1.11","hono":"^4.9.9","srvx":"^0.8.9","citty":"^0.1.6","undici":"^7.16.0","consola":"^3.4.2","clipboardy":"^5.0.0","gpt-tokenizer":"^3.0.1","proxy-from-env":"^1.1.0","fetch-event-stream":"^0.1.5"},"publishConfig":{"registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"knip":"^5.64.1","eslint":"^9.37.0","tsdown":"^0.15.6","@eslint/js":"^9.37.0","@types/bun":"^1.2.23","typescript":"^5.9.3","lint-staged":"^16.2.3","simple-git-hooks":"^2.13.1","typescript-eslint":"^8.33.0","@types/proxy-from-env":"^1.0.4","eslint-config-prettier":"^10.1.0","prettier-plugin-packagejson":"^2.5.19"},"simple-git-hooks":{"pre-commit":"bunx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/github-router_0.3.7_1772620706393_0.5578693348967465","host":"s3://npm-registry-packages-npm-production"}},"0.3.8":{"name":"@animeshkundu/github-router","version":"0.3.8","keywords":["proxy","github-copilot","openai-compatible","anthropic-compatible","claude-code","codex","reverse-proxy","copilot"],"author":{"name":"animeshkundu"},"license":"MIT","_id":"@animeshkundu/github-router@0.3.8","maintainers":[{"name":"animeshkundu","email":"animeshit1@gmail.com"}],"homepage":"https://github.com/animeshkundu/github-router","bugs":{"url":"https://github.com/animeshkundu/github-router/issues"},"bin":{"github-router":"dist/main.js"},"dist":{"shasum":"1ea3552e9e17d43d4fc669c79562e703225f20ad","tarball":"https://registry.npmjs.org/@animeshkundu/github-router/-/github-router-0.3.8.tgz","fileCount":5,"integrity":"sha512-V0tVsLROBnc2aWX4mgtFgAoGz3CDvCsWqrJnFA+If0Jr0yU29ZnRWddUo77JmWZv86LuLp2Oy4Xy9jw7t+1MXA==","signatures":[{"sig":"MEYCIQCPX+rThXPAMkSf1HL+x3fTSPHaMLaYsJ64aL1r0XhsJAIhAI6I+GmqpLJCUk2L0R3UToYALQ2hys7MXLvN6a4Jt+9+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":272324},"type":"module","gitHead":"cc0605756224f7cd7b7721f0bdc7125b0f38d58d","scripts":{"dev":"bun run --watch ./src/main.ts","knip":"knip-bun","lint":"eslint --cache","test":"bun test","build":"tsdown","start":"NODE_ENV=production bun run ./src/main.ts","prepack":"bun run build","prepare":"simple-git-hooks","release":"bun publish --access public","lint:all":"eslint --cache .","typecheck":"tsc"},"_npmUser":{"name":"animeshkundu","email":"animeshit1@gmail.com"},"repository":{"url":"git+https://github.com/animeshkundu/github-router.git","type":"git"},"_npmVersion":"11.11.0","description":"A reverse proxy that exposes GitHub Copilot as OpenAI and Anthropic compatible API endpoints.","directories":{},"lint-staged":{"*":"bun run lint --fix"},"_nodeVersion":"24.14.0","dependencies":{"zod":"^4.1.11","hono":"^4.9.9","srvx":"^0.8.9","citty":"^0.1.6","undici":"^7.16.0","consola":"^3.4.2","clipboardy":"^5.0.0","gpt-tokenizer":"^3.0.1","proxy-from-env":"^1.1.0","fetch-event-stream":"^0.1.5"},"publishConfig":{"registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"knip":"^5.64.1","eslint":"^9.37.0","tsdown":"^0.15.6","@eslint/js":"^9.37.0","@types/bun":"^1.2.23","typescript":"^5.9.3","lint-staged":"^16.2.3","simple-git-hooks":"^2.13.1","typescript-eslint":"^8.33.0","@types/proxy-from-env":"^1.0.4","eslint-config-prettier":"^10.1.0","prettier-plugin-packagejson":"^2.5.19"},"simple-git-hooks":{"pre-commit":"bunx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/github-router_0.3.8_1772623739256_0.4437421909254671","host":"s3://npm-registry-packages-npm-production"}},"0.3.9":{"name":"@animeshkundu/github-router","version":"0.3.9","keywords":["proxy","github-copilot","openai-compatible","anthropic-compatible","claude-code","codex","reverse-proxy","copilot"],"author":{"name":"animeshkundu"},"license":"MIT","_id":"@animeshkundu/github-router@0.3.9","maintainers":[{"name":"animeshkundu","email":"animeshit1@gmail.com"}],"homepage":"https://github.com/animeshkundu/github-router","bugs":{"url":"https://github.com/animeshkundu/github-router/issues"},"bin":{"github-router":"dist/main.js"},"dist":{"shasum":"4ea24a70b0620986ab987c2f2479c75fabd3e3cf","tarball":"https://registry.npmjs.org/@animeshkundu/github-router/-/github-router-0.3.9.tgz","fileCount":5,"integrity":"sha512-y1A6NBTQIT4uJfxGdWvTll8bZvAIpkMLHwm+bKCDXpXgO/A/P6RaOs1FLrKlD8m6ulsSo/64XrA+Nt8bRIgocQ==","signatures":[{"sig":"MEUCIAwMWc3NbNXLllOPq/BJBJBuIwWFRe2zN3jFwiORWmR8AiEAotIIlZjBUFUEb0psHpfi8TsuQJqsKpV3LVmbWabvYzU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":279860},"type":"module","gitHead":"1b4b22b71b5aa8ed598f0d50ca6f44e59a7c0587","scripts":{"dev":"bun run --watch ./src/main.ts","knip":"knip-bun","lint":"eslint --cache","test":"bun test","build":"tsdown","start":"NODE_ENV=production bun run ./src/main.ts","prepack":"bun run build","prepare":"(simple-git-hooks || true)","release":"bun publish --access public","lint:all":"eslint --cache .","typecheck":"tsc"},"_npmUser":{"name":"animeshkundu","email":"animeshit1@gmail.com"},"repository":{"url":"git+https://github.com/animeshkundu/github-router.git","type":"git"},"_npmVersion":"11.11.0","description":"A reverse proxy that exposes GitHub Copilot as OpenAI and Anthropic compatible API endpoints.","directories":{},"lint-staged":{"*":"bun run lint --fix"},"_nodeVersion":"24.14.0","dependencies":{"zod":"^4.1.11","hono":"^4.9.9","srvx":"^0.8.9","citty":"^0.1.6","undici":"^7.16.0","consola":"^3.4.2","clipboardy":"^5.0.0","gpt-tokenizer":"^3.0.1","proxy-from-env":"^1.1.0","fetch-event-stream":"^0.1.5"},"publishConfig":{"registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"knip":"^5.64.1","eslint":"^9.37.0","tsdown":"^0.15.6","@eslint/js":"^9.37.0","@types/bun":"^1.2.23","typescript":"^5.9.3","lint-staged":"^16.2.3","simple-git-hooks":"^2.13.1","typescript-eslint":"^8.33.0","@types/proxy-from-env":"^1.0.4","eslint-config-prettier":"^10.1.0","prettier-plugin-packagejson":"^2.5.19"},"simple-git-hooks":{"pre-commit":"bunx lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/github-router_0.3.9_1772660974130_0.9918847992077335","host":"s3://npm-registry-packages-npm-production"}},"0.3.10":{"name":"@animeshkundu/github-router","version":"0.3.10","license":"MIT","description":"A reverse proxy that exposes GitHub Copilot as OpenAI and Anthropic compatible API endpoints.","keywords":["proxy","github-copilot","openai-compatible","anthropic-compatible","claude-code","codex","reverse-proxy","copilot"],"homepage":"https://github.com/animeshkundu/github-router","bugs":{"url":"https://github.com/animeshkundu/github-router/issues"},"publishConfig":{"registry":"https://registry.npmjs.org"},"repository":{"type":"git","url":"git+https://github.com/animeshkundu/github-router.git"},"author":{"name":"animeshkundu"},"type":"module","bin":{"github-router":"dist/main.js"},"scripts":{"build":"tsdown","dev":"bun run --watch ./src/main.ts","knip":"knip-bun","lint":"eslint --cache","lint:all":"eslint --cache .","prepack":"bun run build","prepare":"(simple-git-hooks || true)","release":"bun publish --access public","start":"NODE_ENV=production bun run ./src/main.ts","test":"bun test","typecheck":"tsc"},"simple-git-hooks":{"pre-commit":"bunx lint-staged"},"lint-staged":{"*":"bun run lint --fix"},"dependencies":{"citty":"^0.1.6","clipboardy":"^5.0.0","consola":"^3.4.2","fetch-event-stream":"^0.1.5","gpt-tokenizer":"^3.0.1","hono":"^4.9.9","proxy-from-env":"^1.1.0","srvx":"^0.8.9","undici":"^7.16.0","zod":"^4.1.11"},"devDependencies":{"@eslint/js":"^9.37.0","eslint-config-prettier":"^10.1.0","@types/bun":"^1.2.23","@types/proxy-from-env":"^1.0.4","eslint":"^9.37.0","knip":"^5.64.1","lint-staged":"^16.2.3","prettier-plugin-packagejson":"^2.5.19","simple-git-hooks":"^2.13.1","tsdown":"^0.15.6","typescript":"^5.9.3","typescript-eslint":"^8.33.0"},"gitHead":"cd91aa599e6dcf3111ed85f641dd0fab55212236","_id":"@animeshkundu/github-router@0.3.10","_nodeVersion":"24.14.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-C3rtjs0sR2JuT5MJM9tfB//818d4DEgMyyQxXWd3hbxeh/x5BjQzxpxLDaYpcnGCqCnAlG4Bag7L0aozhngiHQ==","shasum":"3f1d6163303a39e0656bdcbdd19ba9fa312376fb","tarball":"https://registry.npmjs.org/@animeshkundu/github-router/-/github-router-0.3.10.tgz","fileCount":5,"unpackedSize":279939,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCtJ4C6fCh3/WLvfykKzVO+XNQNPl1a7dM3/cEy4bELmAIgcerOE5GNibZsNFt25ZgMl2oBWn8pMRGqMTOo/oRxDCw="}]},"_npmUser":{"name":"animeshkundu","email":"animeshit1@gmail.com"},"directories":{},"maintainers":[{"name":"animeshkundu","email":"animeshit1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/github-router_0.3.10_1772687306096_0.5815812032263705"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-04T10:38:26.288Z","modified":"2026-03-05T05:08:26.376Z","0.3.7":"2026-03-04T10:38:26.545Z","0.3.8":"2026-03-04T11:28:59.390Z","0.3.9":"2026-03-04T21:49:34.280Z","0.3.10":"2026-03-05T05:08:26.244Z"},"bugs":{"url":"https://github.com/animeshkundu/github-router/issues"},"author":{"name":"animeshkundu"},"license":"MIT","homepage":"https://github.com/animeshkundu/github-router","keywords":["proxy","github-copilot","openai-compatible","anthropic-compatible","claude-code","codex","reverse-proxy","copilot"],"repository":{"type":"git","url":"git+https://github.com/animeshkundu/github-router.git"},"description":"A reverse proxy that exposes GitHub Copilot as OpenAI and Anthropic compatible API endpoints.","maintainers":[{"name":"animeshkundu","email":"animeshit1@gmail.com"}],"readme":"# github-router\r\n\r\n[![CI](https://github.com/animeshkundu/github-router/actions/workflows/ci.yml/badge.svg)](https://github.com/animeshkundu/github-router/actions/workflows/ci.yml)\r\n[![npm](https://img.shields.io/npm/v/github-router)](https://www.npmjs.com/package/github-router)\r\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\r\n\r\nUse your GitHub Copilot subscription to power **Claude Code**, **Codex CLI**, or any OpenAI/Anthropic-compatible tool.\r\n\r\ngithub-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.\r\n\r\n> [!WARNING]\r\n> Unofficial. Not supported by GitHub. May break. Use responsibly.\r\n> Review the [GitHub Copilot Terms](https://docs.github.com/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot) and [Acceptable Use Policies](https://docs.github.com/site-policy/acceptable-use-policies/github-acceptable-use-policies#4-spam-and-inauthentic-activity-on-github).\r\n\r\n## Quick Start\r\n\r\n```sh\r\n# 1. Authenticate (one-time)\r\nnpx github-router@latest auth\r\n\r\n# 2. Start the proxy\r\nnpx github-router@latest start\r\n```\r\n\r\nThe server runs at `http://localhost:8787`. Now pick your tool below.\r\n\r\n---\r\n\r\n## Use with Claude Code\r\n\r\n**Option A: Interactive (recommended)**\r\n\r\n```sh\r\nnpx github-router@latest start --claude-code\r\n```\r\n\r\nSelect your models, a launch command gets copied to your clipboard. Paste it in a new terminal.\r\n\r\n**Option B: Copy-paste config**\r\n\r\nCreate `.claude/settings.json` in your project:\r\n\r\n```json\r\n{\r\n  \"env\": {\r\n    \"ANTHROPIC_BASE_URL\": \"http://localhost:8787\",\r\n    \"ANTHROPIC_API_KEY\": \"dummy\",\r\n    \"ANTHROPIC_AUTH_TOKEN\": \"dummy\",\r\n    \"ANTHROPIC_MODEL\": \"gpt-4.1\",\r\n    \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"gpt-4.1\",\r\n    \"ANTHROPIC_SMALL_FAST_MODEL\": \"gpt-4.1-mini\",\r\n    \"ANTHROPIC_DEFAULT_HAIKU_MODEL\": \"gpt-4.1-mini\",\r\n    \"DISABLE_NON_ESSENTIAL_MODEL_CALLS\": \"1\",\r\n    \"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC\": \"1\"\r\n  },\r\n  \"permissions\": {\r\n    \"deny\": [\"WebSearch\"]\r\n  }\r\n}\r\n```\r\n\r\nThen run `claude` as normal.\r\n\r\n---\r\n\r\n## Use with Codex CLI\r\n\r\n```sh\r\nnpx github-router@latest start --codex\r\n```\r\n\r\nOr set the env vars yourself:\r\n\r\n```sh\r\nexport OPENAI_BASE_URL=\"http://localhost:8787/v1\"\r\nexport OPENAI_API_KEY=\"dummy\"\r\ncodex --full-auto -m gpt-5.3-codex\r\n```\r\n\r\n---\r\n\r\n## Use with any OpenAI-compatible tool\r\n\r\nPoint any tool at `http://localhost:8787/v1`:\r\n\r\n```sh\r\ncurl http://localhost:8787/v1/chat/completions \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"model\": \"gpt-4.1\", \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]}'\r\n```\r\n\r\n---\r\n\r\n## API Endpoints\r\n\r\n| Endpoint | Method | Format |\r\n|---|---|---|\r\n| `/v1/chat/completions` | POST | OpenAI Chat Completions |\r\n| `/v1/responses` | POST | OpenAI Responses (Codex models) |\r\n| `/v1/messages` | POST | Anthropic Messages |\r\n| `/v1/messages/count_tokens` | POST | Anthropic token counting |\r\n| `/v1/models` | GET | OpenAI model list |\r\n| `/v1/embeddings` | POST | OpenAI embeddings |\r\n| `/v1/search` | POST | Web search |\r\n| `/usage` | GET | Copilot usage & quotas |\r\n\r\nOpenAI-compatible endpoints are also available without the `/v1` prefix (for example, `/chat/completions`).\r\nAnthropic endpoints are only available under `/v1/messages`.\r\n\r\n<details>\r\n<summary>Model / endpoint compatibility</summary>\r\n\r\n| Model | /chat/completions | /responses | /v1/messages |\r\n|---|---|---|---|\r\n| gpt-4.1, gpt-4o | Yes | Yes | No |\r\n| gpt-5.3-codex, gpt-5.2-codex | No | Yes | No |\r\n| claude-opus-4.6, claude-sonnet-4.6 | Yes | No | Yes |\r\n| o3, o4-mini | Yes | Yes | No |\r\n\r\n</details>\r\n\r\n---\r\n\r\n## Docker\r\n\r\nPre-built images on GitHub Container Registry:\r\n\r\n```sh\r\ndocker pull ghcr.io/animeshkundu/github-router:latest\r\ndocker run -p 8787:8787 -e GH_TOKEN=your_token ghcr.io/animeshkundu/github-router\r\n```\r\n\r\nOr build locally:\r\n\r\n```sh\r\ndocker build -t github-router .\r\ndocker run -p 8787:8787 -e GH_TOKEN=your_token github-router\r\n```\r\n\r\n<details>\r\n<summary>Docker Compose</summary>\r\n\r\n```yaml\r\nservices:\r\n  github-router:\r\n    build: .\r\n    ports:\r\n      - \"8787:8787\"\r\n    environment:\r\n      - GH_TOKEN=your_github_token_here\r\n    restart: unless-stopped\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n<summary>Persistent token storage</summary>\r\n\r\n```sh\r\nmkdir -p ./github-router-data\r\ndocker run -p 8787:8787 -v $(pwd)/github-router-data:/root/.local/share/github-router github-router\r\n```\r\n\r\n</details>\r\n\r\n---\r\n\r\n## CLI Reference\r\n\r\n```\r\ngithub-router start [options]    Start the proxy server\r\ngithub-router auth               Authenticate with GitHub\r\ngithub-router check-usage        Show Copilot usage/quotas\r\ngithub-router debug              Print diagnostic info\r\n```\r\n\r\n| Flag | Description | Default |\r\n|---|---|---|\r\n| `--port, -p` | Port | 8787 |\r\n| `--verbose, -v` | Debug logging | false |\r\n| `--account-type, -a` | `individual` / `business` / `enterprise` | individual |\r\n| `--rate-limit, -r` | Min seconds between requests | - |\r\n| `--wait, -w` | Queue requests instead of rejecting on rate limit | false |\r\n| `--manual` | Approve each request manually | false |\r\n| `--github-token, -g` | Pass token directly (skip auth flow) | - |\r\n| `--claude-code, -c` | Generate Claude Code launch command | false |\r\n| `--codex` | Generate Codex CLI launch command | false |\r\n| `--show-token` | Print tokens to console | false |\r\n| `--proxy-env` | Use HTTP_PROXY/HTTPS_PROXY env vars | false |\r\n\r\n---\r\n\r\n## Development\r\n\r\n```sh\r\nbun install          # Install deps\r\nbun run dev          # Dev server with hot reload\r\nbun test             # Run tests\r\nbun run lint:all     # Lint\r\nbun run typecheck    # Type check\r\nbun run build        # Build for distribution\r\n```\r\n\r\n## License\r\n\r\n[MIT](LICENSE)\r\n","readmeFilename":"README.md"}