2 min lesson
Check the first CLI session
Start one CLI session in acme/api and verify its workspace and applicable project instructions before editing.
Check your understanding
Complete the practice "Set up Cursor CLI for acme/api".
Outcome: The session points at acme/api and reports the project instructions it will use. Stop and restart if either is wrong.
Set up Cursor CLI for acme/api
Version, account, workspace, loaded instructions
DoUse Cursor's current installation command for this operating system, then make sure ~/.local/bin is on PATH when the installer asks for it.
SeeThe shell resolves Cursor Agent and the installer does not need a project checkout.
Type
agent --versionSeeThe command prints the installed Cursor CLICursor's command line: the full agent, all modes and models, in the terminal and pipeable into scripts and CI. Press Enter for the full definition. version. Record it with the setup check.
DoRun agent status. If it is not authenticated, run agent login through the browser and check agent status again.
SeeStatus names the intended account and endpoint. Use NO_OPEN_BROWSER=1 only when the terminal must print the login URL.
DoOpen acme/api and run git rev-parse --show-toplevel before starting Agent.
SeeThe reported root is the repository intended for this task.
DoStart with agent --workspace ~/src/acme-api. Before any edit, ask it to state the working directory and name the applicable AGENTS.md and .cursor/rules files.
SeeThe session points at acme/api and reports the project instructions it will use. Stop and restart if either is wrong.
Learn more
Optional practice
Test yourself on Check the first CLI session
QWhich result proves the first CLI session is ready for work in acme/api?