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

@erwisnu/opencode-kiro-auth

v0.1.3

Published

OpenCode plugin for Kiro authentication, multi-account rotation, and quota tracking.

Readme

@erwisnu/opencode-kiro-auth

Plugin OpenCode untuk Kiro AI yang menambahkan provider kiro, sinkronisasi akun dari Kiro CLI/AWS SSO, rotasi multi-akun, quota tracking, dan command operasional.

Model Yang Didukung

Plugin ini hanya mengekspos model free-tier Kiro:

  • claude-sonnet-4-5
  • claude-haiku-4-5

Install Di OpenCode

Install package dari npm:

npm install @erwisnu/opencode-kiro-auth

Lalu tambahkan plugin ke konfigurasi OpenCode Anda.

Contoh opencode.json:

{
  "plugin": ["@erwisnu/opencode-kiro-auth"]
}

Jika OpenCode Anda memakai file config lain, tambahkan package ini ke array plugin pada config yang aktif.

Konfigurasi Plugin

Plugin membaca config dari:

  • default: ~/.config/opencode/kiro.config.json
  • override via env: KIRO_AUTH_CONFIG_PATH

Contoh kiro.config.json:

{
  "auto_sync_kiro_cli": true,
  "auto_sync_aws_sso": true,
  "account_selection_strategy": "lowest-usage",
  "default_region": "us-east-1",
  "rate_limit_retry_delay_ms": 5000,
  "rate_limit_max_retries": 3,
  "usage_tracking_enabled": true,
  "low_quota_threshold_credits": 15,
  "sync_interval_ms": 60000
}

Opsi penting:

  • auto_sync_kiro_cli: scan cache/session lokal Kiro
  • auto_sync_aws_sso: scan ~/.aws/sso/cache
  • account_selection_strategy: lowest-usage, round-robin, atau sticky
  • default_region: default AWS region
  • rate_limit_retry_delay_ms: base delay untuk exponential backoff
  • rate_limit_max_retries: jumlah retry/failover
  • usage_tracking_enabled: aktifkan tracking usage dari event OpenCode

Cara Kerja Auth

Plugin memakai strategi reference-only:

  • database hanya menyimpan metadata akun, fingerprint token, expiry, dan pointer ke source credential
  • token mentah tidak disimpan di SQLite
  • source yang didukung:
    • AWS SSO cache
    • Kiro CLI JSON/cache DB bila tersedia
    • import manual via file JSON atau env var

Default transport Kiro mengikuti AWS CodeWhisperer endpoint yang dipakai Kiro:

  • POST https://codewhisperer.us-east-1.amazonaws.com/generateAssistantResponse
  • Accept: application/vnd.amazon.eventstream
  • X-Amz-Target: AmazonCodeWhispererStreamingService.GenerateAssistantResponse

Refresh token:

  • social auth: https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken
  • Builder ID / IDC: AWS SSO OIDC token endpoint

Commands Yang Tersedia

Plugin mendaftarkan command/tool berikut:

  • kiro:accounts
  • kiro:quota
  • kiro:sync
  • kiro:add
  • kiro:switch

Fungsi ringkasnya:

  • kiro:accounts: list akun, health, expiry, dan status routing
  • kiro:quota: tampilkan credits/quota dan usage estimasi
  • kiro:sync: paksa sinkronisasi dari Kiro CLI/AWS SSO
  • kiro:add: import akun manual
  • kiro:switch: override akun aktif

Development

Install dependency:

npm install

Validasi:

npm run check
npm test
npm run build

Preview isi paket npm:

npm pack --dry-run

Publish Ke npm

Package ini ditujukan untuk publish sebagai:

@erwisnu/opencode-kiro-auth

Publish manual:

npm publish --access public

Atau publish via GitHub Actions:

  1. set secret NPM_TOKEN
  2. push commit
  3. buat tag versi:
git tag v0.1.0
git push origin v0.1.0

Workflow publish akan:

  • install dependency
  • jalankan check, test, build
  • verifikasi tag cocok dengan package.json
  • jalankan npm publish --access public