How to Open Cursor from the Shell?

Hello everyone,

I’ve successfully set up a quick access function for Visual Studio Code in my .zshrc file, which allows me to open files directly from the shell. Here’s the function I’m currently using for VSCode:

code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* }

I want to achieve something similar for Cursor. Could someone guide me on how to set up a similar function for launching Cursor from the shell? Any advice or examples would be greatly appreciated!

Thank you!