
Wow this is amazing.
Cursor just launched a powerful new CLI tool that brings its coding agent directly to your terminal— use in ANY IDE.

Get AI-powered assistance into any environment: shells, JetBrains, containers, CI pipelines.
This isn’t just a helper to launch the Cursor editor from the terminal like the old cursor command.
It’s a full-fledged, headless agent that can read and edit files, understand multi-file context, and even run shell commands—with your approval.
Interactive and print
The CLI operates in two distinct modes:
Interactive mode is like chatting with the agent in real time. You give it a goal, and it responds by showing code changes or proposing terminal commands. You can review each step, approve changes, and iterate—all from the terminal.
Print mode (non-interactive) is designed for automation.
It lets you run single-shot prompts and return output in text, json, or stream-json formats—perfect for scripts, pipelines, or CI jobs that need structured results.
You can switch modes using flags like -p
and --output-format
.
Session control and customization
The CLI isn’t just one-shot.
You can resume previous sessions with cursor-agent resume, list old chats with cursor-agent ls, and keep long-term context across sessions.
It also supports slash commands like /model, /resume, and /quit, and you can specify which model to use (like gpt-5) with the -m flag. This matches the model flexibility from the GUI version of Cursor.
Secure file and command access
In interactive mode, the agent can propose terminal commands—but you must approve them before execution. This gives you peace of mind and full control. In print mode (used in CI), the agent has write access, so it’s recommended only for trusted environments.
Authentication can be done through a browser flow (cursor-agent login) or with an API key (CURSOR_API_KEY) for headless usage in CI.
MCP support. Of course
The CLI integrates smoothly with Cursor's project rules, including .cursor/rules, AGENTS.md, and mcp.json if you’re using the Model Context Protocol (MCP).
This lets you define tool access, coding guidelines, and resources just once and use them across both the GUI and CLI.
This also means you can define workflows and plug your agent into real APIs, databases, or file systems—enabling powerful, real-world automation.
Easy installation and setup
Built for Managers, Not Engineers
AI isn’t just for developers. The AI Report gives business leaders daily, practical insights you can apply to ops, sales, marketing, and strategy.
No tech jargon. No wasted time. Just actionable tools to help you lead smarter.
Start where it counts.
AI leaders only: Get $100 to explore high-performance AI training data.
Train smarter AI with Shutterstock’s rights-cleared, enterprise-grade data across images, video, 3D, audio, and more—enriched by 20+ years of metadata. 600M+ assets and scalable licensing, We help AI teams improve performance and simplify data procurement. If you’re an AI decision maker, book a 30-minute call—qualified leads may receive a $100 Amazon gift card.
For complete terms and conditions, see the offer page.