How to open cursor from terminal

Dear all,

I’m new to Cursor IDE. Could anyone here teach me how to open Cursor IDE from terminal such as the way to often do when using VSCode "open terminal → cd to folder → typing ‘code .’ ". Is there the same way for Cursor?

2 Likes

I have the same issue that this feature fails during installation.

2 Likes

You need to run the Shell Command: Install 'cursor' command command from the Command Palette in Cursor.

not available on ubuntu is it normal?

Hey! Not an official answer, but I managed to get it working by creating a function in .bashrc or .zshrc that points to the .AppImage (I create a function instead of an alias in order to use arguments). I did it as follows:

On zsh:

function cursor {
        /home/user/path_to_appimage/Cursor.AppImage $@
}

On bash:

cursor() {
    /home/user/path_to_appimage/Cursor.AppImage "$@"
}

So far I have encountered no issues, since it works as the code command. For example, cursor . opens a window in the current directory or cursor file_1 file_2 file_3 opens all three files.

1 Like

This doesn’t work in some of the windows terminals however. For example, my default terminal is GitBash and the command is unrecognized there where vscode works fine.

Thanks! I was able to get this to work on Mac by adding this to ~/.zshrc

function cursor {
  open -a "/Applications/Cursor.app" "$@"
}

With your solution it kept sending messages such as the PID number and other annoying info when i’d close the app. With this slight alteration i don’t see any weird messages in the terminal:

function cursor {
  (nohup /path/to/cursor.appimage "$@" > /dev/null 2>&1 &)
}

(I’m on Ubuntu)

1 Like