I want to track the Cursor global user rules in my git dotfiles tracker, but right now it’s saved inside the Cursor application itself at Settings > Rules > User Rules. Where can I find the text file that Cursor is saving this to in my filesystem?
Its stored in DB format, checkout this
sqlite3 “/Users/$(whoami)/Library/Application Support/Cursor/User/globalStorage/state.vscdb”
“SELECT value FROM ItemTable WHERE key = ‘aicontext.personalContext’;”
Hey, thanks a lot for the tip and the command to retrieve the rules — really helpful! Just wanted to mention that in the latest versions of Cursor, the rules are now stored in the cloud, so the local DB might not reflect recent changes.
Yes, I am debugging the same, some old rules are storing in this DB, but latest rules in dashboard on UI not listed.
I have a usecase to add one rule globally across my org, how can I achieve this, We are using Enterprise account. If this is in local DB, I can write a script and push it via JamF, but seems now it’s not possible. Any idea how i can move further
You can’t save global rules but can save global commands.
Global commands are saved in ~/.cursor/commands/
Commands are saved as .md files the name of the file, becomes the name of the command.
It can be found in the cursor (⌘ ⇧ J) menu
do you always have to init the command though?
If there are global always applied rules, it would be nice to maintain those outside of cursor and push to an area where cursor will pick them up. Thought maybe a rule file for ~/.cursor/rules would be equivalent but doesn’t seem to be.
Am I missing anything?
I found my custom written rules in the Cursor plugins cache - .cursor/plugins/cache/**/rules/*.mdc - you’ll just need to identify your rules from the ones Cursor already has.
As I mentioned at Share your experience with Composer 2! - #101 by jcrben this is sadly a dealbreaker for me and I’ll have ti churn after a month of pro.