Skip to main content

openbricks — host-side CLI + MuJoCo-backed simulator for the openbricks MicroPython firmware. Flash, list, run, upload, log; ``openbricks sim`` for the physics simulator.

Project description

openbricks (host CLI + sim)

Host-side tooling for openbricks hubs — same UX as pybricksdev, built on commodity Python tooling (bleak, esptool, mpremote). One package, one console script: openbricks flash / list / run / upload / stop / log. The MuJoCo-backed simulator is built in too — openbricks sim … opens the sim's CLI when the [sim] extra is installed.

Website: https://openbricks.dev · Documentation: https://docs.openbricks.dev

Install

Recommended — with pipx so the CLI lands in an isolated venv and avoids the "externally managed environment" error on modern macOS / Linux distros:

pipx install openbricks            # CLI only (lightweight; bleak / esptool / mpremote)
pipx install 'openbricks[sim]'     # CLI + MuJoCo physics simulator

Plain pip works too:

pip install openbricks
pip install 'openbricks[sim]'

For development against a repo checkout (editable install):

pip install -e 'tools/openbricks[sim]'

[sim] adds mujoco (~50 MB, native OpenGL) and numpy — most users (flash + run + log) don't need it. Without [sim], openbricks sim … prints a helpful "pip install openbricks[sim]" hint instead of crashing.

Note: binary wheels (manylinux, macOS universal2, Windows AMD64; CPython 3.9–3.13) ship on PyPI since 0.10.3, so installs are toolchain-free on common platforms. On anything outside that matrix, pip falls back to the sdist and compiles the bundled native extension (openbricks_sim._native), which needs a C compiler + Python headers.

Commands

flash — program a hub

openbricks flash \
    --name RobotA \
    --port /dev/tty.usbserial-XXXX \
    --firmware native/micropython/ports/esp32/build-openbricks_esp32s3/firmware.bin

Writes the firmware image and bakes the hub's BLE advertising name into NVS. --name is mandatory: two hubs with the same name can't be individually addressed over BLE.

Port syntax: /dev/ttyUSB0 (Linux), /dev/cu.usbserial-* (macOS), COM5 (Windows).

Useful flags: --chip esp32s3, --baud 921600, --skip-erase (faster dev loop, keeps stale NVS).

list — scan for hubs

openbricks list [--timeout 5.0] [--all]

Runs a BLE scan and prints every named device found, sorted by RSSI (strongest first). --all includes unnamed devices too.

run — stage and launch; button stops it; client exits on stop

openbricks run -n RobotA examples/hello.py

Stages the script to /program.py (same target as upload) and triggers the hub's launcher to execute it immediately. Output streams back to your terminal in real time.

  • Button stop. Pressing the hub button while the program runs raises KeyboardInterrupt via the same launcher path upload+button uses. The client sees the clean "stopped by button press" line and exits.
  • Program completion. When the program finishes (or raises), the client disconnects and exits — same as pybricksdev run.
  • Script persists. Because run stages to /program.py, the hub can re-run the last program via a button press without another upload. upload and run differ only in whether the client auto-launches after upload.

Stderr (e.g. exception tracebacks) arrives after stdout and is surfaced with a blank-line separator. No paste-mode === echo — raw-paste mode is clean.

stop — interrupt the running program

openbricks stop -n RobotA

Sends a single Ctrl-C byte over the NUS REPL bridge, which MicroPython surfaces as KeyboardInterrupt. Useful when openbricks run has already exited but the hub's still chewing on a long-running user program.

upload — stage a script; hub button launches it

openbricks upload -n RobotA examples/wander.py

Writes the script to /program.py on the hub. The code does not run automatically. Place your robot, press the program button (GPIO 4), and the program starts. Press again to stop it mid-run.

(Pybricks calls this same operation download from the hub's "download to me" perspective. We name by direction-of-data-travel — bytes flow up to the hub, hence upload.)

This works because the firmware ships a frozen main.py that:

  1. Brings BLE + REPL bridge up immediately (so openbricks run / upload / stop are always reachable, even when no program is running).
  2. Instantiates the board's Hub, which wires the BLE-toggle button (short-press on GPIO 5) with LED feedback.
  3. Watches the program button (GPIO 4) via openbricks.launcher.run() — a short-press runs /program.py, a second short-press raises KeyboardInterrupt in the running program.

Two separate pins (4 for program, 5 for BLE toggle), each handled by short-press only — no duration-based dispatch.

Pass --path /alt.py to stage at a different filename (if you've written your own main.py that reads from there).

Tests

cd tools/openbricks
PYTHONPATH=. python -m unittest discover -s tests -t .

No real hardware needed — esptool, mpremote, and bleak are mocked.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openbricks-1.15.3.tar.gz (17.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

openbricks-1.15.3-cp313-cp313-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.15.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.15.3-cp313-cp313-macosx_10_13_universal2.whl (17.3 MB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

openbricks-1.15.3-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.15.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.15.3-cp312-cp312-macosx_10_13_universal2.whl (17.3 MB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

openbricks-1.15.3-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.15.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.15.3-cp311-cp311-macosx_10_9_universal2.whl (17.3 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

openbricks-1.15.3-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.15.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.15.3-cp310-cp310-macosx_10_9_universal2.whl (17.3 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

openbricks-1.15.3-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.15.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.15.3-cp39-cp39-macosx_10_9_universal2.whl (17.3 MB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file openbricks-1.15.3.tar.gz.

File metadata

  • Download URL: openbricks-1.15.3.tar.gz
  • Upload date:
  • Size: 17.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-1.15.3.tar.gz
Algorithm Hash digest
SHA256 3cd1be70370a3c964b43e717a6dbf4462aa1403aed887d41aa9935feb7aef2dc
MD5 ff846c1f98e54284656f34141b9f59fa
BLAKE2b-256 b93e707e4909cdd4ffbf24062b0c56b8062e04b2aa31a782fc15df8023e5df41

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3.tar.gz:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: openbricks-1.15.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-1.15.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f7f461471310a11f2f4f2eaa012c1611d524270eb098109d20b0b2abe78f3c03
MD5 0b2e1431d645ec7d9c340eca92d3cae2
BLAKE2b-256 39c78dc1edd541a8124bfb0579d3de8b633f383a3741af806baf2843726ca927

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp313-cp313-win_amd64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5213f8e4b8ba2cf0db019aa4416355fe8173e66f5eceac3036dde919d8d69714
MD5 2bf584acff585874d83393323902ec81
BLAKE2b-256 728cdff770dd80bb321946a547988207ab8d0071d77952444c97ae73d58e0598

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.15.3-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a1fd3c2e8e13c34a22dcd0d33961c19eec33f23e2250a444841579ed9a91b3cb
MD5 f9d45b1058fbfc6616bba8fc038d1e1c
BLAKE2b-256 9e097fde844ec22bb6d7778dce43e87b1d7f47f9bd1a7290120b5b53b89935b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp313-cp313-macosx_10_13_universal2.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: openbricks-1.15.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-1.15.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 86f34f320917d188c3c3f83844bcd84a86513bfedd182f39cd75e27a28c3a1d3
MD5 8b1f08714b65d3012e7b82d566e924b9
BLAKE2b-256 8a2028900624535cd59cfdfcf90f525f65d029d324e0251cbd05b50cff755013

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp312-cp312-win_amd64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b79fc209ad1c8a541b1db20e710a76a02d9822bb4a41ba187a12ccdb64dc8b7b
MD5 9cac5b676e9cee66f06089d0e49a4303
BLAKE2b-256 e9efe059eebdb714679ce4fcab0279e65360ccbde06b5445f14b7ef4a4018a9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.15.3-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 419af179c0705a20d17a05a0922f8d893759c03b7a7dd2aaaca04721800a745f
MD5 70581823afd1d21345d096dd333beba2
BLAKE2b-256 34d6d9675ad4b4f53e0424f7311b7e008656c720006196475ebc56808c73b035

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp312-cp312-macosx_10_13_universal2.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: openbricks-1.15.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-1.15.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5df680c2c33d1e174901f7774736c5fa70bbeccf115392e3c187449f4d8f8254
MD5 e55b44e8d5d6868ed238051cd5bf5167
BLAKE2b-256 520feae8caa0a55ffa0956df37cd19ce3ad1ad0f46687a6cc0fe87900aa1f03a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp311-cp311-win_amd64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d87acf9b526296fec869c2edb609071e0f2c4164695d016159b9dd175f25ae2d
MD5 05ef06c1b64ffd0578afae1ad18b8149
BLAKE2b-256 972e7205a9794520aa0087d09f638573bb573a737e5c4bb8e763f33f0aac7c8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.15.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 557d70cba8a024b180be0595b29da2e6748e26caaf70cbd7b5e30f46ceee010b
MD5 ffc6844868df3d87b8dddfc96a9448fb
BLAKE2b-256 64eb590d10a10613c3787372f1a06b51fb7d91fc62d40d4745ed109d30379779

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp311-cp311-macosx_10_9_universal2.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: openbricks-1.15.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-1.15.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 456d74b916484d781294eca847889202fbb30c974344152b1dcbdf0131fd4725
MD5 8541478832e7603992764aaf6aa38294
BLAKE2b-256 e9abbb10df8829d79de38081f402f49ff40c811635c53dbc49e6f5a38d70ddd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp310-cp310-win_amd64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4abeb936f60555e14a4c6f8c6fc14e8d646a249c2584c85d052978e2e39306d5
MD5 f7073bc2689f4a778345e721c302bb88
BLAKE2b-256 8b73a333a2ac1d117edc7d73d4b8dc4b4fb43036c109dde3ddb244daeaf2c6c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.15.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f70c748ac0e3b24b935bab34ed1b39a930ba7a7d8092a666d001f0e9f6b80113
MD5 24b04e3fe354adf047e9e0f3dd564727
BLAKE2b-256 581168109bfe8bac5a93c10f11cf59956d0b7cdb892abdc422364a946ca5ef3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp310-cp310-macosx_10_9_universal2.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: openbricks-1.15.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-1.15.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4028b61dfeafa95ca46549fff7c34c4f7854580a0fbffdde0956fe02167b942c
MD5 949093d37b7d8093145c3d80c0d969ca
BLAKE2b-256 a6457d88996c8e1404cfa5c2dc6528cc70c844604f8d4f0a543b02bbbf63cf37

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp39-cp39-win_amd64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.15.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 52881b01bc8319b26c1a941274d105a9de59c46ebdc301a7922181c31b2f2d41
MD5 42e97b5efdca43f64f409f6d8ea3600e
BLAKE2b-256 b12a5aec0dc5b33cbc240bfe6575d7964cd7a5629e294c278a2a3a0b9e771575

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openbricks-1.15.3-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.15.3-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 411e8cc88c6390563433a9ff3c8c7edd485d9623cf25d777833490c15b0d8d71
MD5 a9a89cd19fec3a982d5f8428625e6106
BLAKE2b-256 1169490b2da580d8e3758b2186ae8e373bf7d57825da1edfc61d66bf8233933e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.3-cp39-cp39-macosx_10_9_universal2.whl:

Publisher: ci.yaml on 1e0ng/openbricks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page