Check when your Codex reset credits expire with a single command line, can simply run it from git too.
This is a small Bash wrapper around Python standard-library code. It reads your local Codex auth file, calls the ChatGPT backend reset-credit endpoint, and prints only the available reset count plus expiry times.
Read the script before running it.
The script:
- reads
~/.codex/auth.json, orCODEX_AUTH_PATHif set - sends your Codex access token and account ID only to
chatgpt.com - does not print tokens, account IDs, credit IDs, or user IDs
- does not write files
- uses only Python standard-library modules
The endpoint is undocumented and may change.
Download and inspect:
curl -fsSLO https://raw.githubusercontent.com/drmajsai/check-codex-resets/main/check-codex-resets.sh
less check-codex-resets.sh
chmod +x check-codex-resets.shRun with UTC:
./check-codex-resets.shRun with a specific IANA timezone:
./check-codex-resets.sh America/New_YorkUse a custom Codex auth path:
CODEX_AUTH_PATH=/path/to/auth.json ./check-codex-resets.sh UTCThis is convenient, but inspect the script first if you do not already trust the current repository contents.
Run with UTC:
bash <(curl -fsSL https://raw.githubusercontent.com/drmajsai/check-codex-resets/main/check-codex-resets.sh)Run with a specific IANA timezone:
bash <(curl -fsSL https://raw.githubusercontent.com/drmajsai/check-codex-resets/main/check-codex-resets.sh) America/New_York- Bash
- Python 3.9 or newer
- A local Codex login at
~/.codex/auth.json
MIT