命运石之门辉光管风格的 Codex 额度悬浮监控工具。
A lightweight Codex quota widget styled as a Steins;Gate-inspired Nixie-tube instrument panel.
实时查看 Codex 剩余额度、官方重置时间、本地 Token 使用速率与 API 等价价值,并在任务完成或手动目标时间临近时给出简洁提示。应用为单文件 Windows 桌面程序,不上传遥测,也不展示任务内容。
Monitor remaining Codex quota, the official reset time, locally estimated token throughput, and API-equivalent token value. The widget also provides discreet completion and target-time reminders without displaying task content. It is a portable, single-file Windows application with no telemetry.
下载最新版本 / Download the latest release
- 实时额度:通过本机 Codex
app-server读取官方限额和重置时间,并每 30 秒兜底刷新。 - 手动目标:设置你预计的下一次余额刷新时间,与官方重置时间分别显示。
- 余额提醒:默认在目标时间前 60 分钟和 15 分钟提醒;只在剩余额度达到设定阈值时触发。
- Token 速率:解析本地主任务追加的
token_count事件,以线性辉光管进度条显示估算 Token/min。 - 赚钱量 / API 等价价值:
MTH显示本月已扫描 Token 的 API 等价价值减月订阅费;RUN实时累计本次小工具运行期间观察到的 API 等价价值。 - 可配置价格:分别设置非缓存输入、缓存读取、缓存写入、输出的每百万 Token 单价,以及月订阅费;金额统一使用 USD。
- 任务完成提示:检测到本地主任务完成后,短暂闪烁仪表边框并显示托盘通知,不展示任务内容。
- 辉光管界面:三只烟色数字管、独立
%单位、暗阴极栈和连续线性气体放电管。 - 悬浮与托盘:支持窗口置顶、拖动、隐藏到系统托盘和可选的开机启动。
- 从 Releases 下载 ZIP。
- 解压并运行
CodexDivergenceMeter.exe。 - 拖动顶部区域移动窗口;点击右上角齿轮展开设置。
- 输入目标日期与时间后点击
SET;点击CLR清除目标。 - 在
API VALUE区按实际模型和订阅修改价格,点击该区的SET保存。 - 关闭按钮会将程序隐藏到托盘;从托盘菜单可以重新显示或退出。
MTH 在程序启动、跨月和手动点击 ↻ 时扫描一次活动及已归档的本地 rollout;RUN 随本地 token_count 事件更新。默认 API 价格按 GPT-5.6 Sol 设置为输入 $4、缓存输入 $0.40、缓存写入 $5、输出 $20 / 1M Token;默认订阅费是可修改的 $20 占位值。请根据实际模型、套餐和币种账单调整。价格依据见 OpenAI GPT-5.6 Sol 官方模型页。
这是本地编译的未签名个人程序,Windows 首次运行时可能显示 SmartScreen 提示。
设置保存在:
%LOCALAPPDATA%\CodexDivergenceMeter\settings.json
- Token/min 与完成提示只监控本机 Codex Desktop、CLI 和 IDE 产生的顶层任务;价值统计会计入顶层任务及子代理的
token_count,避免漏算委派消耗。 - 会话日志只解析
session_meta、token_count和task_complete的必要元数据;月度扫描会在识别到无关记录后立即丢弃缓冲。 - 解析器在
last_agent_message字段之前停止缓存,不保留或显示提示词、回复正文与任务内容。 - 不上传遥测,不读取或显示认证令牌。
无需安装 NuGet 包。构建脚本使用 Windows 自带的 .NET Framework 4.8 C# 编译器:
powershell -NoProfile -ExecutionPolicy Bypass -File .\build.ps1 -Clean -Test真实额度连接测试:
.\dist\CodexDivergenceMeter.Tests.exe --live本地月度统计性能检查:
.\dist\CodexDivergenceMeter.Tests.exe --monthly-live视觉演示模式:
.\dist\CodexDivergenceMeter.exe --demo
.\dist\CodexDivergenceMeter.exe --demo --settings
.\dist\CodexDivergenceMeter.exe --demo --reminder- Live quota — reads official Codex rate limits and reset times from the local Codex
app-server, with a 30-second fallback refresh. - Manual target — stores an expected balance-refresh time separately from the official reset time.
- Balance reminders — alerts at T-60 and T-15 by default, only while remaining quota is above the configured threshold.
- Token throughput — estimates tokens per minute from locally appended
token_countevents and renders the value as a continuous linear glow tube. - Value meter —
MTHshows the scanned local-month API-equivalent value minus the monthly subscription;RUNupdates with API-equivalent value observed since the widget started. - Editable pricing — separately configures uncached input, cached input, cache writes, output per million tokens, and the monthly subscription in USD.
- Completion hint — briefly flashes the instrument panel and shows a tray notification when a top-level local task finishes; task content is never shown.
- Nixie interface — three smoked digit tubes, an external percent marker, layered dark cathodes, and a warm orange gas-discharge rate bar.
- Desktop widget behavior — draggable, always-on-top capable, tray-aware, and optionally launched at Windows sign-in.
- Download the ZIP from Releases.
- Extract it and run
CodexDivergenceMeter.exe. - Drag the header to reposition the widget and use the gear button for settings.
- Set an expected refresh date and time with
SET, or remove it withCLR. - Adjust the
API VALUErates and subscription for your actual model and plan, then use that section'sSETbutton. - The close button hides the widget to the tray; use the tray menu to show or exit it.
MTH scans active and archived local rollouts at startup, on a month boundary, or when ↻ is clicked; RUN follows newly appended local token_count events. Defaults follow GPT-5.6 Sol at $4 input, $0.40 cached input, $5 cache writes, and $20 output per 1M tokens. The $20 subscription is an editable placeholder. Adjust these values for the actual model, plan, and billed currency. See the official OpenAI GPT-5.6 Sol model page.
The executable is locally built and unsigned, so Windows SmartScreen may appear on first launch.
Settings are stored at:
%LOCALAPPDATA%\CodexDivergenceMeter\settings.json
- Throughput and completion hints watch top-level tasks only. Value accounting includes
token_countmetadata from both top-level and sub-agent rollouts so delegated usage is not omitted. - Parses only the required
session_meta,token_count, andtask_completemetadata. The monthly scanner drops irrelevant records immediately after prefix classification. - Stops buffering before
last_agent_message; prompts, responses, and task content are not retained or displayed. - Sends no telemetry and does not read or display authentication tokens.
No NuGet restore is required. The build uses the .NET Framework 4.8 compiler included with Windows:
powershell -NoProfile -ExecutionPolicy Bypass -File .\build.ps1 -Clean -TestOptional live quota probe:
.\dist\CodexDivergenceMeter.Tests.exe --liveOptional local monthly-scan performance probe:
.\dist\CodexDivergenceMeter.Tests.exe --monthly-liveDemo modes:
.\dist\CodexDivergenceMeter.exe --demo
.\dist\CodexDivergenceMeter.exe --demo --settings
.\dist\CodexDivergenceMeter.exe --demo --reminder-
Codex
app-serveris currently an experimental interface. Protocol changes may require parser updates.Codex
app-server目前属于实验接口,协议变更可能需要同步更新解析器。 -
Token/min is a rolling local estimate, not an exact billing meter.
Token/min 是本地滚动估值,不是精确的计费计量值。
-
Money values are API-equivalent estimates from locally retained rollout logs, not income, refunds, or an OpenAI bill. Mixed-model history and long-context price multipliers are not detected automatically; configure a representative rate profile.
金额只是本机保留日志对应的 API 等价估值,不是实际收入、退款或 OpenAI 账单;混合模型历史和长上下文倍率不会自动识别,请设置有代表性的价格档。
-
Completion events that occurred before the widget started are not replayed.
程序启动前已经完成的任务不会补播提示。
The visual style is a fan-made tribute inspired by the laboratory instrumentation and Nixie-tube aesthetic associated with Steins;Gate. This project is not affiliated with or endorsed by the rights holders. No character artwork or copyrighted media assets are included.
界面是对《命运石之门》实验室仪表与辉光管美学的非官方致敬。本项目与相关权利方无关联,也未获得其背书;仓库和程序均不包含角色立绘或受版权保护的媒体素材。
Code is released under the MIT License.