Skip to content

drmajsai/check-codex-resets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

check-codex-resets

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.

Security

Read the script before running it.

The script:

  • reads ~/.codex/auth.json, or CODEX_AUTH_PATH if 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.

Usage

Download and run

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.sh

Run with UTC:

./check-codex-resets.sh

Run with a specific IANA timezone:

./check-codex-resets.sh America/New_York

Use a custom Codex auth path:

CODEX_AUTH_PATH=/path/to/auth.json ./check-codex-resets.sh UTC

Run from GitHub

This 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

Requirements

  • Bash
  • Python 3.9 or newer
  • A local Codex login at ~/.codex/auth.json

License

MIT

About

Check Codex reset credit expiry times with your local Codex, run local or from Github with a simple .sh command!

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages