Settings

Theme

Show HN: I wrote a small CLI to inspect and remove Cursor chat sessions

github.com

2 points by vilaca · 0 comments · 1 min read

Reader

Cursor stores chat session history in SQLite but lacks a way to delete individual chat sessions or by folder or repository.

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.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection