Hi everyone! In this article I wanna show you 2 options to install and run the cursor CLI on a Windows O.S (both require WSL2 + linux distro like ubuntu) for .NET developers (but you can use it for other stacks as well, just adapt it):
Everything including git and repositories within the linux distro (better performance but greater overhead to setup)
Just the Cursor CLI within the linux distro (easier, performance overhead just for the Cursor CLI)
Here you'll also learn how to setup the terminal within the Visual Studio 2022+ to use the Cursor CLI (or others tools).
We won't focus on details like how to setup WSL2 + linux distro, neither install the git, you can google it. I know you can.
Note: I'll consider you have the WSL2 already set up!
Initial Setup
Once you have the linux distro running through your WSL2 (I'd suggest you to install the distro via Microsoft Store), you can open a terminal within the linux distro by using:
# Find the distro name
wsl --list
# Run into linux via WSL2
C:\Windows\System32\wsl.exe -d {distro_name}
The following steps are within the linux terminal:
- Install cursor-cli and run
cursor-agent(it can require to restart the linux or reopen the terminal). It will prompt you to log in using your browser, so, super easy. - Setup the linux terminal within your Visual Studio (you can use it from Windows Terminal as well):
- Name: Whatever you want to
- Shell location:
C:\WINDOWS\system32\wsl.exe - Arguments:
-d {your_distro_name}(you can find out it by runningwsl --list)
Here you're ready to use the Cursor CLI, the following steps are if you wanna run everything from WSL2 (better performance for Cursor CLI)
- Install and setup the git (+ gitlab/github if needed) into the linux
- Install .NET SDK steps for .NET 10
- Clone the desired repository and open its solution file with you Visual Studio via WSL2 (click to "open a solution" and find the solution file within the path
\\wsl$) - Open the integrated terminal we setup before and run
cursor-agent
Done! You can now choose between these 2 options to run the Cursor CLI on your Windows machine + WSL2!
Any questions/suggestions? Let a comment below. Bye!

Top comments (0)