Cursor CLI は、ターミナルから直接 AI エージェントと対話して、コードの作成・レビュー・修正ができる。インタラクティブなターミナルインターフェースでも、スクリプトや CI パイプライン向けの出力自動化でも、作業中のその場で強力なコーディング支援を提供する。
# Install
curl https://cursor.com/install -fsS | bash

# Run interactive session
cursor-agent
Cursor CLI は現在ベータ版。ぜひフィードバックを送ってね!

インタラクティブモード

エージェントとの会話セッションを開始して、目標を伝え、提案された変更をレビューし、コマンドを承認しよう:
# Start interactive session
cursor-agent

# Start with initial prompt
cursor-agent "refactor the auth module to use JWT tokens"

非インタラクティブモード

スクリプト、CI パイプライン、自動化などの非インタラクティブな用途には出力(print)モードを使おう:
# Run with specific prompt and model
cursor-agent -p "find and fix performance issues" --model "gpt-5"

# Use with git changes included for review
cursor-agent -p "review these changes for security issues" --output-format text

セッション

前回の会話を再開して、複数回のやり取りにまたがってコンテキストを維持しよう:
# List all previous chats
cursor-agent ls

# Resume latest conversation  
cursor-agent resume

# Resume specific conversation
cursor-agent --resume="chat-id-here"