Sign in

Run the Cursor CLI in the cloud

Updated

Keep Cursor's CLI agent working with your laptop closed: Cursor's Cloud Agents, or the CLI on a box that stays on, signed in there with a link or a QR code, with the permissions to set before you leave it, and what it costs.

On this page5

A sleeping laptop runs nothing, so closing the lid stops the Cursor CLI mid-task. To keep it working, run it on a machine that stays on:

  • Cursor's Cloud Agents. Agents run in isolated VMs Cursor manages, on a clone of your GitHub, GitLab, Azure DevOps or Bitbucket repository, and keep working without your computer. They need a plan that includes them: Premium and higher, Teams, Enterprise, or a legacy paid plan, not Free or Plus (Cursor's docs). To run their commands on your box instead, see Run Cursor Cloud Agents on Prized.
  • The Cursor CLI in tmux on a server you run. You install it, maintain the machine, and move your code there with git.
  • A Prized box. A Linux machine that stays on, with your project folder synced both ways and its ports on your localhost; setup installs the Cursor CLI there and starts it. The steps follow.

1. Install and start it on a box

New to Prized? Sign up: the tour starts a box on $30 of free credit and gives you the command that installs the CLI (Quickstart). Then, in your project folder:

cd ~/code/myproject
prized setup --sync --agent cursor --install-cursor --attach

Setup syncs the folder with ~/code/myproject on the box, runs Cursor's installer there (--install-cursor is your yes to that), copies your Cursor CLI config and MCP servers, starts the CLI in a tmux session named cursor, and opens that session in this terminal.

2. Sign in on the box

Setup copies Cursor's sign-in only where it is a file; on a Mac it lives in the keychain, which Prized never reads, so the box signs in on its own, once (Credentials). Press a key at the Cursor CLI's sign-in screen: it shows a link to open in a browser on any device, and q shows a QR code for your phone. Approve it there; once per box is enough.

From a shell on the box, NO_OPEN_BROWSER=1 agent login prints a sign-in link, and agent status checks it. An MCP server that signs in through a browser needs it once on the box too: agent mcp login with the server's name.

3. Permissions before you leave it

The Cursor CLI asks before it runs a shell command, and a question waits until you come back. Allow the commands a task needs, and deny the ones it must never run, in .cursor/cli.json in your project, which syncs to the box with it (Cursor's docs):

.cursor/cli.json
{
  "permissions": {
    "allow": ["Shell(npm)", "Shell(git)"],
    "deny": ["Shell(rm)"]
  }
}

Shell(…) matches a command's first word, and Read(…) and Write(…) take paths and globs. Rules for every project go in the permissions block of ~/.cursor/cli-config.json; setup copies your laptop's, so rules you already have come along, and a later setup copies it over the box's again. Shift+Tab rotates the session between Agent, Plan and Ask modes; Ask explores the code without changing it (Cursor's modes).

4. Close the lid, and check on it

Give the Cursor CLI its task and close the laptop: the cursor session belongs to the box, and its edits reach your laptop when it wakes (Sync).

  • From a terminal: prized ssh -s cursor. If the session is gone, prized agents run cursor --attach --dir code/myproject starts the CLI again, and agent resume there picks the last chat back up.
  • From your phone: open the box on the dashboard and pick Cursor CLI from the arrow beside Open terminal.

On the free credit an idle box sleeps after 2 hours. The Cursor CLI printing in its session counts as use, and prized box auto-pause BOX off keeps the box up through a quiet stretch of up to 12 hours, and with no limit on a plan or after a top-up (Auto-pause).

What it costs

The Cursor CLI's requests count against your Cursor plan, as on your laptop. Prized bills the box: a Small (4 vCPU, 16 GB) is $0.137 an hour awake, $1.37 for a 10 hour run overnight, and only its disk while it sleeps (Billing).

Working in the Cursor editor? Use Cursor or VS Code on a cloud dev box with Remote-SSH opens the box in it.