360 Secure SkillHub
360 安全技能中心

Codex Quota

通过本地 Python 脚本读取 ~/.codex/sessions/ 会话日志,展示 Codex CLI 的 5 小时与 7 天额度窗口及重置时间;支持 --fresh 实时查询、--all 多账户汇总(临时改写 ~/.codex/auth.json 后恢复)和 --json 输出。

odrobnik
odrobnik
热度 74.20
最近更新 2026-05-19 06:28:12
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API应用场景:自动化脚本 / DevOps / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add codex-quota
Metadata
name
codex-quota
version
1.2.2
homepage
https://github.com/odrobnik/codex-quota-skill
description
Check OpenAI Codex CLI rate limit status (daily/weekly quotas) using local session logs. Portable Python script. Reads ~/.codex/sessions/ for quota data. When using --all --yes, it temporarily switches accounts by overwriting ~/.codex/auth.json (restored afterwards) to query each account. Uses the `codex` CLI for --fresh / --all.
metadata
{"openclaw":{"requires":{"bins":["python3","codex"]}}}

Skill: codex-quota

Check OpenAI Codex CLI rate limit status.

Quick Reference

# Run the included Python script
./codex-quota.py

# Or if installed to PATH
codex-quota

Options

codex-quota              # Show current quota (cached from latest session)
codex-quota --fresh      # Ping Codex first for live data
codex-quota --all --yes  # Update all accounts, save to /tmp/codex-quota-all.json
codex-quota --json       # Output as JSON
codex-quota --help       # Show help

Setup

See SETUP.md for prerequisites and setup instructions.

What It Shows

  • Primary Window (5 hours) — Short-term rate limit
  • Secondary Window (7 days) — Weekly rate limit
  • Reset times in local timezone with countdown
  • Source session file and age

When to Use

  • Before starting heavy Codex work (check weekly quota)
  • When Codex seems slow (might be rate-limited)
  • Monitoring quota across multiple accounts