# Cursor

URL: https://docs.hanzo.ai/docs/guides/coding/cursor

> What `hanzo --cursor` does for Cursor's agent CLI: it starts it and links the session, and routes and meters nothing.

## Set up

```bash
curl -fsSL hanzo.sh | sh
hanzo login
hanzo --cursor
```

This runs Cursor's agent CLI as `cursor-agent`, never a bare `agent`: xAI's Grok installer links an `agent` of its own. Install and sign in to it first, as you would to use it alone. `agent` and `cursor-agent` are accepted spellings of `cursor`.

## What the wrapper does

Cursor keeps its own login and its own backend. `hanzo --cursor` has no gateway route for it, so it always runs on Cursor's account, with or without `--cloud`. The wrapper:

- starts the binary in your repository, with `--force` so it stops asking before each action; `--ask` leaves its own prompts in place;
- for a task (`hanzo --cursor "fix the failing test"`), runs it with `--print` and prints what the agent prints; when the session is linked it asks for `--output-format stream-json` and streams the assistant's messages and the final result to the cloud;
- registers the session in the cloud with its machine and directory, and updates its status when the tool exits. An interactive run is Cursor's own screen, so its events are not streamed;
- passes any other flags through to the tool unchanged.

## What it does not do

- **No routing.** Cursor's model calls do not go through api.hanzo.ai, and Hanzo does not see them.
- **No metering.** Nothing is counted into your org's usage. The end-of-session block prints the duration and the session link, and says Cursor ran on its own account.
- **No Hanzo toolset for one run.** Cursor takes no MCP server for a single run, and the summary says so. Add it once to `~/.cursor/mcp.json` and the editor and `cursor-agent` both load it: [Desktop apps and editors](https://docs.hanzo.ai/docs/guides/coding/desktop).
- **No resume.** The tool discloses no session id to the wrapper, so `hanzo --resume` has nothing to continue.

## See the session

```bash
hanzo console          # sessions and machines; press 6 for the usage Savings page
```

The Savings page shows your org's usage from other tools, not Cursor's. [How to read the numbers →](https://docs.hanzo.ai/docs/guides/coding)

## Keep your own plan

There is nothing to turn off: Cursor already runs on its own. `--no-link` stops the session being shown in the cloud.
