# Set up sim86

You are setting up the sim86 CLI for the user. sim86 runs firmware on
simulated boards in the Simulator86 cloud. The goal: the user sees a real
board running in their browser, started from their terminal, then a test of
it passing. Keep your messages to the user short.

## 1. Install

```
pip install sim86
```

If pip refuses (an "externally managed environment"), use
`pipx install sim86` or `uv tool install sim86`. Check it with
`sim86 --version`.

## 2. Sign in

Skip this if `SIM86_API_KEY` is set in the environment.

```
sim86 login
```

It opens a page in the user's browser and prints a code. Tell the user to
check that the code matches, click Connect, and keep that tab open: it follows
along as you do the steps below, and their board boots there. The command waits up to 10 minutes, so run it with
a long timeout. It prints `✓ signed in` when done. If no browser can open (a
remote machine), show the user the URL it printed.

## 3. Get a working example

```
sim86 init --example pebble
cd pebble
```

This downloads a Pebble 2 Duo smartwatch: its board, the real PebbleOS built
and unmodified, and pytest tests.

## 4. Boot it

```
sim86 start board.json --no-open
```

It prints JSON with the run id. The watch appears by itself in the browser
tab where the user connected. Tell the user to look there: PebbleOS booting on
a simulated watch, every part of it simulated down to the power rails. If they
closed that tab, `sim86 open last` opens the board again. The run stops by
itself after 10 minutes.

## 5. Test it

```
sim86 test -k settings -v
```

It runs PebbleOS's own UI test: it presses through to the Settings screen and
compares every pixel with PebbleOS's golden image. It takes about 30 seconds,
and its run plays in the same browser tab. Tell the user it passed.

## 6. Next

Offer to set up the user's own board: `sim86 init` writes a starter
`board.json` in their project, `sim86 parts <query>` searches the part
catalog, `sim86 check board.json` validates it, and `sim86 --help` lists the
rest.

## If something fails

Show the user the exact error. Don't edit the example's files to make it
pass. If it looks like a problem with sim86 itself, offer to report it with
`sim86 feedback --summary "…"`.
