A simple shell script to manage multiple profiles for Cursor.
Cursor doesn't natively support multiple profiles (e.g., for work and personal use). This script helps you switch between different user configurations by managing the ~/.config/Cursor directory.
Notes and Motivation
Cursor uses AppImage which does not support several CLI flags that are natively supported by vscode. For example, in vscode you can specify a custom user data directory using: code --user-data-dir /path/to/my/config/code.
Cursor also supports profiles, by using cursor --profile work for example, however profiles are saved in ~/.config/Cursor/profiles/User and this will only save settings, and will not allow you to change between cursor accounts.
In fact the Authentication Session of cursor is saved in the SQLite database in ~/.config/Cursor/User/globalStorage/state.vscdb, however in order to save everything it was easy to just switch between the entire cursor directories for now.
The script works by renaming your active ~/.config/Cursor directory to ~/.config/Cursor-<profile-name> and then creating a symbolic link named Cursor pointing to the active profile's directory. This tricks Cursor into loading the settings, extensions, and authentication from the profile you choose.
- Clone or download the ncursor.shscript to your local machine.
- Make it executable:
chmod +x ncursor.sh 
- (Optional) Move it to a directory in your $PATHfor easier access, like/usr/local/bin.
Here's a typical workflow for setting up and using multiple profiles.
- Open Cursor for the first time.
- Log in with your work account and set up your preferences.
- Close Cursor.
- Run the initcommand to save this setup as theworkprofile:This will rename./ncursor.sh init work ~/.config/Cursorto~/.config/Cursor-workand create a symlink~/.config/Cursorpointing to it.
- Detach the current profile. This removes the symlink, so Cursor will start fresh.
./ncursor.sh detach 
- Open Cursor again. It will be like a fresh installation.
- Log in with your personal account.
- Close Cursor.
- Run the initcommand to save this as yourpersonalprofile:./ncursor.sh init personal 
Now you can easily switch between your saved profiles.
- 
List available profiles: ./ncursor.sh list Output: Available profiles: work personal
- 
Switch to a different profile: ./ncursor.sh use work This command will stop any running Cursor process, update the ~/.config/Cursorsymlink to point to theworkprofile, and let you know the switch was successful.
- 
Check the currently active profile: ./ncursor.sh get Output: Using Context: work
- ncursor.sh init <profile-name>: Saves the current Cursor configuration as a new profile.
- ncursor.sh list: Lists all saved profiles.
- ncursor.sh use <profile-name>: Switches the active Cursor profile.
- ncursor.sh get: Shows the currently active profile.
- ncursor.sh detach: Removes the active profile symlink, allowing a fresh start.
- ncursor.sh help: Shows the usage message.