Fixing the PATH
The installer puts agent in ~/.local/bin. Several Linux distributions already search that directory; macOS generally does not. If the version check above printed command not found, add it yourself and reload the shell.
# zsh, the default shell on macOS
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcTwo failure modes are worth naming, because they look identical from the outside. If ls ~/.local/bin/agent shows nothing, the install failed and re-running it is the fix. If the file is there but the command is not found, the export went into a file your shell does not read. On macOS, login shells read ~/.zprofile while interactive shells read ~/.zshrc, and a line in the wrong one does nothing.
Signing in
agent login opens a browser and links the CLI to the account you already use in the editor. It does not consume an extra seat, and it does not come with a separate usage allowance. Confirm which account you landed on with agent status, which is worth doing if you have both a personal and a work account.
On a machine with no browser, a build runner or a container, use an API key instead. Both of these work:
export CURSOR_API_KEY=...
agent -p "run the test suite and summarise failures"
# or per-invocation
agent --api-key "$CURSOR_API_KEY" -p "..."Keep the key in your CI provider's secret store. It authenticates an agent that can write files and execute shell commands, so it deserves the same care as a deploy token.
Updating
The CLI tries to auto-update so you stay on the current build. When you want to force it, either of these works:
agent update # from the shell
/update # from inside a sessionIn containers, pin behaviour by reinstalling at image build time rather than relying on the updater at runtime, otherwise the version changes underneath a pipeline that was green yesterday.
Making the terminal behave
Multi-line prompts are the first friction most people hit. Pressing Enter sends the message, and the key combination for a newline varies by terminal. Running /setup-terminal once configures the keybinding for the terminal you are in. It is a thirty-second fix that saves a lot of accidentally-sent half-written prompts.
agent install-shell-integration adds integration to ~/.zshrc, and agent uninstall-shell-integration removes it again cleanly, which is the right way to back out rather than editing the file by hand.
Commands transcribed from the official installation page on 25 September 2026.