After accumulating hundreds of sessions, I needed a way to clean up specific conversations and even chat sessions from specific folders.
With that in mind I built a small Python CLI that let you do that.
It can be installed with brew:
brew install vilaca/tap/cursor-chat-cleaner
pip: pip install cursor-chat-cleaner
by cloning the repo: https://github.com/vilaca/cursor-chat-cleaner
For safety there's a --dry-run parameter and chat sessions are only deleted when --yes is present in the command.Chats are deleted from the both the database and the file system and there's a possibility of doing backups (but no restore command yet).
As a bonus there's a 'stats' sub command that shows the models and tokens spent for each chat session.
This was exclusively tested in MacOs (Sequoia) with the latest Cursor version but should be fairly simple to port to other operating systems.