Cursor CLI Tips & FAQ

3 min read

A few practical tips and answers to the most common questions — solve "where was I?" and "why can't I use this?" in one shot.

Tips

1. Resume the Previous Conversation

Closed mid-session and want to pick up where you left off? No need to start over:

cursor agent --resume

This loads the most recent conversation with all context intact — like hitting "resume" on a paused video.

2. Confirm Before Running Commands

The Agent may want to run commands like npm install or git.

  • Interactive mode: it will ask you first
  • If you're cautious, tell it in conversation: "Ask me before running any commands"

That way there won't be any "wait, when did it run that?" moments.

3. Use CLI and IDE Together

The CLI and the Cursor window can be used at the same time — it's not either/or:

  • Use the window for main development, browsing the file tree, using Tab completion
  • Use the CLI for small tasks, looking things up, running automation

One handles the main battle, the other handles skirmishes — divide and conquer.

FAQ

Q: cursor: command not found? A: Restart your terminal after installation, or run source ~/.zshrc (or ~/.bashrc). Make sure the install path is in your PATH — the classic "installed the tool but the system can't find it" problem is almost always a PATH issue.

Q: Is the CLI paid? A: Yes. You need a Cursor subscription to use the CLI — it's the same subscription as the IDE.

Q: Can I use it on a server / in Docker? A: Yes. The requirements are: can run the install script, and can log in to Cursor (or set up a token). Watch out for network and authorization — don't expect it to reach Cursor's cloud in a restricted network environment.

Q: Is it the same as the Agent in the Cursor window? A: It's the same underlying capability. The difference is that the CLI is a terminal interface, supports non-interactive mode, and integrates with scripts and CI — same AI, different interface.

Summary

  • Resume conversation: cursor agent --resume
  • Command confirmation: you can ask it to "confirm before running any commands"
  • CLI and IDE: can be used together, not mutually exclusive
  • When stuck: check cursor --help and the official docs — most issues have known solutions

Next: 06-cursor-cli-with-worktree — Use CLI with Worktree for parallel development. Or go back to 00-overview to review the course map.