cursor-cli
cursor-cli
The CLI ships the same agent runtime as the SDK and the editor — pick it when shell-script ergonomics beat a TypeScript program. The SDK is the right choice when you need streaming events, durable cloud reattachment, or programmatic subagents; the CLI is the right choice for one-off prompts and CI gates.
When to use
- One-off prompts in a terminal
- CI / GitHub Actions jobs that operate on a repo
- Headless scripted runs with structured output
- Quick local experiments before promoting to SDK code
Install & auth
- [[references/install]] — curl / PowerShell installers,
$HOME/.cursor/bin - [[references/auth]] —
CURSOR_API_KEY, login flow
Interactive
More from hktitan/cursor-sdk
cursor-hooks
File-based agent loop hooks via `.cursor/hooks.json` — pre/post commands, governance gates. Use when enforcing policy without modifying agent prompts.
1cursor-runs
Run lifecycle, streaming, follow-ups, and conversation introspection in the Cursor SDK. Use when consuming agent output, handling progress events, or chaining turns.
1cursor-subagents
Define delegated subagents on a Cursor SDK agent via the `agents` field — `AgentDefinition`, MCP scoping, and model inheritance. Use when decomposing work across specialist personas.
1cursor-sdk
Entry point for the Cursor TypeScript SDK — install, auth, and the Agent.create / Agent.resume / Agent.prompt lifecycle. Use when starting any Cursor SDK integration or wiring durable agent IDs.
1cursor-errors
CursorAgentError class hierarchy, isRetryable, and recovery patterns. Use when classifying SDK failures, building retry logic, or surfacing actionable messages.
1cursor-models
Model discovery and selection on Cursor SDK — Cursor.models.list, ModelSelection, parameters (e.g. thinking levels), per-run sticky overrides.
1