Codex Usage Limit Indicator
On your display
Show your remaining Codex allowance and reset countdown with an animated companion. Choose 5-hour, weekly, or both, with optional surprise-reset alerts.
- Topic
- Miscellaneous
- Includes
- Script
Runs on
- Runs on 32×8 (TC001 & DIY)
- Runs on 52×16 (TC002)
- Does not run on 32×8 with AWTRIX 3 (TC001 & DIY) Made for AWTRIX NG.
Choose your display in the next step.
Script description
What it does
Keep an eye on your remaining Codex allowance directly on your AWTRIX clock, alongside a selectable animated companion.
- Top row: Labelled reset countdown in grey.
- Bottom row: Percentage of allowance remaining in white.
- Usage window: Choose 5-hour only, weekly only, or both.
- Surprise reset alerts: Optional green message when a selected allowance unexpectedly returns to 100% early.
Runs directly on the clock. No computer helper, API key, pairing key, or separate icon downloads are required.
Requirements
- AWTRIX NG v1.2.2 on a TC002 52×16 display.
- Internet access for the clock.
- A ChatGPT account with Codex access.
- A browser to approve sign-in.
First-time setup
- Install the script and open its app settings using the gear button.
- Enable Signed in / start sign-in, then save.
- Wait for the clock to display ENTER CODE.
- Wait at least six seconds, navigate away from app settings, then return. Copy Device sign-in code.
- Open Codex device sign-in, enter the code, and complete sign-in. If necessary, enable device-code login in your ChatGPT account’s Security settings.
- After sign-in, the clock displays your companion, reset countdown, and remaining allowance.
The settings page does not refresh the code automatically. Navigate away and return to see changes. Do not edit the code field or save settings during sign-in; saving restarts the app. Codes expire after 15 minutes.
Choose what to display
Set Usage window to:
- both: Rotate through available usage windows.
- five-hour: Show only the 5-hour allowance.
- weekly: Show only the weekly allowance.
If your account does not return the selected window, the app displays an unavailable message.
Surprise reset alerts
Enabled by default and optional. An alert triggers when a selected allowance jumps from 0–20% remaining to 100%, more than five minutes before its previously reported reset.
The green alert appears during the next normal app appearance, without sound or interrupting other apps. It lasts up to one appearance and expires after three minutes if unseen.
Detection requires fresh successful readings before and after the change. Initial loads, restarts, failed requests, stale gaps, and scheduled resets do not trigger alerts.
Customization
Choose from nine companions, toggle animation, adjust the refresh interval, and set the app’s time in the normal display rotation.
Updating without signing in again
Replace Code only in your existing clock script. Preserve its script name and Data, and keep Signed in / start sign-in enabled. Save, then reopen app settings to see the new options.
Signing out
Disable Signed in / start sign-in and save. This clears the credentials stored by this script on the clock.
Credentials remain in the clock’s app storage. Do not share its Data contents or screenshots containing sign-in details.
This is an unofficial community integration. Codex authentication and usage endpoints may change.
Sign in to view and copy the code of this script.
Discussion 3
Ask a question, suggest a change or share how you use it.
Newest first
More scripts in Miscellaneous
Something wrong with this script? Report it.
Have an idea?
Sign in to ask questions and join the conversation.