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

00bx-kiro-gateway

v1.0.9

Published

AI SDK provider that lets OpenCode use Claude models through Kiro CLI's free-tier credits

Readme

00bx-kiro-gateway

AI SDK provider that lets OpenCode use Claude models through Kiro CLI's free-tier credits.

How it works

Kiro is Amazon's AI IDE. It comes with free credits for Claude models. When you sign in to Kiro, it stores auth tokens locally. This package reads those tokens and routes OpenCode requests through the same backend — so you can use your Kiro free-tier credits directly inside OpenCode.

Models

| Model | Config ID | Status | |---|---|---| | Claude Sonnet 4 | claude-sonnet-4 | Working | | Claude Sonnet 4.5 | claude-sonnet-4-5 | Working | | Claude Haiku 4.5 | claude-haiku-4-5 | Working | | Claude Opus 4.5 | claude-opus-4-5 | Currently disabled by Kiro (capacity limits) |

Opus 4.5 note: Kiro's servers have disabled Opus 4.5 due to capacity constraints on their end. The config is included so it works automatically whenever Kiro re-enables it — no update needed on your side.

All working models support streaming, tool use, and multi-turn conversations.

Setup

1. Install and sign in to Kiro

brew install --cask kiro

Or download from kiro.dev.

Open Kiro, sign in with your AWS Builder ID (create one at profile.aws if needed), then you can close it. The credentials stay on your machine.

2. Install OpenCode

curl -fsSL https://opencode.ai/install | bash

3. Add the provider config

Edit ~/.config/opencode/opencode.json:

{
  "provider": {
    "kiro": {
      "npm": "00bx-kiro-gateway",
      "name": "Kiro Gateway",
      "models": {
        "claude-sonnet-4": {
          "name": "Claude Sonnet 4",
          "limit": { "context": 200000, "output": 8192 }
        },
        "claude-sonnet-4-5": {
          "name": "Claude Sonnet 4.5",
          "limit": { "context": 200000, "output": 8192 }
        },
        "claude-haiku-4-5": {
          "name": "Claude Haiku 4.5",
          "limit": { "context": 200000, "output": 8192 }
        },
        "claude-opus-4-5": {
          "name": "Claude Opus 4.5",
          "limit": { "context": 200000, "output": 8192 }
        }
      }
    }
  }
}

If you already have other providers configured, add the "kiro" block inside your existing "provider" object.

4. Run

# Interactive
opencode -m kiro/claude-sonnet-4

# Single command
opencode run -m kiro/claude-sonnet-4 "explain this codebase"

Multiple accounts

If you have more than one AWS Builder ID, you can switch between them in Kiro IDE at any time. The gateway detects the account change automatically on the next request — it re-reads Kiro's local database before every API call. When it sees a different refresh token, it drops the old session and starts using the new account's credentials.

This means you can rotate between accounts to use each account's free-tier credits without restarting OpenCode.

Troubleshooting

| Problem | Fix | |---|---| | Kiro refresh token not found | Open Kiro IDE and sign in. | | Empty or no response | You may have hit a rate limit. Try claude-haiku-4-5 — it has the highest limits. | | Token/auth errors | Reopen Kiro IDE to refresh your session. | | Opus 4.5 not responding | Kiro has it disabled for now due to capacity. Use Sonnet 4 or 4.5 instead. | | OpenCode doesn't show Kiro models | Check your opencode.json for valid JSON (no trailing commas). |

Technical details

  1. Reads Kiro CLI's refresh token from its local SQLite database (bun:sqlitebetter-sqlite3sqlite3 CLI fallback)
  2. Exchanges it for a short-lived access token via Kiro's auth endpoint
  3. Sends prompts to the AWS CodeWhisperer streaming API
  4. Parses the AWS binary event stream protocol into AI SDK V2 stream format
  5. Handles token refresh, 403 retry, 429/5xx backoff, idle stream timeouts, and tool-call accumulation

Zero runtime dependencies. Works with Bun and Node.js.

License

MIT — 00bx