ai-chat-cleaner
v0.3.1
Published
Clean and remove AI chat with an interactive terminal UI.
Maintainers
Readme
ai-chat-cleaner
Clean and remove AI chat with an interactive terminal UI.
npx ai-chat-cleaner
npx ai-chat-cleaner --agent codex- Supported agents:
- Codex (
codex) - Claude Code (
claude-code)
- Codex (
[!WARNING] Please restart your AI coding tool after deletion.
It is recommended to clean history while Codex is not running, to avoid concurrent writes.
Codex cleanup
Codex conversations are deleted through the official codex delete --force command. The CLI keeps the existing interactive selection UI, but no longer edits Codex SQLite or JSONL files directly.
The command is resolved in this order:
AI_CHAT_CLEANER_CODEX_BIN, when set- The Codex binary bundled with the macOS ChatGPT/Codex desktop app
codexonPATH
The selected executable must support codex delete --force. Update the Codex desktop app or install the Codex CLI if no compatible executable is found.
This is a local cleanup: it removes the Codex session from this computer. It does not delete the conversation from your ChatGPT account.
Delete Codex chats from your ChatGPT account
To delete a Codex chat from your account, use the official ChatGPT desktop app flow:
- Archive the chat from the Codex history sidebar.
- Open Settings → Archived chats.
- Delete the archived chat.
OpenAI schedules deleted chats for permanent deletion from its systems within 30 days, subject to its stated exceptions. See How to archive and delete Codex chats in the ChatGPT app.
Credit
The terminal interaction mode is inspired by taze.
Claude Code cleanup implementation references claude-chats-delete.
License
MIT License © jinghaihan
