Plan OpenAI Codex usage from local quota, banked resets and extra-reset forecasts.
Codex4ever is a planner for your OpenAI Codex weekly quota. It shows when your quota runs out at your current pace, whether a predicted extra reset is likely to arrive first, and when a banked reset is worth redeeming. If it helps, a ⭐ star is appreciated.
Unofficial; not affiliated with OpenAI. MIT licensed.
Ask once in Codex and the planner opens beside the chat. Pick a strategy and the plan changes: daily usage, refills and run-out points.
The forecast is an uncalibrated model estimate, not a promise. Codex4ever never redeems a reset or spends credits for you.
Codex plugin (Node.js 20+ and a signed-in Codex app or CLI):
codex plugin marketplace add ItsOdeLeo/codex4ever
codex plugin add codex4ever@codex4ever
Start a new Codex chat and ask: "Open quota planning." Reading your quota is local and read-only; no separate API key is needed.
Other MCP clients (Claude Code, Claude Desktop, Cursor and others): the same server is on npm as codex4ever and in the MCP Registry as io.github.ItsOdeLeo/codex4ever. Reading your quota still needs a signed-in Codex CLI on the same machine.
{ "mcpServers": { "codex4ever": { "command": "npx", "args": ["-y", "codex4ever"] } } }
Website: codex4ever.com, no install. Enter your quota by hand; everything is calculated in your browser and your inputs are not sent anywhere.
Run locally:
npm install
npm run web # http://127.0.0.1:4173/
npm test
Public reset data comes from Codex Resets, including the bundled offline archive (npm run archive:refresh). Thanks to its maintainer. With an optional X API token, Tibo's full timeline is read directly from X.
| Command | What it does |
|---|---|
npm run web | Local site with live reset evidence (cached 30 minutes) |
npm run site:build | Static site in dist/, evidence collected at build time |
npm run plugin:build | Self-contained Codex plugin in plugins/codex4ever/ |
npm run mcp | MCP server from source |
npm run backtest:public | Day-by-day replay of the forecast against public history |
.github/workflows/deploy-site.yml rebuilds the static site every 30 minutes and deploys it to Cloudflare Pages. Optional settings (LLM classification of posts, X timeline access) are listed in .env.example; keys are only read at build time and never reach the browser.
Design and algorithm details: docs/technical-notes.zh.md (Chinese).
Codex4ever 是 OpenAI Codex 每周额度的本地规划器:按你当前的速度显示额度什么时候用完、额外 reset 是否可能先到,以及备用 reset 什么时候值得用。预测的 reset 只在“正常刷新前发生的概率 ≥ 60%”时计入,并放在保守时刻;任何一次补满都会重新开始 7 天周期;备用默认至少保留一个。网页、插件页面和插件的 MCP 工具始终使用同一套规则。非官方工具,与 OpenAI 无隶属关系。详细设计见 技术说明。
Built by 欧的Leo — @ItsOdeLeo on X · 小红书 ItsOdeLeo. Feedback and ideas are welcome there or in GitHub issues.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y codex4everMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-itsodeleo-codex4ever": {
"command": "npx",
"args": [
"-y",
"codex4ever"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencecodex4evernpmio.github.ItsOdeLeo/codex4ever works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.