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

openrouter-claude-code-launcher

v0.2.0

Published

OpenRouter launcher for Claude Code — browse OpenRouter models (free + paid) and launch Claude Code against the selected one.

Downloads

303

Readme

OpenRouter Claude Code Launcher (orcc)

An interactive, cross-platform CLI that browses OpenRouter models (free and paid) and launches Claude Code against the one you pick — with zero global config and per-launch credential injection.

npm version npm downloads Node Platforms License

📦 Published on npm: openrouter-claude-code-launcher — run it with npx openrouter-claude-code-launcher.


Why this exists

OpenRouter exposes an Anthropic-compatible endpoint, so Claude Code can talk to it natively — no local proxy required. The usual setup, though, means exporting ANTHROPIC_* variables into your shell or a repo file, which makes the model + key global and static and pollutes every other claude invocation.

orcc takes a cleaner approach: it spawns claude as a child process and injects the OpenRouter configuration into that process only. Every launch is independent, you pick a fresh model each time, and nothing leaks into your shell or your repo.

Features

  • 🔎 Full catalog — fetches every model from OpenRouter's public API (no key needed just to browse).
  • 🆓💲 Free / Paid / Favourites / Search-all — choose a category up front, or search across everything.
  • ⌨️ Searchable picker — type to fuzzy-filter by id or name; arrow keys to navigate.
  • Favourites — star any model while selecting; favourites persist (in your config) and are pinned to the top of every list.
  • 💸 Cheapest-first — paid models are sorted by price ascending; marks Anthropic (recommended for Claude Code).
  • 🛠️ Tool-capable only — hides models that lack tools support (Claude Code is tool-use driven and won't work without it).
  • 🧹 Clean pricing — filters out sentinel/invalid-price entries (e.g. openrouter/auto).
  • 🚀 Per-launch env injection — never touches your global shell or repo files.
  • 🧠 Smart model roles — your pick drives the main + subagent models; the cheap background/"fast" role uses a compatible cheap model (never a quota-capped free one).
  • 🔐 Safe credentialsOPENROUTER_API_KEY → saved config (chmod 600) → prompt once.
  • Cached + resilient — short-lived model-list cache with stale-fallback on network failure.
  • 🧯 Robust errors — clear handling for missing key, network failure, missing claude binary, and empty model lists; passes Claude Code's exit code through.
  • 🪟🍎🐧 Cross-platform — macOS, Linux, and Windows.
  • Self-update — notifies when a newer version is on npm (throttled, non-blocking); orcc --update upgrades in place.
  • 🧰 Scriptable — non-interactive flags (--model, --list, --refresh, --version, --update).

How it works

orcc spawns Claude Code with these variables set for that process only:

ANTHROPIC_BASE_URL=https://openrouter.ai/api
ANTHROPIC_AUTH_TOKEN=<your OpenRouter key>
ANTHROPIC_API_KEY=                         # explicitly empty (required by OpenRouter)
ANTHROPIC_DEFAULT_OPUS_MODEL   = <picked model>
ANTHROPIC_DEFAULT_SONNET_MODEL = <picked model>
CLAUDE_CODE_SUBAGENT_MODEL     = <picked model>
ANTHROPIC_DEFAULT_HAIKU_MODEL  = <cheap compatible model>   # background / "fast" role
ANTHROPIC_SMALL_FAST_MODEL     = <cheap compatible model>

The chosen model is also passed via claude --model <id>. The background/"fast" role is never routed to a free model (those are quota-capped and unreliable) — for an Anthropic main model it uses the cheapest Anthropic haiku, otherwise it reuses your picked model.

Prerequisites

  • Node.js ≥ 18
  • Claude Codenpm install -g @anthropic-ai/claude-code
  • An OpenRouter API key — https://openrouter.ai/keys

Installation

Run instantly with npx (nothing installed permanently):

npx openrouter-claude-code-launcher

Or install globally for a persistent orcc command:

npm install -g openrouter-claude-code-launcher
orcc

The package ships as a single bundled file, so there's no dependency tree to download — installs and npx cold-starts are fast. Requires Node ≥ 18 (and Claude Code — see Prerequisites).

From source (development)

git clone [email protected]:sherazahmedvaival/openrouter-claude-code-launcher.git
cd openrouter-claude-code-launcher
npm install            # installs deps and builds dist/ via the `prepare` hook
node bin/orcc.js       # run directly from the ESM source
# or: npm link         # symlink the global `orcc` to your checkout

Usage

orcc                       # browse models, pick one, launch Claude Code
orcc --list                # print free + paid (tool-capable) models and exit
orcc --refresh             # ignore the ~10 min cache and re-fetch the catalog
orcc -m anthropic/claude-haiku-4.5            # skip the picker, launch this model
orcc -- --dangerously-skip-permissions        # forward args after -- to claude

Interactive flow

Running orcc with no flags:

  1. Pick a category: ★ Favourites, 🔍 Search all models (across free + paid), Paid, or Free.
  2. Browse a searchable list — type to filter by id/name, ↑/↓ to navigate, ↩ Back to change category. Paid is cheapest-first; marks Anthropic; ★ favourites are pinned to the top.
  3. After choosing a model: Launch it, or ★ add / remove it from favourites (saved in your config and pinned next time).
  4. A free selection prints a one-line reliability warning (non-blocking).
  5. Prompts for your API key if one isn't already configured, then launches Claude Code.

Credentials

orcc resolves your OpenRouter key in this order:

  1. OPENROUTER_API_KEY environment variable
  2. Saved config file
  3. Interactive prompt (optionally saved for next time)

The config lives at ~/.config/orcc/config.json (POSIX, written chmod 600) or %APPDATA%\orcc\config.json (Windows). It also stores the short-lived model-list cache.

Updating

orcc checks npm for a newer version (at most once a day, non-blocking) and prints a notice when one is available. To update:

orcc --update      # install the latest from npm (npm install -g …@latest)
orcc --version     # show the installed version

Using npx? You always run the latest: npx openrouter-claude-code-launcher. Set ORCC_NO_UPDATE_CHECK=1 to disable the background check.

Uninstall

orcc --uninstall          # interactive: remove orcc's saved data, then optionally the package
orcc --uninstall --yes    # non-interactive: remove data + the global package, no prompts

--uninstall deletes orcc's data directory (~/.config/orcc or %APPDATA%\orcc — API key, favourites, last model, cache) and can also run the global npm uninstall for you. To remove just the command yourself:

npm uninstall -g openrouter-claude-code-launcher

Choosing a model

For a reliable Claude Code session, pick an Anthropic model (). OpenRouter only guarantees Claude Code with Anthropic first-party models. orcc lists everything, but:

  • Free models are rate-limited (~50 requests/day under $10 credit) and each is served by a single sponsor provider. Claude Code makes many calls per prompt, so free models commonly hit 429 · Provider returned error mid-session.
  • Cheap non-Anthropic models often accept simple requests but reject Claude Code's full payload (system prompt + tool definitions) with 422, or return empty/garbled output.

anthropic/claude-haiku-4.5 is the cheapest reliable option; anthropic/claude-sonnet-4.6 for stronger results. Sustained use needs real OpenRouter credit ($10+).

Troubleshooting

| Symptom | Cause | Fix | |---|---|---| | Retrying… 10/10, "attempted to connect to server" | Free-model quota / provider throttling (429) | Use a paid Anthropic model; add OpenRouter credit | | API Error: 422 Provider returned error | A non-Anthropic model rejected Claude Code's full request | Switch to an Anthropic model () | | Empty / no response but exit 0 | Non-Anthropic model output doesn't map to Claude Code's format | Use an Anthropic model | | `claude` was not found | Claude Code isn't installed / on PATH | npm install -g @anthropic-ai/claude-code | | Failed to load models | Network/API issue | Re-run; orcc falls back to cached list when possible |

How free vs paid is decided

A model is free only when both its prompt and completion prices are 0 on OpenRouter (these IDs usually end in :free). Everything else is paid and billed to your OpenRouter account. Only tool-capable models are listed in either group.

Publishing (maintainers)

npm version <patch|minor|major>   # bump version + tag
npm publish                       # `prepare` rebuilds dist/orcc.cjs before packing
git push --follow-tags

The published tarball contains only dist/orcc.cjs, package.json, README.md, and LICENSE (enforced by the files whitelist) — source and dev deps stay out.

License

MIT