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

# Run interactive session
cursor-agent
Cursor CLI lagi beta, kami bakal seneng banget denger feedback lo!

Mode interaktif

Mulai sesi ngobrol bareng agent buat jelasin tujuan lo, nge-review perubahan yang diusulin, dan nge-approve perintah:
# 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 kayak skrip, pipeline CI, atau automasi:
# 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 obrolan sebelumnya biar konteksnya kebawa 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"