Just ask Codex to use its local auth token as a bearer token and send a GET request to it. The response includes "available_count" and "credits[].expires_at". Or script it yourself obviously.
https://chatgpt.com/backend-api/wham/rate-limit-reset-credit...
For the automated checking of other stuff: It was a one-shot prompt to get Codex clank up some Python that returns remaining usage, next reset time/date, and so on.
The result does use Codex App Server, but it's a short-lived process that is dealt with over stdio so that's... fine-ish, I guess?