Cursor CLI は、ターミナルから直接 AI エージェントとやりとりして、コードの作成・レビュー・変更ができるツールだよ。対話的なターミナル UI で進めても、スクリプトや 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 パイプライン、オートメーションみたいな非対話のケースでは、プリントモードを使おう:
# 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"