> getting started

Install the Cursor CLI, get it on your PATH, and authenticate. The one-line installer drops a self-updating binary into ~/.local/bin under two names — cursor-agent and the shorter agent — so either command works. Interactive use logs in through the browser; scripts and CI authenticate with a CURSOR_API_KEY instead.

// getting started

7 commands

// faq

Is the command called cursor-agent or agent?

Both. The installer creates two symlinks in ~/.local/bin pointing at the same executable: cursor-agent (the original name, still fully supported) and agent (the shorter name current docs prefer). Use whichever you like — they behave identically. cursor-agent is the more searchable, unambiguous one, which is why this reference uses it.

Why do I get "cursor-agent: command not found" after installing?

The binary installs to ~/.local/bin, which is not on everyone's PATH. Add export PATH="$HOME/.local/bin:$PATH" to your shell rc file and reload it, or just open a new terminal. Editing the rc file does not affect shells that are already running.

Is the Cursor CLI free?

The CLI itself is free to install, but it runs models through your Cursor account and consumes the same usage as the editor. You need to be signed in (browser login) or supply an API key, and model calls draw down your plan's included usage or pay-as-you-go budget.

How do I authenticate in CI where there is no browser?

Generate a user API key in the Cursor dashboard, store it as a secret, and expose it as the CURSOR_API_KEY environment variable. The CLI picks it up automatically. Over SSH you can also run NO_OPEN_BROWSER=1 cursor-agent login to get a URL you open elsewhere.

Does the CLI update itself?

Yes, it auto-updates in the background by default. Run cursor-agent update to force the latest build immediately, and cursor-agent --version to check what you are on. The channel field in cli-config.json controls which release channel updates come from.