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

ghc-tunnel

v1.0.2

Published

GitHub Copilot API Proxy - Provides OpenAI and Anthropic compatible endpoints via GitHub Copilot

Readme

ghc-tunnel

GitHub Copilot API Proxy — exposes standard OpenAI and Anthropic compatible endpoints so any tool (including Claude Code) can use GitHub Copilot models.

Quick Start

# Run directly (Node.js 18+ required)
npx ghc-tunnel

# Or install globally
npm install -g ghc-tunnel
ghc-tunnel

# Interactive setup (configures models + Claude Code settings)
ghc-tunnel --setup

# Update Claude Code settings only
ghc-tunnel --setup --claudecode

On first run the proxy initiates GitHub Device Flow authentication if no GITHUB_TOKEN is set.

Features

  • OpenAI-compatible /v1/chat/completions and /v1/responses endpoints
  • Anthropic-compatible /v1/messages endpoint (direct or translated)
  • Automatic model name translation via configurable mappings
  • Streaming support (SSE) for all endpoints
  • Request cache with analytics dashboard
  • Retry with backoff for upstream connection errors
  • Content filtering (system prompt manipulation, tool result cleaning)
  • Token management with automatic refresh

CLI Options

ghc-tunnel [options]

  -s, --setup             Interactive setup wizard (configure models + Claude Code)
      --claudecode        Update Claude Code settings only (use with --setup)
  -p, --port <port>       Port to listen on (default: 8314)
  -a, --address <addr>    Address to listen on (default: localhost)
  -c, --config            Generate default config file
  -v, --version           Show version
  -h, --help              Show help

Claude Code Integration

Run ghc-tunnel --setup --claudecode or manually configure ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "http://localhost:8314/",
    "ANTHROPIC_AUTH_TOKEN": "dummy",
    "ANTHROPIC_MODEL": "claude-opus-4-6[1m]",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-4-6"
  }
}

Configuration

Config file: ~/.ghc-tunnel/config.yaml (generated on first run or with --config).

See docs/configuration.md for full reference.

API Endpoints

| Endpoint | Description | |----------|-------------| | POST /v1/chat/completions | OpenAI chat completions | | POST /v1/responses | OpenAI responses API | | GET /v1/models | List available models | | POST /v1/messages | Anthropic messages API | | GET / | Web dashboard | | GET /requests | Request browser |

Example Usage

OpenAI SDK

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8314/v1",
    api_key="not-needed"
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}]
)

Anthropic SDK

import anthropic

client = anthropic.Anthropic(
    base_url="http://localhost:8314",
    api_key="not-needed"
)

message = client.messages.create(
    model="claude-sonnet-4",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}]
)

cURL

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

Documentation

License

MIT