Skip to main content

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.

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.44.0.tar.gz (3.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.44.0-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.44.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.44.0-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.44.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.44.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.44.0-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.44.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.44.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.44.0-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.44.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.44.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.44.0-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.44.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.44.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.44.0-cp39-cp39-macosx_10_9_universal2.whl (3.2 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-1.44.0.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.44.0.tar.gz
Algorithm Hash digest
SHA256 796822530f34e51b8e39e59080dfee0c74d25db1face44d9246be0410115432b
MD5 6ae6ed11b54dbe071eb485835e593cca
BLAKE2b-256 0ee306808515b9aaa13fd63d5aae4333f4b4bbfff2ed1c09e226f03015748ce3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0.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.44.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8ef83743e93845435d34207af170a82447d781ca190e3d5a7931614e142cfe22
MD5 a6603171e492b2054a020b6c9fdb412e
BLAKE2b-256 2767058d5456ceb180eef8dc843b248826773fe6625341d8c6e496ad7947d188

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9314baba964f900965987f005c2a02a57728d5aec2c671cc247872bb9cb34866
MD5 b1db1593acffeb27bd4445b5a6738b37
BLAKE2b-256 c20a54033c98a8118b34d1bc0d68e28a97bb3000c2184f5b6c944fcc8af94f47

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7a342fcdffc0b40302e11e5aae638cb7261282b88ce0830a3324b37c165abe48
MD5 dde7c9eade3bf234b6d1d28288596156
BLAKE2b-256 c410e9e8ed081bc3e460d0b4867ad814917b727a25df9631771a5694799594ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 574d661eb25bb39fb6cfe974665bb1563c5b95ba21c25aa8354f499b70aef471
MD5 3dcc8af4e038b20251d04bf46042f718
BLAKE2b-256 824347d673fde1ff681de26a9cbcf6da4f741ead6c2cd24c9091f56c39ab9ce2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e986befc1bea94a5cb19376ce0d2bfef8811791284529463aadb302a586fdca2
MD5 4a4129b924ae8f8f261cef9dc998f815
BLAKE2b-256 431ba4c9b66d51e11bb693430e6331c4d8b1e6cfa893714a4fab11f76f9d2966

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d3b0d867b15b71f4829e0ed7b3285bacba61398a2ff7c6262b8dbaf8f05ec530
MD5 a6ef0f5eeef3486aad4075ada34c601c
BLAKE2b-256 9d89175e7bae7dee8d391e389c6d4c70d6cea5137b431d831626954ef5979ec8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1870fb1a6365e43cb7046971f5d267fe21ab5b46dffcd48a7e8f338b1ca453d7
MD5 e4d8998bbd7d4994748377047b2ee64a
BLAKE2b-256 f8cf36f39bd9c2370ad792009f1e53b788e531a0336de93782b08aa9b5b774b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 46bf697c7fbcc946ffe270c786087caf4a543a4881489b3af22743dec674367e
MD5 56e6ececd70562f9446905424b8e0dd2
BLAKE2b-256 182452505c3d3008d24b46e242638ca65b6dff7d25eeef1b9c4e470f70ab27ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 184e76f39004715bdfbe363165d32a75ba26fa3f8a271bb2cab6a652546454fd
MD5 d96bfce5916b80533e3f985e93b23b71
BLAKE2b-256 c3a52c22f0d9d8b9334429738706c5722b76b8892df6f6abd1607d6dbff4ed1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b5e30c32ac6703b5f122585f3c9aafac240b4f4902880f0193bbc97c9b0f3790
MD5 22602aa0ae9e80af3b72fbb795a24fef
BLAKE2b-256 ab04d99c090fb0c024434700de2cf79dd4f0bd38878ad6de807d87a4734f675d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2f6babf9280938ff2255cc39fb2c1e6e80dd609b22d4cabe94cea70032f88e9e
MD5 2b504a82f2d996f1543d17a9fbde2b95
BLAKE2b-256 2aa7cbe23a789b916235ec91dcb0be9c7577487dc4f2c5ca718ae4f9720d4016

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a73ecbd04ec38b5574c7202638f73da30d7d84e17e63201ca6b2639d0304a638
MD5 f0b4c6f068fc2ddc1266467f278ea6bc
BLAKE2b-256 35f8127d3ded2855574009086dbc3f287b931dfd294b378e8f1e48379d877965

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: openbricks-1.44.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.44.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 266dfba1bb6b9a6690ef4dee7b30ed2a3b1a7d34885e952d076aeeeee3a5f709
MD5 5ec7c3b70b6e164e1e7b9964e26517e8
BLAKE2b-256 251ffaa39d9bd5669364aa89b41886bb44f5ec7f154894017c33dbe097cf02b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2b563f2ec673f9b4c1ceb9b56ddb26f6d59aa13c1d05f60c52109d25323440b0
MD5 646078fb75d3d14f767173080ae4bd0f
BLAKE2b-256 6c85bddc2db489464e69757d8b140c4c5d5c145d938fcfe1d888a2cdab372dd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.44.0-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-1.44.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 88ff061bef4a2941244e671b04b85c39fc3646cceb4d2f86e0623a51da7e98bd
MD5 1ef0d30ccf8e1ae56547a1661e633c98
BLAKE2b-256 b487b1ff2d3319566d5e336eb5d6cbcb82af47a9011711be2fe845d6864d72ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.44.0-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.

Release history Release notifications | RSS feed

Supported by

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