Cursor CLI Integration
PraisonAI provides integration with Cursor’s CLI (cursor-agent) for headless code automation, file modifications, and streaming output.Installation
Download and install Cursor from cursor.com, which includes the CLI.Quick Start
Configuration Options
Examples
Basic Execution
Force Mode (File Modifications)
Model Selection
Session Resume
Streaming Output
As Agent Tool
Environment Variables
CLI Flags Used
The integration uses the following Cursor CLI flags:Output Formats
JSON Output
Stream JSON Output
Error Handling
Authentication
Cursor CLI supports two authentication methods:Browser-Based Login (Recommended)
API Key
Best Practices
- Use force=True only when file modifications are needed
- Set appropriate model based on task complexity
- Use session resume for multi-step tasks
- Enable streaming for long-running tasks
- Set timeouts appropriate for task complexity
- Use JSON output for programmatic processing

