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

@hyorman/copilot-proxy-cli

v1.0.2

Published

OpenAI-compatible proxy server for GitHub Copilot, powered by the Copilot SDK

Downloads

46

Readme

@hyorman/copilot-proxy-cli

OpenAI-compatible proxy server for GitHub Copilot. Use Copilot models through standard OpenAI API endpoints from any HTTP client.

This project is not affiliated with GitHub, Microsoft, or OpenAI. It is intended for research, experimentation, and local prototyping rather than production use.

Quick Start

npx @hyorman/copilot-proxy-cli

If GITHUB_TOKEN is unset, the CLI falls back to the Copilot SDK's device code flow on first run.

Test it:

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

Installation

Run without installing (recommended):

npx @hyorman/copilot-proxy-cli

Install globally:

npm install -g @hyorman/copilot-proxy-cli
copilot-proxy

From source:

git clone https://github.com/hyorman/copilot-proxy.git
cd copilot-proxy
npm install && npm run build
node packages/cli/out/main.js

Configuration

Environment variables

| Variable | Description | Default | | --- | --- | --- | | GITHUB_TOKEN | GitHub personal access token with Copilot access (optional) | — | | PORT | Server listening port | 3000 | | API_TOKENS | Comma-separated bearer tokens for request authentication | — | | DATA_DIR | Directory for persisted state (tokens, assistants, skills) | ~/.copilot-sdk-proxy | | CLI_PATH | Path to Copilot CLI executable | — | | CLI_URL | URL of an existing CLI server to connect to | — |

.env file support

The CLI automatically loads a .env file from the working directory via Node's process.loadEnvFile() on supported runtimes. Create a .env file to avoid exporting variables each time:

GITHUB_TOKEN=ghp_...
PORT=3001
API_TOKENS=my-secret-token-1,my-secret-token-2

If GITHUB_TOKEN is omitted, the CLI will prompt for device code authentication when the SDK needs to sign in.

Token management

The CLI includes subcommands for managing persistent API tokens. Tokens are stored in DATA_DIR (default ~/.copilot-sdk-proxy/api-tokens.json).

Create a token:

copilot-proxy token create my-token

List tokens:

copilot-proxy token list

Remove a token:

copilot-proxy token remove my-token

When both API_TOKENS env var and persisted tokens exist, they are merged. If no tokens are configured at all, authentication is disabled and the server accepts all requests.

API Endpoints

| Method | Path | Description | | --- | --- | --- | | GET | /v1/models | List available models | | POST | /v1/chat/completions | Chat completions (streaming + non-streaming) | | POST | /v1/responses | Model responses | | — | /v1/assistants/... | Assistants API | | — | /v1/skills/... | Skills API |

Usage Examples

Chat completion

curl -X POST http://localhost:3000/v1/chat/completions \
  -H "Authorization: Bearer cpx_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": false
  }'

Streaming

curl -X POST http://localhost:3000/v1/chat/completions \
  -H "Authorization: Bearer cpx_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": true
  }'

Requirements

  • Node.js 22+
  • A GitHub account with Copilot access

License

MIT


See the main repository for full documentation including the Skills API and Assistants API.