# Use the desktop app

> Write code for your robot, run it on the twin, arm it on the hub and train on a cloud GPU, with an agent beside you.

Prompt for your AI: Read https://mousemouse.ai/docs/ide.md first. Help me set up the MouseMouse desktop app and run my first script on the robot's twin. Ask me before anything that costs money or moves a robot.

MouseMouse is also a desktop app for Mac: an editor with your robot in it. You
write code for the robot, run it on its twin, see what the safety layer did on
the line that caused it, and run it on the real arm once you arm it on the hub.
An agent works beside you. It can read, write and run what you allow, and it
cannot arm a robot or spend money for you.

## Get it

[The download page](/download) has the current build, or says when none is
published yet. The build is an **unsigned preview**: Apple has not checked it yet. Check the file before you open it. Its
SHA-256 must be the one on the download page:

```bash
shasum -a 256 MouseMouse-0.1.0-arm64.dmg
```

Drag MouseMouse to Applications and open it. The first time, macOS says it
could not verify the app: choose **Done**. Then open **System Settings**, then
**Privacy & Security**. Under **Security**, choose **Open Anyway** beside
MouseMouse and confirm with your password. macOS asks this once. The button
stays for about an hour after you try to open the app.

## Sign in

Choose **Sign in** on the welcome page, or click the initials at the top right.
The hub's page opens in your browser and names the app and this computer, as the
app reported them. Approve it only if you just clicked **Sign in** in
MouseMouse, then choose **Sign in this app**. The browser hands the app a
one-time code on this computer, and only the app that opened the page can use
it. The app keeps its key in your Mac's keychain and renews it each week while
you use it. Revoke it under API keys on the hub to sign the app out.

## Your robot, its twin, and arming

Start the bridge on the computer the robot is plugged into, as [Connect your
robot](/docs/connect-your-robot) shows. The title bar then reads **▶ · the
robot · Sim | Real**. **Sim** runs your code on the twin, and every clamp lands
on the line of code that caused it.

**Real** opens the arming tab: what can move, the limits, the window. Its button
opens the hub's page in your browser, with a QR code for your phone. You arm it
there, once, signed in. The window then shows one orange bar with the time
left, **Disarm** and **E-STOP**. **Esc Esc** stops the robot from anywhere in
the app.

## Training on a cloud GPU

**Run on a cloud GPU** (in the Jobs list, or from the agent) uploads the
project and prices every GPU before anything starts. You pick a tier and press
**Start**; nothing is spent until you do. The job opens as a tab: the loss
curve, the checkpoints as they land, and **Test on twin** for each one. Its log
streams in the **Jobs** tab below.

## The agent

The agent sits on the right. It asks before it writes a file or runs a command,
once or always for this project. It never writes the app's own records, the
editor's settings or Git's internals. It can offer a cloud job and ask you to
arm the robot; you start the one and arm the other. What it reads from the web,
a paper, a job's log or another program comes to it marked as data, never as
instructions.

## Build it yourself

From a checkout of the hub, the app is Code - OSS at a pinned tag plus a few
small patches (`apps/ide/patches/`). The first build clones and compiles into
`~/.cache/mousemouse-build` and takes about fifteen minutes. After a change to
the built-in extension, this refreshes the last build and makes a new .dmg:

```bash
apps/ide/build.sh --app-only
```
