npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

github-router

v0.3.0

Published

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

Readme

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_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 -m gpt5.2-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

| Endpoint | Method | Format | |---|---|---| | /v1/chat/completions | POST | OpenAI Chat Completions | | /v1/responses | POST | OpenAI Responses (Codex models) | | /v1/messages | POST | Anthropic Messages | | /v1/messages/count_tokens | POST | Anthropic token counting | | /v1/models | GET | OpenAI model list | | /v1/embeddings | POST | OpenAI embeddings | | /v1/search | POST | Web search | | /usage | GET | Copilot usage & quotas |

All endpoints also available without the /v1 prefix.

| Model | /chat/completions | /responses | |---|---|---| | gpt-4.1, gpt-4o | Yes | Yes | | gpt5.2-codex, gpt-5.1-codex-mini | No | Yes | | claude-sonnet-4, claude-opus-4 | Yes (via /messages) | No | | o3, o4-mini | Yes | Yes |


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
services:
  github-router:
    build: .
    ports:
      - "8787:8787"
    environment:
      - GH_TOKEN=your_github_token_here
    restart: unless-stopped
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

| Flag | Description | Default | |---|---|---| | --port, -p | Port | 8787 | | --verbose, -v | Debug logging | false | | --account-type, -a | individual / business / enterprise | individual | | --rate-limit, -r | Min seconds between requests | - | | --wait, -w | Queue requests instead of rejecting on rate limit | false | | --manual | Approve each request manually | false | | --github-token, -g | Pass token directly (skip auth flow) | - | | --claude-code, -c | Generate Claude Code launch command | false | | --codex | Generate Codex CLI launch command | false | | --show-token | Print tokens to console | false | | --proxy-env | Use HTTP_PROXY/HTTPS_PROXY env vars | false |


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