Skip to main content

Local AI usage observability CLI for Codex sessions.

Project description

codex-stats

Local AI usage observability CLI for Codex sessions.

What it does

codex-stats reads local Codex state from ~/.codex and shows:

  • session totals from state_5.sqlite
  • request counts from rollout JSONL files
  • model and project breakdown from local session metadata
  • estimated cost from a local pricing table

Install

pip install .

After publish:

pipx install codex-stats

For local development:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip setuptools
python -m pip install -e .

Usage

codex-stats
codex-stats today
codex-stats week
codex-stats month
codex-stats session
codex-stats models
codex-stats project
codex-stats session --id <session_id>
codex-stats --json

From the repo without installing:

PYTHONPATH=src python3 -m codex_stats

Notes

  • This tool does not intercept Codex API traffic.
  • Costs are estimates, not authoritative billing values.
  • The current MVP relies on local file formats that may evolve with Codex CLI versions.

Release

Recommended publish flow:

  1. Create the GitHub repository vivek378521/codex-stats.
  2. Create a PyPI project named codex-stats.
  3. Configure PyPI Trusted Publishing for the GitHub repository.
  4. Push a version tag and publish a GitHub release.
  5. The release workflow will build and upload the package to PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codex_stats-0.2.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codex_stats-0.2.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file codex_stats-0.2.0.tar.gz.

File metadata

  • Download URL: codex_stats-0.2.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codex_stats-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2cdcd4f8dce543878e0b7228853a40e48a2cc23facb9828a920749b17897d208
MD5 e8b3510917cd1a330e670318f9b5ecce
BLAKE2b-256 aa0a53d16fb6ce850cd4440c9a44ff5c48c789f407d7157ec18f14535c50afe7

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_stats-0.2.0.tar.gz:

Publisher: publish.yml on vivek378521/codex-stats

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codex_stats-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: codex_stats-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codex_stats-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7601bcce3e9e47167956f7ba7aa33f9c7962ef844c4b2aef10dc6f2455a893f
MD5 bda544104296fa084c9a29d9cbc47ad3
BLAKE2b-256 190ab28c5b651352e516d622fad1cffe41d79e251a0a5876b58395dcc4eee289

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_stats-0.2.0-py3-none-any.whl:

Publisher: publish.yml on vivek378521/codex-stats

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page