Skip to main content

codex-statusline

See your Codex context and quota at a glance.

tests PyPI License: MIT

English | 简体中文

A status bar for OpenAI Codex CLI. It shows context used, 5-hour and weekly quota left with reset times, and session tokens. You keep running codex exactly as before.

codex-statusline demo

CTX USED ███░░░░░ 35% | 5h ████████░░ 78% 5:41pm | week ████░░░░░░ 39% Fri 3:41pm | tok 1.2M

Why

  • No more /status interruptions. Quota and context sit in view while you work.
  • Local only. Never reads auth.json, never calls a quota API, never makes extra model calls.
  • Zero new habits. Keep typing codex. codex exec, pipes, and scripts pass straight through to the official binary.
  • Honest numbers. Unknown shows as -- and stale quota shows as refresh. A missing value is never passed off as 0% or 100%.
  • Fits any width. Segments collapse, then drop, as the terminal narrows.

Install

Requires macOS or Linux, tmux, and Codex CLI ≥ 0.159.0. Bash, Zsh, and Fish are all detected automatically.

curl -fsSL https://raw.githubusercontent.com/Moviw/codex-statusline/main/install.sh | sh

The script installs uv if needed (uv also fetches Python 3.11+ for you), installs the tool, then shows you the exact shell/hook diff and asks before writing anything.

Prefer to do it yourself:

uv tool install codex-statusline    # or: pipx install codex-statusline
codex-statusline install            # add --dry-run to only preview the diff

Then open a new terminal and run codex. The first time, Codex asks you to review a hook: confirm it is codex-statusline binding.

Missing tmux? brew install tmux or sudo apt install tmux.

Usage

codex                     # same as always, now with a status bar
codex resume --last
codex exec 'task'         # non-interactive: passed straight through, no bar

codex-statusline doctor   # check versions and dependencies
codex-statusline preview --demo --width 80   # try it without launching Codex
codex-statusline uninstall

Uninstall removes only what this tool added and still matches exactly. If you edited its block, it stops instead of overwriting. Backups live in ~/.local/share/codex-statusline/.

Configuration

Optional. Create ~/.config/codex-statusline/config.toml:

segments = ["ctx", "5h", "week", "tokens"]  # pick and reorder
theme = "dark"     # dark | light
ascii = false      # true for terminals without block glyphs
warn_at = 20       # quota remaining % that turns yellow
crit_at = 5        # quota remaining % that turns red

Invalid values are reported and fall back to defaults.

How it works

codex becomes a small shell function that starts the official CLI inside a private tmux session and draws the bar at the bottom. Data comes from two places only: the terminal title Codex already emits (model, context, thread id), and the rollout log of this session, which a SessionStart hook pins by exact path. The official binary is not replaced or patched, and your tmux config is not touched. Details: docs/architecture.md.

FAQ

How do I scroll or copy? It runs inside tmux: press Ctrl-B then [ to scroll and copy. The mouse wheel may behave differently from bare Codex.

Windows? Not supported (tmux).

Is this official? No. It is a third-party tool built on a version-sensitive integration.

Release files for codex-statusline 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codex-statusline 0.1.0
File Size Uploaded
codex_statusline-0.1.0.tar.gz 29.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for codex-statusline 0.1.0
File Interpreter ABI Platform
codex_statusline-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 52.8 kB

Release files / codex_statusline-0.1.0.tar.gz

Download URL codex_statusline-0.1.0.tar.gz
Size 29.5 kB
Tags Source
SHA-256 checksum
How to use checksums
14da8728e240d15b436e053295ffaba163e99655ab3689972dcc8466e32e8b65
BLAKE2b-256 checksum
How to use checksums
e1942bfc7b8e383c4c2153568ead5ea5ea65b538cec77c8351333b091b1665e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / codex_statusline-0.1.0-py3-none-any.whl

Download URL codex_statusline-0.1.0-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42ef9fc10556e921f1204c564b301553ac1984a310a58e00327749ebbeb63262
BLAKE2b-256 checksum
How to use checksums
9931f1b0a12f7a1f4a6caafaf5bb11f40cc31e0a8b06ace61b8f67d542ea9427
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page