Codex CLI usage bars for the terminal. It reads the latest token_count event
from ~/.codex/sessions and renders three horizontal bars:
5h: primary Codex rate-limit window, usually 300 minutes.Week: secondary Codex rate-limit window, usually 10080 minutes.Ctx: current context tokens versus the model context window.
Default colors:
5h: orangeWeek: blueCtx: green- any bar turns yellow above 80% and red above 95%
After installing the PowerShell profile alias on this machine, run Codex directly:
codexThe alias expands to:
F:\projects\codex-usage-status\codex-status.cmd runRun once:
node .\src\cli.js statusOn Windows, you can also use the included command script:
.\codex-status.cmd statusWatch in place:
node .\src\cli.js watchLaunch Codex through the wrapper:
node .\src\cli.js runor:
.\codex-status.cmd runrun passes --no-alt-screen to Codex by default. This keeps Codex output
inline so the usage bars remain visible in the terminal. If you want Codex's
native full-screen TUI instead, pass --codex-alt-screen; in that mode the bars
may only be visible in the terminal title because Codex owns the screen.
Pass Codex arguments after run:
node .\src\cli.js run --model gpt-5.5 --cd F:\projects--width N bar width, default 20
--interval MS refresh interval, default 2000
--ascii use # and - instead of Unicode blocks
--no-color disable ANSI colors
--one-line compact output for watch/status
--title wrapper mode only: update terminal title without writing a status line
--codex-alt-screen
wrapper mode only: keep Codex's native full-screen TUI
This project does not patch the Codex binary or modify the global npm package. The wrapper starts the installed Codex CLI and monitors the session jsonl files that Codex already writes locally.