Cursor-migrate: effortlessly move your project's folder without losing your Cursor context

Hi all!

I work at a company that recently got acquired, and as I was moving my projects folders around to reflect that change, I noticed that I was losing my cursor chat history. That was a bummer, because it had a lot of interesting prompts and conversations that sometimes I used to look back at, and they got lost.

To prevent this from happening, I built a tool that you can use to move your projects around without losing your cursor chat history. With it:

:white_check_mark: The chat history continues to work.

:white_check_mark: References to the project (like in the “Open Recent” menu or the main Cursor window) are updated to the new place.

:white_check_mark: Usually avoids a full codebase re-index (embedding pointers are copied with workspace storage).

And you won’t have to worry about a supply chain attack since this package has zero dependencies.

You can use it by calling: npx cursor-migrate --from ~/Project/Personal/my-app --to ~/Project/Sidequests/my-app

If you want to check out the package, you can find it here https://www.npmjs.com/package/cursor-migrate

I hope this is as useful to you as it is to me.

3 Likes

This is gold! Just used it after moving all my projects to an external drive. Saved me a lot of time and headache! Thank you!

Note: I had to downgrade to node 22 for it to work, it wouldn’t run on node >= 23. Might be an issue with my machine though, who knows.

Hi Daniel!

This is likely because your version of node 23 still hid the module native “node:sqlite” module. Before 23.4, import “node:sqlite” throws ERR_UNKNOWN_BUILTIN_MODULE unless you pass --experimental-sqlite. npx cursor-migrate does not add that flag.

For this package, I’ve opted to use node’s internal sqlite module to avoid any supply chain attacks affecting the people trying to use this tool. Apologies for any inconveniences this may cause.

On a happier note, I’ve updated the latest version of the package to work with the latest version of Cursor, and I will work to upgrade this package to work with the latest node LTS versions!

Version “v24.13.0” onwards work like a charm!

1 Like