quota-reporter
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQuota Reporter
配额报告器
This skill installs and runs local reporters for Codex and Claude CLI usage.
本技能用于安装并运行Codex和Claude CLI使用情况的本地报告器。
What it does
功能介绍
- Reads the local when Codex is present
~/.codex/auth.json - Probes the current Codex and
5Hquota windows1week - Reads local Claude CLI auth and usage metadata when Claude is present
- Posts signed reports to the shared dashboard service
- Installs a reboot-safe scheduler that reports every hour
- 当存在Codex时,读取本地文件
~/.codex/auth.json - 探测当前Codex的和
5H配额窗口1week - 当存在Claude时,读取本地Claude CLI的认证信息和使用元数据
- 将签名后的报告发送至共享仪表盘服务
- 安装支持重启后自动运行的调度器,每小时生成一次报告
Files
文件列表
- Combined reporter:
scripts/report_all_usage.py - Codex reporter:
scripts/report_codex_quota.py - Claude reporter:
scripts/report_claude_usage.py - Installer:
scripts/install_hourly_reporter.py
- 综合报告器:
scripts/report_all_usage.py - Codex报告器:
scripts/report_codex_quota.py - Claude报告器:
scripts/report_claude_usage.py - 安装脚本:
scripts/install_hourly_reporter.py
Required inputs
所需输入
You need:
- the shared dashboard URL, for example
https://quota-report-hub.vercel.app - the ingest token for
POST /api/report
你需要:
- 共享仪表盘URL,例如
https://quota-report-hub.vercel.app - 接口的接入令牌(ingest token)
POST /api/report
Standard flow
标准流程
One-off report
一次性报告
Run:
bash
python3 scripts/report_all_usage.py \
--server-url https://your-dashboard.vercel.app \
--ingest-token YOUR_TOKENIf you only want one source:
bash
python3 scripts/report_codex_quota.py --server-url https://your-dashboard.vercel.app --ingest-token YOUR_TOKEN
python3 scripts/report_claude_usage.py --server-url https://your-dashboard.vercel.app --ingest-token YOUR_TOKEN运行以下命令:
bash
python3 scripts/report_all_usage.py \
--server-url https://your-dashboard.vercel.app \
--ingest-token YOUR_TOKEN如果仅需单一来源的报告:
bash
python3 scripts/report_codex_quota.py --server-url https://your-dashboard.vercel.app --ingest-token YOUR_TOKEN
python3 scripts/report_claude_usage.py --server-url https://your-dashboard.vercel.app --ingest-token YOUR_TOKENInstall hourly reporting
安装每小时报告功能
Run:
bash
python3 scripts/install_hourly_reporter.py \
--server-url https://your-dashboard.vercel.app \
--ingest-token YOUR_TOKENThe installer writes a local config file under and installs the local scheduler.
On macOS it installs a agent with .
On Linux it installs entries for both and hourly reporting, so the reporter comes back automatically after a restart.
~/.agents/auth/launchdRunAtLoadcrontab@reboot运行以下命令:
bash
python3 scripts/install_hourly_reporter.py \
--server-url https://your-dashboard.vercel.app \
--ingest-token YOUR_TOKEN安装脚本会在目录下生成本地配置文件,并安装本地调度器。
在macOS系统中,它会安装一个带有参数的代理。
在Linux系统中,它会为和每小时报告添加条目,确保重启后报告器能自动恢复运行。
~/.agents/auth/RunAtLoadlaunchd@rebootcrontabOutput expectations
输出预期
- After a one-off report, show the returned status and the dashboard URL.
- After installation, show the scheduler type and the config path.
- If the report fails, include the HTTP status and response body.
- 生成一次性报告后,显示返回状态和仪表盘URL。
- 完成安装后,显示调度器类型和配置文件路径。
- 如果报告失败,需包含HTTP状态码和响应体内容。