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

claude-rt

v0.1.0

Published

Transparent proxy for Claude Code — Anthropic passthrough, OpenAI transform, per-subagent routing

Readme

claude-rt

Transparent proxy for Claude Code. Anthropic traffic passes through unchanged, gpt-* models get routed to OpenAI.

Architecture

graph LR
  subgraph Claude Code Agents
    O["Orchestrator<br/><small>Claude Opus</small>"]
    S1["SubAgent<br/><small>Claude Haiku</small>"]
    S2["SubAgent<br/><small>GPT-5</small>"]
    T["Team Member<br/><small>GPT-5</small>"]
  end

  RT["<b>claude-rt</b><br/><small>:8787</small>"]

  A["Anthropic API<br/><small>passthrough</small>"]
  OA["OpenAI API<br/><small>transform</small>"]

  O --> RT
  S1 --> RT
  S2 --> RT
  T --> RT
  RT -->|raw bytes| A
  RT -->|format convert| OA

Typical setup: Opus orchestrates, subagents and team members run on cheaper/specialized models to cut cost.

Per-agent routing is controlled via routing rules (model pattern match) or MODEL_ROUTE magic (system prompt override).

Quick Start

# Docker (recommended)
docker run -d --name claude-rt \
  -p 8787:8787 \
  -e OPENAI_API_KEY=sk-... \
  ghcr.io/soju06/claude-rt:latest
# Local
cp .env.example .env     # add your OPENAI_API_KEY
bun install && bun run dev

Then connect Claude Code:

ANTHROPIC_BASE_URL=http://127.0.0.1:8787 claude

To make this permanent, add to ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "http://127.0.0.1:8787"
  }
}

Examples

Local

Create config/runtime.local.json:

{
  "providers": [
    {
      "id": "anthropic-main",
      "type": "anthropic",
      "baseUrl": "https://api.anthropic.com",
      "mode": "passthrough"
    },
    {
      "id": "openai-main",
      "type": "openai",
      "baseUrl": "https://api.openai.com/v1",
      "apiKey": "sk-...",
      "mode": "transform"
    }
  ],
  "routing": {
    "version": 1,
    "defaultProvider": "anthropic-main",
    "routes": [
      { "id": "gpt-to-openai", "modelPattern": "^gpt-", "providers": ["openai-main"] }
    ]
  }
}
CONFIG_FILE=config/runtime.local.json bun run dev

Docker

Mount your config file into the container:

docker run -d --name claude-rt \
  -p 8787:8787 \
  -v $(pwd)/config/runtime.local.json:/app/config/runtime.local.json \
  -e CONFIG_FILE=config/runtime.local.json \
  ghcr.io/soju06/claude-rt:latest

Claude models → Anthropic (passthrough), gpt-* models → OpenAI (transform). Routes are regex, first-match-wins.

Subagent Routing

Claude Code subagents can target a specific provider/model by adding a magic line as the first line of their system prompt:

[MODEL_ROUTE provider=openai-main model=gpt-5.3-codex]

The proxy strips this line before forwarding. See .claude/agents/ for examples.

Configuration

Runtime config: config/runtime.example.json (copy to runtime.local.json for local overrides)

{
  "providers": [
    { "id": "anthropic-main", "type": "anthropic", "baseUrl": "https://api.anthropic.com" },
    { "id": "openai-main",    "type": "openai",    "baseUrl": "https://api.openai.com/v1", "authEnv": "OPENAI_API_KEY" }
  ],
  "routing": {
    "defaultProvider": "anthropic-main",
    "routes": [
      { "id": "gpt-to-openai", "modelPattern": "^gpt-", "providers": ["openai-main"] }
    ]
  }
}

| Variable | Description | |---|---| | PORT | Listen port (default 8787) | | CONFIG_FILE | Runtime config path | | OPENAI_API_KEY | OpenAI API key for gpt-* routing | | ROUTE_MODEL_ALLOWLIST | Comma-separated allowlist for MODEL_ROUTE targets |

Development

bun run dev              # dev server (port 8787)
bun run check            # typecheck + all tests
bun run test:e2e         # E2E tests (replay)
bun run test:e2e:live    # E2E against live OpenAI
docker compose watch     # Docker watch mode