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

@aristra/kiro2cli

v1.2.2

Published

Kiro API proxy with SSO auto-refresh — one command to run

Readme

Kiro2cli

把 Kiro 变成标准 Anthropic/OpenAI API 的本地代理。支持 SSO 自动刷新、Profile ARN 自动获取、模型列表、额度查询和自定义模型转发。

快速开始

# 零安装运行
npx @aristra/kiro2cli

# 或全局安装
npm i -g @aristra/kiro2cli
kiro2cli

前置条件:

  • 已安装 Kiro IDE 并登录
  • SSO 缓存位于 ~/.aws/sso/cache/(Kiro 登录后自动创建)

首次使用运行 kiro2cli setup,会自动获取 Profile ARN 并启动服务。

功能

  • SSO 自动刷新:token 过期自动续期,不用手动操作
  • Anthropic APIPOST /v1/messages(兼容 Claude Code、Cline 等)
  • OpenAI APIPOST /v1/chat/completions(兼容 ChatGPT 生态工具)
  • 自定义模型:通过配置文件添加 OpenAI/Anthropic 兼容模型
  • 守护进程--daemon 后台运行
  • CLI 工具:查看模型、额度、token 状态

使用

启动服务

# 后台运行(默认)
kiro2cli start

# 前台运行
kiro2cli start --foreground

# 指定端口
kiro2cli start --port 8080

# 停止/重启
kiro2cli stop
kiro2cli restart

查看状态

kiro2cli status       # 运行状态、URL、Key、认证信息
kiro2cli key          # 查看 API Key
kiro2cli key rotate   # 生成新的 API Key
kiro2cli models       # 可用模型列表 + effort 支持
kiro2cli quota        # 用量/限额
kiro2cli token status # Token 详细状态
kiro2cli token refresh # 手动刷新 token

配置

kiro2cli config show                    # 查看当前配置
kiro2cli config set port 8080           # 设置端口
kiro2cli config set defaultModel claude-opus-5  # 设置默认模型

配置文件位置:

  • 全局:~/.kiro2cli/config.json
  • 项目:./kiro2cli.config.json(覆盖全局)

自定义模型

在配置文件中添加:

{
  "models": {
    "deepseek-v3": {
      "provider": "openai",
      "upstreamModel": "deepseek-chat",
      "baseUrl": "https://api.deepseek.com/v1",
      "apiKey": "sk-xxx"
    }
  }
}

然后直接用:

curl -H "x-api-key: $(kiro2cli key)" \
  -d '{"model":"deepseek-v3","messages":[{"role":"user","content":"hi"}]}' \
  http://localhost:5050/v1/messages

API

Anthropic 格式

curl -H "x-api-key: $(kiro2cli key)" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-5","messages":[{"role":"user","content":"hello"}]}' \
  http://localhost:5050/v1/messages

OpenAI 格式

curl -H "x-api-key: $(kiro2cli key)" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-5","messages":[{"role":"user","content":"hello"}]}' \
  http://localhost:5050/v1/chat/completions

模型列表

curl http://localhost:5050/v1/models

环境变量

| 变量 | 说明 | |------|------| | KIRO_ACCESS_TOKEN | 直接指定 token(优先级最高)| | KIRO_PROFILE_ARN | Profile ARN | | KIRO_MODEL_OVERRIDE | 强制使用指定模型 |

卸载

kiro2cli uninstall   # 停止进程、清理配置
npm uninstall -g @aristra/kiro2cli

许可

MIT