# Run the Cursor CLI in the cloud

> Keep Cursor's CLI agent working with your laptop closed: the ways to run it in the cloud, and how to run it on a box that stays on, sign it in, check on it from your phone, and what it costs.

URL: https://prized.dev/docs/run-cursor-cli-in-the-cloud

A sleeping laptop runs nothing, so closing the lid stops the [Cursor CLI](https://cursor.com/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, on Cursor plans that include them ([Cursor's docs](https://cursor.com/docs/cloud-agent)).
* **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. Put your project on a box [#1-put-your-project-on-a-box]

Sign up at [prized.dev](https://prized.dev/sign-in): the tour starts a box on $30 of free credit with no card, then shows one command that installs the CLI and signs this machine in ([Quickstart](https://prized.dev/docs/quickstart)). Then run setup in your project folder:

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

It syncs this 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 Cursor CLI in a tmux session named `cursor`, and opens that session in this terminal. Already have a box? Skip the sign-up and run just the setup.

## 2. Sign in on the box [#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](https://prized.dev/docs/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.

## 3. Close the lid [#3-close-the-lid]

Give the Cursor CLI its task, then close the terminal or the laptop. The session belongs to the box, so it keeps working, and its edits sync to your laptop when it wakes ([Sync](https://prized.dev/docs/sync#offline)). If the session is gone, this starts it again:

```bash
prized agents run cursor --attach --dir code/myproject
```

If the session holds only a shell, as it does when the dashboard's **Cursor CLI** row opened it while the Cursor CLI wasn't running, that command reports the session as already running and starts nothing: run `prized ssh --kill cursor` first.

## 4. Check on it from anywhere [#4-check-on-it-from-anywhere]

* **From a computer:** `prized ssh -s cursor`. On another computer, install the CLI and run `prized login` first.
* **From your phone or any browser:** open the box on the [dashboard](https://prized.dev/dashboard). The arrow beside **Open terminal** lists **Cursor CLI**, which opens the box's terminal in the `cursor` session.

## What it costs [#what-it-costs]

|  | Small (4 vCPU, 16 GB) | Nano (2 vCPU, 2 GB) |
| --- | --- | --- |
| Awake, per hour | $0.137 | $0.014 |
| A 10 hour run overnight | $1.37 | $0.14 |
| How long $30 of free credit lasts, awake around the clock | About nine days | About three months |

Asleep, a box pays only for its disk ([Billing](https://prized.dev/docs/billing)). On the free credit, a box sleeps after 2 hours idle, never in its first 24 hours; the Cursor CLI's output in its tmux session counts as use, so the box stays up while it prints ([Auto-pause](https://prized.dev/docs/boxes#auto-pause)). Nano through Small keep the session through a pause, and `prized box pause` sleeps it at once ([Pause and resume](https://prized.dev/docs/boxes#pause-and-resume)).

Working in the Cursor editor? [Use Cursor or VS Code on a cloud dev box with Remote-SSH](https://prized.dev/docs/cursor-remote-ssh) opens the box in it.
