Cursor CLI bikin kamu bisa berinteraksi sama agen AI langsung dari terminal buat nulis, nge-review, dan ngubah kode. Mau pakai antarmuka terminal interaktif atau mode print buat otomatisasi skrip dan pipeline CI, CLI ngasih bantuan ngoding yang powerful tepat di tempat kamu kerja.
# Install
curl https://cursor.com/install -fsS | bash

# Run interactive session
cursor-agent
Cursor CLI saat ini masih beta, kami bakal senang banget nerima feedback dari kamu!

Mode interaktif

Mulai sesi percakapan bareng agen buat jelasin goal kamu, nge-review perubahan yang diusulin, dan nge-approve command:
# Start interactive session
cursor-agent

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

Mode non-interaktif

Pakai mode print buat skenario non-interaktif seperti skrip, pipeline CI, atau otomatisasi:
# 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

Sesi

Lanjutin percakapan sebelumnya buat ngejaga konteks di beberapa interaksi:
# List all previous chats
cursor-agent ls

# Resume latest conversation  
cursor-agent resume

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