This tutorial shows how to connect Cursor to your Replit project using SSH, so you can edit and run your Replit code directly inside Cursor without leaving your workspace.
Notes:
- You need a Replit account, a Cursor installation, and access to a terminal on your computer. Download Cursor at cursor.com if you don't have it yet.
- This tutorial uses Windows Terminal to generate the SSH key. Mac and Linux users can use their default terminal; the command is the same.
- When prompted to select an operating system in Cursor, always select Linux regardless of what device you are on.
- Open Windows Terminal on your computer and run the following command to generate an SSH key: ssh-keygen -t ed25519. Press Enter three times to accept the default location and skip the passphrase.
- Copy the file path of your SSH key shown in the terminal output. Paste it into Windows Explorer and open the file with Notepad. Copy the full SSH key text.
- Sign in at replit.com and open your project. Click the + icon to open a new tab and search for SSH.
- In the SSH tab, go to Keys and click Add SSH Key. Paste your key into the field, add a label - for example, "Cursor Connection" and click Add Key.
- Go to the Connect tab and click Launch Cursor. When the Cursor prompts for access, click Open Cursor to allow the connection.
- In Cursor, select Linux as the operating system when prompted and click Continue. Wait a few seconds for the connection to establish.
- Once connected, open any file in Cursor and make a change - for example, update the background color of your app. Save the file and confirm the change appears in your Replit Webview.
.gif)
