Codex Auth Cleaner
/install codex-cleaner
Codex Auth File Cleaner
Clean invalid codex auth files via CPA management API. Zero dependencies (pure Python stdlib).
First Run
Run setup wizard to configure CPA URL and admin key:
python3 scripts/codex_cleaner.py setup
Config saved to config.json (auto-created, gitignored). Config priority: CLI args > env vars (CPA_URL/CPA_KEY) > config.json.
Commands
# View status
python3 scripts/codex_cleaner.py status
python3 scripts/codex_cleaner.py status --json
# Check active files, disable 401s
python3 scripts/codex_cleaner.py check
# Double-verify disabled files, then delete confirmed 401s
python3 scripts/codex_cleaner.py delete
# Full clean (check + delete), output human-readable report
python3 scripts/codex_cleaner.py clean --report
# Full clean, output JSON
python3 scripts/codex_cleaner.py clean --json
# Loop mode (default 300s interval)
python3 scripts/codex_cleaner.py monitor -i 300
Workflow
clean = check + delete
check: fetch active codex files → concurrent quota check → disable 401s
delete: fetch disabled files → verify#1 (401?) → wait 2s → verify#2 (still 401?) → delete
Double verification prevents accidental deletion of temporarily failing files.
Nanobot Integration
For periodic monitoring, run clean --report via HEARTBEAT or cron, then send the stdout report to the user via message tool.
Example:
cd ~/.nanobot/workspace/skills/codex-cleaner && python3 scripts/codex_cleaner.py clean --report
Report Format
🧹 Codex 认证清理报告
⏰ 2026-02-26 13:50:00
📊 清理前
总计: 100 | 可用: 85 | 已禁用: 15
🔍 检查阶段
检测: 85 | 失效(401): 3 | 已禁用: 3
🗑️ 删除阶段
待删: 18 | 验证通过: 15 | 已删除: 15 | 跳过: 3
📊 清理后
总计: 85 | ✅可用: 82 | ⛔已禁用: 3
⚡ 本次清理: 禁用 3 + 删除 15 = 18 个无效文件
Config File
config.json (auto-generated by setup wizard):
{
"cpa_url": "http://YOUR_CPA_HOST:PORT",
"cpa_key": "YOUR_ADMIN_KEY",
"concurrency": 20,
"monitor_interval": 300,
"notify": {
"enabled": true,
"channel": "telegram",
"chat_id": "YOUR_CHAT_ID"
}
}
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install codex-cleaner - 安装完成后,直接呼叫该 Skill 的名称或使用
/codex-cleaner触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Codex Auth Cleaner 是什么?
Monitor and clean invalid codex auth files from CPA (Codex Provider Agent). Checks quota status, disables 401 files, double-verifies before deletion. Use whe... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 382 次。
如何安装 Codex Auth Cleaner?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install codex-cleaner」即可一键安装,无需额外配置。
Codex Auth Cleaner 是免费的吗?
是的,Codex Auth Cleaner 完全免费(开源免费),可自由下载、安装和使用。
Codex Auth Cleaner 支持哪些平台?
Codex Auth Cleaner 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Codex Auth Cleaner?
由 JupiterWen(@geekjair)开发并维护,当前版本 v1.0.3。