Skip to content

Codex Usage

Codex Usage — Local-first Codex usage analytics · 逐电脑/模型/项目/会话 Token 用量明细与 API 等价成本,支持 Windows/Linux/Mac。

Install

$npx playwright install chromium
Claude Code
claude mcp add codex-usage -- npx playwright install chromium
Cursor / Claude Desktop (mcp.json)
{
  "mcpServers": {
    "codex-usage": {
      "command": "npx",
      "args": [
        "playwright",
        "install",
        "chromium"
      ]
    }
  }
}

Install command taken from the project's README or registry entry. Always review code before running it.

Codex Usageby zJay

让 Codex 用量一目了然。

完整、顺手的本地用量仪表盘,从每台电脑到每一次任务。

在线体验 · Windows x64 · Linux x64 · macOS Apple Silicon · 全部下载 · English / 简体中文

https://github.com/user-attachments/assets/b3e96d2b-8606-4e96-ad98-9f360ffbce44

概览 → 分钟级时间查询 → 小时下钻 → 每日月历 → 项目与任务树 → 搜索与 Fast 筛选 → JSON / CSV 导出 → 模型定价 → 明暗主题与中英切换。

亲手试用在线 Demo · 高清演示视频 · 宣传片(竖屏版)

演示使用完整定价、无异常记录的合成数据,直接录制当前 Dashboard。在线 Demo 不读取你的文件、不设 Cookie、无埋点或外部请求。

快速开始

只有两步:下载适合你电脑的程序,然后运行一次 install。

装好后它会自动整理你电脑上已有的 Codex 记录,并在后台持续统计。以后想看用量,用浏览器打开 http://127.0.0.1:43189 即可。不用装数据库,不用注册账号,数据也不会离开你的电脑。

第 1 步:选对版本,下载

不确定自己是哪种电脑,可以对照下表:

你的电脑 点击下载
Windows(绝大多数电脑) Windows x64
Windows ARM 设备(少数机型;可在“设置 → 系统 → 关于”看到“ARM 处理器”) Windows ARM64
Mac,M 系列芯片(M1 / M2 / M3 / M4 等) macOS Apple Silicon
Mac,Intel 芯片(左上角苹果菜单 → 关于本机,写着“Intel”) macOS Intel
Linux / WSL(绝大多数电脑) Linux x64
Linux / WSL ARM 设备 Linux ARM64

第 2 步:运行 install

已经用浏览器下载好了? 打开终端(Windows 用 PowerShell),进入文件所在的文件夹,运行 <程序文件名> install 就行。例如 Windows:.\codex-usage-windows-amd64.exe install;Mac / Linux 需先执行 chmod +x <程序文件名> 赋予运行权限,再执行 ./<程序文件名> install。

想省事? 直接复制下面对应系统的命令,粘贴到终端回车,下载和安装一次完成:

Windows:开始菜单搜索“PowerShell”并打开,粘贴运行,无需管理员权限。ARM64 设备把地址里的 amd64 改成 arm64:

Invoke-WebRequest https://github.com/zJay26/codex-usage/releases/latest/download/codex-usage-windows-amd64.exe -OutFile codex-usage.exe
.\codex-usage.exe install

macOS:打开“终端”(启动台里搜索),粘贴运行,无需 sudo。以下是 Apple Silicon 版;Intel 设备把地址里的 arm64 改成 amd64:

curl -fL https://github.com/zJay26/codex-usage/releases/latest/download/codex-usage-darwin-arm64 -o codex-usage
chmod +x codex-usage
./codex-usage install

请在 Mac 的图形登录界面下操作,安装后会随登录自动启动。程序未经 Apple Developer ID 签名或公证,首次运行可能被系统拦截;打开方式和校验见 macOS 安装说明。只能通过 SSH 连接时,可用 ./codex-usage serve 前台运行。

Linux / WSL:打开终端,粘贴运行。以下是 x64 版;ARM64 设备把地址里的 amd64 改成 arm64:

curl -fL https://github.com/zJay26/codex-usage/releases/latest/download/codex-usage-linux-amd64 -o codex-usage
chmod +x codex-usage
./codex-usage install

默认通过 systemd --user 实现登录自启;如果系统不支持,程序会先在后台启动并给出提示,之后需要自行配置自启。

第 3 步:打开 Dashboard

安装完成后,用浏览器访问 http://127.0.0.1:43189(这个地址只有你自己的电脑能打开)。如果安装输出里给出了不同的地址,以输出为准。

这样就完成了:程序在后台运行,历史记录已经整理好,之后的新用量会自动更新,日常直接打开上面的地址查看就行。

从总览到每一次任务

Similar plugs

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro,…

Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…