Skip to content

xbotter/codex-cost

codex-cost logo

codex-cost

A lightweight desktop tray app for Codex users who want today's cost visible at a glance.

GitHub Release License Tauri v2 Rust TypeScript macOS Windows Linux

codex-cost is a lightweight desktop tray app for Codex users who want to keep today's cost visible at a glance.

It reads local Codex usage logs, estimates the current day's USD cost, and keeps that number close at hand through a tray icon, tooltip, and compact dashboard.

codex-cost dashboard

Highlights

  • Always-on tray app for Windows, macOS, and Linux
  • Reads local Codex logs directly
  • Tracks daily usage in local timezone
  • Includes subagent usage
  • Uses online LiteLLM pricing with local cache fallback
  • Provides a quiet dashboard for cost and token breakdown

What It Feels Like

codex-cost is designed to stay out of the way.

  • Live in the tray instead of a terminal tab
  • Check today's value in one glance
  • Open a compact dashboard only when you need detail
  • Close the window without quitting the app

Installation

Download from GitHub Releases:

Platform notes:

  • macOS Apple Silicon: download the aarch64 .dmg
  • macOS Intel: download the x64 .dmg
  • Windows: download the NSIS installer
  • Linux: choose AppImage for a portable build or deb for Debian/Ubuntu-based systems

Windows builds are distributed as an NSIS installer. The installer also places WebView2Loader.dll next to the app binary to avoid missing-loader startup failures.

How It Works

codex-cost reads local Codex session JSONL logs and calculates usage from session deltas instead of summing raw cumulative counters.

The current implementation:

  • groups usage by local day
  • treats billable input as input_tokens - cached_input_tokens
  • includes reasoning_output_tokens in output cost
  • preserves cross-day session baselines to avoid overcounting

Acknowledgements

This project is inspired by ccusage.

Its Codex pricing and accounting behavior were an important reference while validating the usage model in codex-cost. This project takes that accounting direction and turns it into a desktop tray experience focused on always-on visibility.

Development

Requirements:

  • Node.js 20+
  • Rust stable
  • Tauri v2 prerequisites for your platform

Install dependencies:

npm install

Run local checks:

npm run check

Run in development:

npm run tauri dev

Build release artifacts locally:

npm run build
npx tauri build

License

MIT. See LICENSE.

About

A cross-platform menu bar app that estimates daily Codex usage cost from local session logs.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors