◉ Pulse
libing93920 avatar
#19 today

libing93920/CodexStatus

TypeScript AI

这是一个可以监测Codex、ChatGPT状态的windows端桌面小工具,可以查看重置时间、剩余额度、重置卡过期倒计时以及使用Codex比较关注的额度重置预测,性价比模型推荐等功能。

Created Jul 28, 2026
Stars
8
Today
+8
Forks
0
Quality
80/100
Momentum
17

README

Fetched from GitHub on Oct 30, 2026, 10:15 PM UTC · README.md

View original on GitHub

Third-party content — Open Source Pulse is not the owner of this repository.

This README belongs to libing93920/CodexStatus and its contributors. We fetch it directly from the project’s public GitHub repository and display it for reference only. All text, code, images and trademarks remain the property of their respective authors. See the repository for its license terms. Copyright / takedown policy.

CodexStatus · 桌面额度监控

English | 中文


CodexStatus

Codex 额度桌面悬浮监控,实时掌握剩余配额。

Release Downloads License

下载最新版 · 使用说明 · 问题反馈

效果预览

详情面板 水平胶囊 迷你球
panel capsule orb
API Key 竖版胶囊 API Key 横板胶囊 用量统计卡片
api-orb api-capsule usage-card

为什么需要这个工具?

在日常使用 Codex 的过程中,经常会遇到以下痛点:

  • 打开 Codex → 用户名 → 剩余用量,至少 3 次点击才能查看额度信息,给频繁查看带来不便
  • 不知道 5 小时和 7 天的额度分别剩多少,什么时候重置
  • 很多模型可选,但不知道哪个性价比最高
  • 团队成员之间看不到彼此的剩余额度,无法协调使用

CodexStatus 可以帮你:

  • 桌面胶囊常驻显示额度,一眼可见,无需切换窗口
  • 同时监控 5h 和 7d 两个窗口,各有独立的百分比、进度条和重置倒计时
  • AI 雷达入口:详情面板一键跳转 codex-reset-radar 查看模型排行榜
  • 局域网团队排行:同事相互可见剩余额度,方便协调

核心功能

  • 双窗口额度卡片:5h 和 7d 分别展示百分比、进度条、重置倒计时和到期时间
  • 胶囊常驻悬浮:水平胶囊 / 迷你球两种形态,可吸附屏幕边缘,支持拖拽
  • 团队排行榜:局域网内同事互见,按剩余额度降序排名,展示 5h + 7d 双行数据
  • Token 消耗排行榜:团队页可切换 Token 消耗榜,按 1/7/30 天窗口统计同事消耗
  • 用量统计:详情面板 1/7/30 天 token 用量(输入/输出/缓存/花费)与每日柱状图
  • API Key 登录:支持 Codex API Key 模式,胶囊与详情展示今日 token 与缓存命中率;auth.json 不存在时也按 API 模式统计本地用量,无 Key 时只展示估算费用
  • AI 雷达入口:详情面板一键跳转 codex-reset-radar 查看模型排行榜
  • 在线自动更新:启动自动检查 + 定时检查,胶囊右上角红点提醒,一键下载静默安装
  • 双口径切换:剩余百分比 / 已使用百分比,满足不同习惯
  • 官方接口优先:读取 ChatGPT 官方额度,不可用时自动回退到本地 sessions

下载

前往 Releases 下载最新版本。

平台 文件
Windows CodexStatus-{version}-setup.exe

macOS / Linux 暂未提供预编译包,可从源码构建。

快速开始

  1. 下载 CodexStatus-*-setup.exe 并安装
  2. 启动后胶囊窗口自动出现在桌面右上角
  3. 需要读取官方额度时,确保 ~/.codex/auth.json 存在且含有效 access_token
  4. 点击胶囊打开详情面板,查看完整额度
  5. 在设置页配置刷新间隔、百分比口径等偏好

使用说明

胶囊窗口

  • 左列:5h 重置倒计时(无 5h 时显示 7d)
  • 中间:当前额度百分比 + 进度条(颜色从绿色渐变到红色)
  • 右列:重置卡到期倒计时 + 当前额度窗口标签

API Key 模式:胶囊显示今日 token 用量与缓存命中率,支持竖版 / 横板两种布局。

右键胶囊或托盘图标可唤出菜单:刷新 / 显示隐藏 / 详情 / 团队 / 设置 / 退出。

详情面板

  • 详情:5h + 7d 双卡片,1/7/30 天用量统计,重置卡信息,AI 雷达入口,额度重置监测入口
  • 团队:加入相同口令的同事排行榜,额度 / Token 消耗两种模式
  • 设置:刷新模式 / 间隔 / 百分比口径 / 开机自启 / 语言 / 团队口令 / 检查更新

团队功能

  1. 设置相同的团队口令
  2. 同一局域网内自动发现成员
  3. 排行榜显示每位成员的 5h 和 1周剩余额度,可切换为 Token 消耗榜(1/7/30 天)

注意:全局代理 / TUN 模式会劫持内网多播,导致互不可见。

会话清理(Windows)

设置 → 工具 → 会话清理,打开独立的 AgentSpace 窗口。自动发现或手动登记 Agent 数据目录,扫描后可组合筛选、查看正文、导出、续聊或批量删除。

  • 独立扫描进程按需启动,关闭工具后停止;来源不受当前监控 Agent 选择限制。
  • 会话检索按 cc-switch v4.0.21 的 12 类来源规则接入:Codex、Claude Code、OpenCode、OpenClaw、Gemini CLI、Hermes、Grok Build、Pi、Oh My Pi、MCode、Kimi Code、Antigravity。Cline、Aider 保留为扩展来源;未知目录只读展示文件占用。
  • 会话与资源分别计数。Codex 读取索引和状态数据库标题并识别压缩会话;OpenCode 合并旧 JSON、V1/V2 数据库,不再因数据库超过 256 MB 而漏掉会话。
  • 独立窗口使用 AgentSpace 图标、一体化标题栏和主题滚动条;容量统一显示 T、G、MB、B,按 1024 换算。
  • 扫描、正文和来源删除能力复用固定版本的 cc-switch Rust 核心。支持删除 Codex、Claude、OpenCode、OpenClaw、Gemini、Hermes、Grok Build、Pi、Oh My Pi;Kimi、MCode、Antigravity 按上游能力保持只读并显示原因。
  • 筛选可组合 Agent、来源目录、项目、模型、日期、闲置天数、消息数、父子会话、存储方式、能力、保护与状态,并支持排序和跨页选择。90 天只是清理建议,近期会话也可明确选择删除。
  • 删除先生成固定清单和资源预览,再明确确认,确认后永久删除,不进入系统回收站。可先导出 Markdown 供阅读;导出文件不能恢复原工具的数据库与索引。
  • 大小区分会话独占文件、SQLite 逻辑载荷、共享资源、数据库/WAL 与库内空闲页。Agent 汇总按唯一物理资源去重;数据库删除记录后通常不会立即缩小文件,可单独确认整理 OpenCode 数据库。
  • 删除前持久化宿主已统计的结构化用量摘要,保留 Token/费用历史;不保存聊天正文。保护标记、策略和操作记录与主设置分别保存。
  • 执行前重新核验来源、内容版本、保护和宿主活跃状态。取消批次会停止后续条目,已经完成的永久删除无法撤销。

开发验证:npm run test:session-manager;Electron/utilityProcess/原生数据库联动:npm run test:session-manager-integration。测试只操作临时样本。开发和构建需要 Rust/Cargo;npm run build 会编译并打包本地会话核心。

设计、大小口径、能力边界和验证命令见 会话管理说明。

界面沿用 AgentSpace 原型的三组样式,CSS 只作用于独立清理窗口。视觉对照:npm run test:session-cleaner-visual,需要本机 http://127.0.0.1:4173/AgentSpace-prototype.html 可访问;测试使用只读样本,在 .planning/session-cleaner/visual-comparison 输出两种尺寸、六个页面的对照截图与测量结果。

数据来源

数据 来源 备注
官方额度 chatgpt.com API 需要有效 OAuth 凭据
重置卡 chatgpt.com API
用量统计 本地 sessions JSONL 估算 token 与花费
AI 雷达 codex-reset-radar.pages.dev 公开数据,详情面板外链入口
团队数据 局域网 mDNS + WebSocket 内网直连

官方接口不可用时自动回退到本地 sessions JSONL 文件。

技术栈

  • Electron 39 + electron-vite
  • React 19 + TypeScript 5
  • electron-updater(在线更新)
  • bonjour-service(mDNS 局域网发现)
  • ws(WebSocket peer 通信)

本地开发

npm install            # 安装依赖
npm run dev            # 启动开发
npm run lint           # 代码检查
npm run typecheck      # 类型检查

构建

# Windows(国内镜像加速)
ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" \
ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/" \
npm run build:win

# 一键发布
python scripts/publish.py              # 升版本号 + 打包 + 发布
python scripts/publish.py --no-bump    # 用当前版本号打包发布
python scripts/publish.py --notes "说明"  # 自定义 Release 备注

License

MIT


如果这个工具对你有帮助,请点一个 ⭐ Star,帮助更多人发现它。


CodexStatus

Desktop Codex quota monitor. Always-on capsule showing your remaining usage at a glance.

Release Downloads License

Download · Getting Started · Issues

Preview

Panel Horizontal Capsule Orb
panel capsule orb
API Key Orb API Key Capsule Usage Stats Card
api-orb api-capsule usage-card

Why CodexStatus?

When using Codex daily, you often face:

  • Need to click through Codex → username → usage — at least 3 clicks just to see your quota
  • Can't see 5h vs. 7d quota separately, or when each resets
  • Too many model options, not sure which gives the best value
  • Can't see team members' quota usage to coordinate

CodexStatus helps you:

  • Desktop capsule always on top — quota visible at a glance
  • Dual-window display (5h + 7d), each with percentage, progress bar, and reset countdown
  • AI Radar entry: jump to codex-reset-radar from the details panel
  • LAN team leaderboard: see teammates' usage side by side

Key Features

  • Dual-window quota cards: 5h and 7d each with percentage, progress bar, countdown, and expiry time
  • Always-on capsule: Horizontal capsule or orb mode, snap-to-edge, draggable
  • Team leaderboard: LAN peer discovery, ranked by remaining quota, dual-row 5h + 7d display
  • Token leaderboard: switch the team board to token consumption, ranked by 1d / 7d / 30d windows
  • Usage stats: 1/7/30-day token usage (input / output / cache / cost) with a daily bar chart
  • API Key login: supports Codex API Key mode; capsule & panel show today's tokens and cache-hit rate. A missing auth.json also uses API mode for local usage, with estimated costs when no key is available
  • AI Radar entry: one-click jump to codex-reset-radar from the details panel
  • Auto-update: Startup check + periodic check, red dot badge on capsule, silent install & auto-restart
  • Dual metric mode: Remaining % or Used %, switch anytime
  • Official API priority: Fetches from ChatGPT official API, falls back to local sessions

Download

Go to Releases for the latest version.

Platform File
Windows CodexStatus-{version}-setup.exe

macOS / Linux builds not yet provided. Build from source.

Getting Started

  1. Download and install CodexStatus-*-setup.exe
  2. The capsule appears at the top-right of your desktop on launch
  3. For official quota, make sure ~/.codex/auth.json contains a valid access_token
  4. Click the capsule to open the panel for full details
  5. Configure refresh interval, metric mode, etc. in Settings

Data Sources

Data Source Notes
Official quota chatgpt.com API Requires valid OAuth credentials
Reset credits chatgpt.com API
Usage stats Local sessions JSONL Estimated tokens & cost
AI Radar codex-reset-radar.pages.dev Public data, external link entry
Team data LAN mDNS + WebSocket Local network only

Tech Stack

  • Electron 39 + electron-vite
  • React 19 + TypeScript 5
  • electron-updater
  • bonjour-service (mDNS)
  • ws (WebSocket)

Development

npm install
npm run dev
npm run lint
npm run typecheck

Build

# Windows (with China mirror)
ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" \
ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/" \
npm run build:win

# One-click publish
python scripts/publish.py              # bump + build + publish
python scripts/publish.py --no-bump    # build + publish only
python scripts/publish.py --notes "..."  # with custom release notes

License

MIT


If you find this tool useful, please give it a ⭐ Star. It helps more people discover it.

Rendered by GitHub from the repository’s README. Scroll to read the full file.
First trending

Jul 28, 2026

first spotted on the list

Best rank

#19

highest position reached

Appearances

1

times on the trending list

Quality score

80

out of 100

Momentum

17

trend strength indicator

Star velocity

0.09

stars per day since creation

Activity — last 60 days

daily counts, collected every 6 hours
  • Stars
  • Forks
  • Merged PRs
  • Issues
  • Closed issues

Collecting activity data since launch — check back in a few days.

Star history

total stars per snapshot

Not enough snapshots yet — check back soon.

Rank history

position on trending · lower is better

Not enough snapshots yet — check back soon.

3D card for your website

Live HTML card with a glass surface and pointer tilt. Paste the iframe on any website.

<iframe src="https://www.notionpulse.cc/embed/libing93920/CodexStatus" width="420" height="240" style="border:0;max-width:100%;background:transparent" loading="lazy" title="libing93920/CodexStatus — trending on Open Source Pulse"></iframe>

Stars badge

Show current stars in your README or profile. Auto-updates every 6 hours.

libing93920/CodexStatus stars badge
Markdown
[![libing93920/CodexStatus](https://www.notionpulse.cc/api/badge/libing93920/CodexStatus.svg)](https://www.notionpulse.cc/repo/libing93920/CodexStatus)
HTML
<a href="https://www.notionpulse.cc/repo/libing93920/CodexStatus"><img src="https://www.notionpulse.cc/api/badge/libing93920/CodexStatus.svg" alt="libing93920/CodexStatus stars badge" /></a>

Repository of the Day

#19 Repository of the Day

Repository of the Week

#19 Repository of the Week

Repository of the Month

#19 Repository of the Month