Skip to content

nitroz3us/codex-reset-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Codex Reset Check

Small, dependency-free Python script that shows Codex usage windows and reset-credit expiry dates from an existing Codex ChatGPT login.

This is unofficial community tooling. It uses internal ChatGPT/Codex backend endpoints that can change without notice.

What It Calls

  • GET https://chatgpt.com/backend-api/wham/usage
  • GET https://chatgpt.com/backend-api/wham/rate-limit-reset-credits

The script sends the bearer token from your local Codex auth cache in the Authorization header. When it can find an active account id, it also sends ChatGPT-Account-Id.

It does not redeem reset credits, mutate account state, or write your token anywhere.

Requirements

  • Python 3.10+
  • An existing Codex ChatGPT login
  • File-based Codex credential storage, meaning an auth.json exists

Default auth paths:

  • macOS/Linux: ~/.codex/auth.json
  • Windows: %USERPROFILE%\.codex\auth.json
  • Custom: $CODEX_HOME/auth.json

Codex can also store credentials in your OS keychain/keyring. If Codex is using keyring storage and no auth.json exists, this script will not be able to read your login.

Usage

No-clone quick run

Current one-liner for macOS/Linux:

curl -fsSL https://raw.githubusercontent.com/nitroz3us/codex-reset-check/master/codex_reset_check.py | python3 -

Current one-liner for Windows PowerShell:

irm https://raw.githubusercontent.com/nitroz3us/codex-reset-check/master/codex_reset_check.py | py -

For a public repo, prefer a versioned tag such as v0.1.0 after you create one.

Tagged one-liner for macOS/Linux:

curl -fsSL https://raw.githubusercontent.com/nitroz3us/codex-reset-check/v0.1.0/codex_reset_check.py | python3 -

Tagged one-liner for Windows PowerShell:

irm https://raw.githubusercontent.com/nitroz3us/codex-reset-check/v0.1.0/codex_reset_check.py | py -

Because this script reads your local Codex auth cache, the safer no-clone flow is to download, inspect, then run:

curl -fsSL -o codex_reset_check.py https://raw.githubusercontent.com/nitroz3us/codex-reset-check/master/codex_reset_check.py
python3 codex_reset_check.py

Windows PowerShell:

irm https://raw.githubusercontent.com/nitroz3us/codex-reset-check/master/codex_reset_check.py -OutFile codex_reset_check.py
py .\codex_reset_check.py

Local file

python3 codex_reset_check.py

Use a custom auth path:

python3 codex_reset_check.py --auth-path /path/to/auth.json

On Windows PowerShell:

py .\codex_reset_check.py

For WSL using the Windows Codex auth file:

CODEX_HOME=/mnt/c/Users/<you>/.codex python3 codex_reset_check.py

Output

Example:

Usage windows
- no recognizable usage-window fields found

Reset credits
- #1: status=available, granted=2026-06-12 12:37:19 +08, expires=2026-07-12 12:37:19 +08

Security Notes

Treat auth.json like a password. It contains access tokens. Do not commit it, paste it into issues, or share it in screenshots.

This script intentionally avoids dependencies, telemetry, config files, and token persistence.

Disclaimer

This project is not affiliated with OpenAI. The endpoints are internal and may break or return a different shape at any time.

About

A tiny read-only CLI for checking Codex reset-credit expiry dates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages