cursor-clilisted
Install: claude install-skill Ottili-ONE/skills
# Cursor CLI Agent Skill
Guide for Cursor CLI (`agent` / `cursor-agent`) including installation, authentication, non-interactive mode, and automation patterns.
## Installation
### Standard (macOS, Linux, Windows WSL)
```bash
curl https://cursor.com/install -fsS | bash
```
### Homebrew (macOS)
```bash
brew install --cask cursor-cli
```
### After installation
Add to PATH if needed:
```bash
export PATH="$HOME/.local/bin:$PATH"
```
Verify:
```bash
agent --version
# or
cursor-agent --version
```
## Authentication
Browser login:
```bash
agent login
```
Or API key:
```bash
export CURSOR_API_KEY=your_api_key_here
```
## Update
```bash
agent update
# or
agent upgrade
```
## Commands
### Interactive
```bash
agent
agent "Add error handling to this API"
```
Backward compatible: `cursor-agent` works the same way.
### Model selection
```bash
agent models
agent --model gpt-5
```
During session: `/models`
### Sessions
- List: `agent ls`
- Resume last: `agent resume`
- Specific: `agent --resume="[chat-id]"`
### Context (files/folders)
```
@filename.ts
@src/components/
```
### Slash commands (interactive)
- `/models` – switch model
- `/compress` – summarize conversation
- `/rules` – create or edit rules
- `/commands` – custom commands
- `/mcp enable [server-name]` / `/mcp disable [server-name]`
### Non-interactive / CI mode
For scripts and automation, prefer print mode:
```bash
agent -p 'Run tests and report coverage'
agent -p 'Refactor this file to use async/