安裝¶
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