安装¶
macOS、Linux 和 Windows (WSL)¶
使用一条命令安装 Cursor 命令行界面:
curl https://cursor.com/install -fsS | bash
Windows (原生)¶
使用 PowerShell 在 Windows 上安装 Cursor 命令行界面:
irm 'https://cursor.com/install?win32=true' | iex
验证¶
安装后,验证 Cursor 命令行界面是否正常工作:
agent --version
安装后设置¶
- 将 \~/.local/bin 添加到 PATH:
使用 bash:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
使用 zsh:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
- 开始使用 Cursor Agent:
agent
更新¶
Cursor 命令行界面默认会自动更新,确保你始终使用最新版本。
要手动将 Cursor 命令行界面更新至最新版本:
agent update