Skip to content

Cursor Pro CLI — Headless Mode Research

Date: 2026-03-19 Status: Research Complete — Ready for Install Source: Cursor docs, web research

Key Findings

  • Cursor CLI supports full headless/non-interactive mode via agent -p (print mode)
  • Supports --force / --yolo for file modifications without confirmation
  • Supports --output-format json and --output-format stream-json for structured/streaming output
  • Agent modes: Plan and Ask, plus cloud handoff for background tasks (Jan 2026 update)
  • Auth: CURSOR_API_KEY env var for scripts
  • Install: curl https://cursor.com/install -fsS | bash

Models Available via Cursor Pro ($20/mo)

Cursor has TWO usage pools: 1. Auto + Composer pool — Cursor's own routing at $1.25/1M input, $6/1M output 2. API pool — $20 included monthly credit for manually selecting models

Models in API Pool (prices per 1M tokens):

Model Input Output Notes
Claude 4.6 Sonnet $3 $15 Requires Max Mode
Claude 4.6 Opus $5 $25 Requires Max Mode
Claude 4.5 Haiku $1 $5
GPT-5 $1.25 $10
GPT-5.1 Codex $1.25 $10
GPT-5.1 Codex Mini $0.25 $2 4x rate limits
Gemini 3.1 Pro $2 $12
Gemini 3 Flash $0.5 $3
Composer 2 $0.5 $2.5 Cursor's model

Integration with OpenClaw

  • Can be called headlessly from Mac mini terminal
  • JSON output mode allows parsing results programmatically
  • Could slot into coding-agent skill as another backend
  • $20 included API credit per month — offsets direct API spend on coding tasks
  • Auto mode is cheapest for bulk work

Known Issues

  • Bug report from Jan 2026: agent -p hangs indefinitely in some cases
  • Needs real-world testing before production integration

Next Steps

  • Install Cursor CLI: curl https://cursor.com/install -fsS | bash
  • Test headless mode with a simple coding task
  • Evaluate reliability before integrating into coding-agent skill