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

kimi-quota-feeder

v1.2.0

Published

Kimi Coding Plan quota fetcher for claude-hud external usage

Downloads

736

Readme

Kimi Quota Feeder

claude-hud 提供 Kimi Coding Plan 额度数据的独立服务。

原理

claude-hud 支持通过 externalUsagePath 读取外部额度快照文件。本项目通过 MCP (Model Context Protocol) 与 Claude Code 集成,在 Claude Code 运行时自动抓取额度信息,写入快照文件,claude-hud 自动读取并显示在状态栏。

Claude Code --MCP--> kimi-quota-mcp --fetch--> snapshot.json --read--> claude-hud

关键特性:MCP server 随 Claude Code 启停,不用时自动关闭,不浪费资源。

安装

方式一:npm 全局安装(推荐)

npm install -g kimi-quota-feeder

# 配置 token
echo "你的kimi-auth-token" > ~/.kimi-quota/.token
chmod 600 ~/.kimi-quota/.token

# 自动配置 MCP
kimi-quota-setup

# 自动配置 HUD(可选)
kimi-quota-configure-hud

重启 Claude Code 即可生效。

方式二:npx(无需安装)

npx kimi-quota-feeder@latest

# 或手动添加 MCP 配置
claude mcp add --transport stdio kimi-quota -- npx -y kimi-quota-feeder@latest

方式三:源码运行

git clone https://github.com/LeepeiZ/kimi-quota-feeder.git
cd kimi-quota-feeder
npm install

# 配置 token
echo "你的kimi-auth-token" > ~/.kimi-quota/.token
chmod 600 ~/.kimi-quota/.token

# 配置 MCP(需要 claude 命令在 PATH 中)
node src/setup-mcp.js

# 配置 HUD(可选)
node src/configure-hud.js

配置

1. 获取 Kimi Token

  1. 浏览器登录 kimi.com/code/console
  2. F12 打开开发者工具 → Application → Cookies
  3. 找到 kimi-auth 字段,复制其值(一段很长的 JWT 字符串)

2. 手动配置 claude-hud

如果不想用 kimi-quota-configure-hud,可以手动编辑 ~/.claude/plugins/claude-hud/config.json

{
  "display": {
    "externalUsagePath": "/Users/你的用户名/.kimi-quota/snapshot.json",
    "externalUsageFreshnessMs": 300000,
    "showUsage": true
  }
}

重启 Claude Code,状态栏将显示 Kimi 额度。

使用

打开 Claude Code 后,MCP server 自动启动并开始刷新额度。关闭 Claude Code 后自动停止。

MCP Tools

在 Claude Code 对话中可以直接调用:

@kimi-quota refresh_kimi_quota   # 手动刷新额度
@kimi-quota get_kimi_quota       # 获取当前额度详情

项目结构

kimi-quota-feeder/
├── src/
│   ├── index.js              # 传统模式入口(向后兼容)
│   ├── mcp-server.js         # MCP server 入口
│   ├── setup-mcp.js          # MCP 配置工具(Node.js API,不依赖 shell)
│   ├── configure-hud.js      # HUD 自动配置工具
│   ├── fetcher.js            # Kimi API 抓取
│   ├── snapshot.js           # 快照文件生成
│   ├── config.js             # 配置读取
│   └── utils/
│       ├── env-check.js      # 环境检测(shell 劫持检测、命令存在性检查)
│       └── hud-config.js     # HUD 配置操作(纯 Node.js fs API)
├── config.example.json
├── package.json
└── README.md

License

MIT