Skip to content
View Chunai-Bboy's full-sized avatar

Block or report Chunai-Bboy

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Chunai-Bboy/README.md

Hi, I'm Chunai 👋

AI 自动化 / 安全研究 / 本地工具链 AI automation · security research · local tooling

做的东西大多围绕一件事:让本机的 AI 工具链更省心 —— 把散落的数据、配置、模型调用统一起来, 顺手把过程中的坑记下来。


🧩 自有项目

项目 说明 技术
cc-switch-hermes-usage 把 Hermes Agent 的 token 用量同步进 CC Switch 的「使用统计」页。读 Hermes 本地累计计数器,转成增量写进 CC Switch 统计库,token 总量准确。附带 opencode skill 与 4 个用例的单测 Python(仅标准库)· SQLite

🍴 Fork 的项目

这些都是别人做的,我 fork 下来做本地部署 / 二次修改。版权归原作者,成果不归我, 所以不列在上面的项目表里。

项目 原作者做什么
qoder2api 把 Qoder 转成 OpenAI/Claude/Codex 兼容 API
workbuddy2api 把 CodeBuddy / WorkBuddy 变成 OpenAI 兼容 API
autoclaw2api AutoClaw 移动端 → OpenAI 兼容 API(Python)
dunhuang-aura-skill 敦煌风格 skill
freesub 订阅管理

我对 fork 仓库的改动主要是本地部署、账号/代理适配和跨平台问题修复。 值得合并的改动我会提 PR 回上游 —— 详见下面的「参与开源」。

🌐 其他

🤝 参与开源

关注 CC Switch(13.8k star 的 AI 编程工具切换器):

  • 它是「统计多个 AI 工具的 token 用量」这类需求的最佳载体,本项目的 skill 就是给它用的
  • 官方暂未支持 Hermes Agent;我的 cc-switch-hermes-usage 是 用户侧的解法,不侵入它的代码
  • 官方已有 PR #6120 在做这件事, 我的实现读的是 session_model_usage(按 (会话, 模型, 任务) 分行), 正好绕开了维护者当年放弃该功能时提到的「模型字段锁定为初始模型」问题。 两套方案并存,若官方合入,本项目降级为「仅验证」

🗂 本地目录约定

所有自写项目放在 D:\GitHub\<项目名>\,一条仓库一个文件夹,每个都自带 README.md + LICENSE + .gitignore。第三方项目和大型构建目录留在 D:\security-research\projects\(不入库)。

📫 交流

欢迎提 issue 或 PR,尤其是:

  • 同步脚本的边界情况:计数器重置、会话过期清理、跨版本 schema 变更
  • 准确性验证:如果你发现 token 统计对不上,请附上你的 state.db 计数对比

English

Building things around one theme: making a local AI toolchain less painful — unifying scattered data, config and model calls, and writing down the pitfalls along the way.

Own projects

  • cc-switch-hermes-usage — Syncs Hermes Agent token usage into the CC Switch usage dashboard. Reads Hermes' local cumulative counters, converts them to deltas, and writes into CC Switch's stats database so token totals are accurate. Ships as an opencode skill with 4 unit tests. Python (stdlib only) · SQLite

Forks (not my work)

qoder2api · workbuddy2api · autoclaw2api · dunhuang-aura-skill · freesub

These belong to their original authors. My changes are local deployment, account and proxy adaptation, and cross-platform fixes. Changes worth upstreaming go out as PRs.

Open source

Following CC Switch (a 13.8k-star provider switcher for AI coding tools) — the best host for "track token usage across AI tools". It has no official Hermes Agent support yet, so my cc-switch-hermes-usage is a user-side solution that doesn't touch its code. Upstream PR #6120 is doing the same thing natively; my implementation reads session_model_usage (keyed per session × model × task), which sidesteps the "model field locked to the initial model" problem that made the maintainer drop this feature once. Both can coexist.

Local layout

Self-written projects live in D:\GitHub\<project>\ — one folder per repo, each with README.md + LICENSE + .gitignore. Third-party projects and large build directories stay in D:\security-research\projects\ (not version-controlled).

Contributing

Issues and PRs welcome, especially around: counter resets, expired-session cleanup, cross-version schema changes, and accuracy reports — if your token totals don't match, please attach a comparison against your state.db counters.

MIT licensed unless stated otherwise.

Popular repositories Loading

  1. chunai-bboy.github.io chunai-bboy.github.io Public

    JavaScript

  2. freesub freesub Public

    Forked from hezhanleiok/freesub

    Python

  3. dunhuang-aura-skill dunhuang-aura-skill Public

    Forked from govin-ai/dunhuang-aura-skill

    Python

  4. autoclaw2api autoclaw2api Public

    Forked from Zhengyuuuui/autoclaw2api

    AutoClaw 云端沙箱 → OpenAI 兼容 API 网关(Python)|国内+国际双通道 · 多账号池 · Web Console · 每日签到

    Python

  5. qoder2api qoder2api Public

    Forked from Zhengyuuuui/qoder2api

    将 Qoder 的 AI 服务转化为兼容 OpenAI/Claude/Codex 格式的 API,支持每日签到领 Credits、多账号管理、模型上下文展示

    Go

  6. workbuddy2api workbuddy2api Public

    Forked from Zhengyuuuui/workbuddy2api

    轻量 CodeBuddy / WorkBuddy 反代网关 — 官方 IDE 指纹模拟、429 熔断与限速防护、双平台 40 模型,OpenAI / Anthropic / Responses 三协议,支持 Codex / Claude Code / DSH。

    Python