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

@r-33/opencode

v0.5.2

Published

The Route 33 plugin for OpenCode: sign in with your browser, assign the budget for usage, and use the route_33 models — no API keys to paste, ever.

Readme

@r-33/opencode

The Route 33 plugin for OpenCode: sign in with your browser, assign the budget for usage, and use the route_33 models — no API keys to paste, ever.

Install

OpenCode v2 (recommended):

opencode plugin add @r-33/opencode

Installs globally — one plugins entry in the config's opencode.json loads every part (the server and TUI parts are auto-discovered from the package exports; no tui.json exists on v2).

OpenCode v1:

opencode plugin @r-33/opencode           # project scope (default)
opencode plugin @r-33/opencode --global  # global scope

Installs at the nearest definition and registers the plugin twice: the server part in opencode.json and the TUI part in tui.json — both files are load-bearing on v1, which is why the installer writes both.

Either way, restart OpenCode afterwards — plugins load at startup. Prefer config? Declare the plugin directly in opencode.json(c):

{ "plugin": ["@r-33/opencode"] }

First run

With ROUTE33_API_KEY unset, a fresh install starts silent: nothing opens until you connect — run /connect, type route33, and press Enter on the sign-in dialog to open the link in your browser (or c to copy it). Once the connect completes, the wizard takes over automatically:

  1. Run /connect and choose Route 33 — press Enter to open the sign-in link and finish the browser sign-in.
  2. The budget picker follows in OpenCode — your organisations come first when you belong to several (budgets never mix organisations), then that organisation's projects or your personal key.
  3. Key setup follows for that budget: bind one of your existing keys for it, or create one — name, monthly cap in EUR, description, expiry, and the models it may use (tick several, or allow all).
  4. The route_33 models appear. Pick one and prompt away — OpenCode v2 asks you to pick when no route_33 model is active yet.

The cap is checked against what the budget allows you: the question shows the maximum when the budget sets one, and asks again for a higher amount. Binding a key whose secret is not stored on this machine rotates it — its other users stop working — so you are asked first. Esc on any question cancels the setup; nothing is created.

On OpenCode v2 the setup is blocking: a waiting dialog covers the pauses between the steps until the key exists, and a key Route 33 still refuses shows the reason and returns to the questions with your answers kept. The model pick switches the model inside a session; from the home screen it ends with a pointer to /models.

A folder that is signed in but never attributed auto-runs the budget picker at launch — the prompt stays locked behind a setup mode until a budget is assigned, with Enter resuming setup; route_33 model requests from unattributed folders are refused server-side where the lock is unavailable. A message never names both commands: it points to /connect while you are signed out, and to the /r33 menu once you are signed in. A browser is required for every sign-in; restarts afterwards sign in silently.

On OpenCode v1

The flow is the same; a few things differ:

  • /connect lists Route 33 as route_33. Its sign-in dialog shows the link: open it, or press c to copy it.
  • Until a folder has its budget, the model list shows one route_33 entry, "Not set up yet" — it only keeps Route 33 in /connect.
  • A budget needs a Git repository. Outside one, use ROUTE33_API_KEY or OpenCode v2.
  • To sign out, run opencode auth logout and choose Route 33.

Commands

| Command | Effect | | -------------- | ------------------------------------------------------------------- | | /r33 | Open the Route 33 menu | | /r33 inspect | Show the assigned budget, the active key, and its rotation state | | /r33 rotate | Rotate the key immediately | | /r33 reset | Clear the assigned budget — the wizard runs again on the next start |

To sign out, run /connect, choose Route 33, select your account and press Ctrl+D twice. Once the last account is removed, the plugin forgets its sign-in on this machine; your key and budget stay.

The menu's budget entry — Attribute on OpenCode v2, Change budget on v1 — reopens the budget picker and the key setup for this folder.

A browser is required for every sign-in; restarts afterwards sign in silently.

Keys

One key per workspace: each project folder uses its own Route 33 key, and every request carries the key of its own workspace — connecting another folder never changes who this one bills for. Keys are short-lived and rotate automatically; nothing secret is ever written to your project, logs, or terminal.

Outside a Git repository a folder has no budget of its own: /connect offers your personal key, and that one choice covers every such folder on this machine. To change it, open /r33: Attribute in such a folder, Global key inside a repository.

Session cost

The cost OpenCode shows for a session on a route_33 model is an estimate from USD list prices. Route 33 meters your budget itself, in EUR — the two differ, and a model without a published price shows no cost.

Direct key mode

Set ROUTE33_API_KEY to a gateway key and the wizard is bypassed entirely — no sign-in, no attribution pick, no browser, no per-workspace keys. This is the right choice for autonomous, headless, or remote sessions where no human is present or the machine has no browser. Key rotation is your responsibility.

export ROUTE33_API_KEY=r33_sk_...

Auto-connect

Connecting is always explicit — run /connect yourself. What auto-starts at OpenCode launch is the attribution wizard for folders that are signed in but have no budget assigned yet. Suppress that with ROUTE33_AUTOCONNECT=0 and assign the budget from the /r33 menu when you choose to; on OpenCode v1 the opt-out switches the /r33 menu off as well. On remote or headless machines, use ROUTE33_API_KEY instead of the wizard.

Troubleshooting

| Symptom | What to do | | ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | | No route_33 models after start | /connect → Route 33 — the silent sign-in expired; sign in once and they return | | "This Route 33 build has no OAuth client id" | Update the plugin to a released build, or set ROUTE33_CLIENT_ID and restart | | Sign-in link never appears / SSH-only machine | Sign-in needs a browser on the same machine — there is no device-flow fallback | | "Route 33 — key not created" (OpenCode v2) | The dialog gives Route 33's reason, such as a cap above your allowance — change the answer and confirm again | | "Choosing individual models needs a fresh Route 33 sign-in." | A personal budget lists its models only for a sign-in that carries the models:read permission; the next browser sign-in adds it |

Configuration

| Variable | Purpose | Default | | --------------------- | -------------------------------------------- | -------------------------------- | | ROUTE33_API_KEY | Pre-shared gateway key (bypasses the wizard) | not set (wizard mode) | | ROUTE33_AUTOCONNECT | Opt out of the auto-start wizard | 1 (auto-start enabled) | | ROUTE33_CLIENT_ID | OAuth client identifier | included in released builds | | ROUTE33_AUTH_ISSUER | OAuth issuer | https://auth.route33.ai | | ROUTE33_API_BASE | Management API base | https://mapi.route33.ai/api/v1 | | ROUTE33_BASE_URL | Gateway models base | https://api.route33.ai/v1 |

A custom ROUTE33_CLIENT_ID must allow every scope the plugin requests — models:read, which lists the models of a personal budget, among them — or the auth server refuses the sign-in with invalid_scope.