How to Install and Run Cursor CLI on Windows

By CodeAgentSwarm Team · Updated August 16, 2026

Cursor provides a native Windows installer for Cursor Agent CLI. Run the official PowerShell command, verify the explicit cursor-agent executable and sign in with your Cursor account. You do not need to substitute the generic agent command. That command name matters. On a Windows machine that also has Grok installed, agent may belong to Grok. Cursor's documented binary is cursor-agent, and CodeAgentSwarm detects that exact executable.

What you need before installing Cursor CLI

  • A Windows user account that can run PowerShell commands
  • A Cursor account for interactive login, or CURSOR_API_KEY
  • A project folder that Cursor Agent can access
  • CodeAgentSwarm if you want the ACP Chat interface and multi-agent supervision

Cursor Agent CLI is currently described by Cursor as beta software. Commands and capabilities can change between releases, so check the official Cursor documentation when upgrading.

Install Cursor Agent with the official Windows command

Open PowerShell and run Cursor's native Windows installer:

powershell
irm 'https://cursor.com/install?win32=true' | iex

Close and reopen PowerShell if the installer changed your PATH. Then verify the installed command:

powershell
cursor-agent --version
Get-Command cursor-agent

CodeAgentSwarm can run the same official installer when Cursor Agent is missing. It checks the native cursor-agent.cmd before starting Chat.

Sign in and check authentication

powershell
cursor-agent login
cursor-agent status

The login flow connects the CLI to your Cursor account, and Cursor consumes the subscription or usage attached to that account. For a non-interactive environment, provide CURSOR_API_KEY through your normal secret-management process.

Use cursor-agent logout when you need to remove the current login from the machine.

Avoid the agent command conflict with Grok

Do not use agent as a shortcut for Cursor. Another installed CLI can own that command, and Grok is a known example. A successful response from agent --version does not prove that Cursor is installed.

powershell
Get-Command cursor-agent
Get-Command agent -ErrorAction SilentlyContinue

# Start Cursor explicitly
cursor-agent

If agent resolves to Grok, leave it alone. Use cursor-agent for Cursor and let each product keep its own executable.

Start Cursor ACP Chat in CodeAgentSwarm

Select Cursor Agent when creating a Chat. CodeAgentSwarm launches cursor-agent acp over stdio, completes the ACP handshake and streams text and tool calls into the conversation.

You can use Agent, Plan or Ask when the session exposes those modes, choose available models, answer permission requests and cancel an active response. Project and user MCP servers are read from .cursor/mcp.json.

For the complete feature flow, read the Cursor Agent CLI ACP guide. To organize several Windows sessions, continue with the Cursor Agent swarm guide.

Fix common Cursor CLI problems on Windows

  • cursor-agent is not recognized: reopen PowerShell after installation and run Get-Command cursor-agent. If it is still missing, rerun the official installer.
  • The wrong agent opens: confirm you typed cursor-agent, not agent. Use Get-Command to see which executable Windows resolved.
  • Authentication fails: run cursor-agent status, then repeat cursor-agent login or check CURSOR_API_KEY.
  • History Chat times out: run cursor-agent update. Older ACP versions may not advertise loadSession.
  • MCP tools are missing: check the project or user .cursor/mcp.json and restart the session after correcting it.

The Cursor CLI conversation history guide explains why resume is conditional. Plan and usage details are in Cursor CLI pricing and usage.

FAQ

Yes. Cursor provides an official native Windows PowerShell installer at https://cursor.com/install?win32=true.

Run irm 'https://cursor.com/install?win32=true' | iex in PowerShell, then reopen the shell and verify cursor-agent --version.

Run cursor-agent. The generic agent command can belong to another product such as Grok, so it is not a reliable way to launch Cursor.

Run cursor-agent login and confirm with cursor-agent status. Non-interactive environments can use CURSOR_API_KEY.

Your installed Cursor version may support new ACP sessions without advertising loadSession. Run cursor-agent update and check again.

Install Cursor Agent natively on Windows and run its ACP Chat beside your other coding agents in CodeAgentSwarm.

Download it freemacOS & Windows