Metadata-Version: 2.5
Name: sim86
Version: 0.1.4
Summary: Run firmware on simulated boards in the Simulator86 cloud: CLI, pytest plugin, fault injection.
Project-URL: Homepage, https://sim86.com
Project-URL: Documentation, https://docs.sim86.com
Author: Simulator86
License: Proprietary
Classifier: Framework :: Pytest
Classifier: Topic :: Software Development :: Embedded Systems
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.9
Requires-Dist: certifi
Requires-Dist: pytest>=8
Requires-Dist: websockets>=13
Description-Content-Type: text/markdown

# sim86

Run your firmware on simulated boards in the cloud, test it with pytest, and
break the hardware on purpose to see what your firmware does.

![sim86 fetching an example board, starting it and running a test that passes](https://sim86.com/pypi/terminal.png)

## Install

```
pip install sim86
sim86 login
```

`sim86 login` signs you in through your browser. On a machine without one,
set `SIM86_API_KEY` (create a key at **app.sim86.com → Cloud → API keys**).

## Try a working board

```
sim86 init --example pebble
cd pebble
sim86 start board.json
sim86 test -k settings -v
```

A Pebble 2 Duo smartwatch running the real PebbleOS, live in your browser, and
PebbleOS's own UI test: every pixel of the Settings screen against its golden
image.

Or paste this into a coding agent: *Set up sim86 for me by following
https://sim86.com/start.md*

## Test it, then break it

```python
def test_sensor_survives_a_shorted_sda(board):
    board["mcu"].serial.wait_for("ready", ms=2000)

    board.until(edge="sensor.SCL", kind="falling", nth=3)  # mid-transaction
    fault = board.short("sensor.SDA", "gnd")               # SDA stuck low
    board.advance("5ms")
    board.clear(fault)

    board["mcu"].serial.wait_for("sensor ok", ms=1000)     # it must recover
```

Each test gets its own run of your board. Run them on your machine or in CI
with `sim86 test`.

## Docs

Board files, driving a board from the shell, every test and fault API, and
CI setup: **[docs.sim86.com/guides/cli](https://docs.sim86.com/guides/cli/)**
