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.80.0.tar.gz (3.8 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.80.0-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.80.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.80.0-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.80.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.80.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.80.0-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.80.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.80.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.80.0-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.80.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.80.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.80.0-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.80.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.80.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.80.0-cp39-cp39-macosx_10_9_universal2.whl (3.6 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-1.80.0.tar.gz
Algorithm Hash digest
SHA256 1cf17c3645e8f40baea98976fbe4707b533b984afeb1b7bfcebb179576e2b28f
MD5 6299262e5b7e21462592090f7117c926
BLAKE2b-256 9362c0c9d02f6b354dc0a714b94f776774e521cc6e27a4def600dc8bc2eefe1b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.80.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ab552d9c76a8a9dcb2899957fc59f716fb356c38f0f1c8a24f7018f05df14c15
MD5 ab54898c05b4f35010bc1a14babe0600
BLAKE2b-256 b2f75b2ac1e1715fb42ca97362411aa146b3b049f6219d1c52d5aa984303c184

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.80.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.80.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.80.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e2311c7515aaa417e8605c425f88d61c3f0496d78f77b442171407b508c07302
MD5 488cc8512dcad4110b2219ff99ddf198
BLAKE2b-256 28844363e728e68734c7949a142fd6b1355895b3451b1c25c7be8761817b6e4b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.80.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d305a7a559d86697bedc0b631c0b7c9d951e83e65790d2b899f2b51444115390
MD5 0e2e3b9323ea2302129496f02dcecb5e
BLAKE2b-256 7846bb4e97caae7706ca0e0fc98adc968592554de5ba6b7bff4f5ed80c115a61

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.80.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bf781649ed9214e6d87a5a21ccbe7bcbe1a055946253c77fba7bcec0d008db77
MD5 28d9962637fa17883d5e30dba04e7a49
BLAKE2b-256 796e3f3f71a3963dbab955174f1a277bdeaa1c118519e2a433b58807ecf35ae9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.80.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.80.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.80.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3cf55839bb9012251f951faad20d7288faef9cc42a3657c94e635c1e41c29c58
MD5 eb7c95e06a3976338047daf8c66fe202
BLAKE2b-256 6281905e7d9c3629eee425bde71c1cb2f2b7e8247049bb81a2b6c79031f2d4a0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.80.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3fbb2bdb8d02fa025463dcc35764e13c954892959ff76548008163086eb1862c
MD5 ce67cb593aaef67ba6a3cf1250107e62
BLAKE2b-256 02b41b452af55f3c68fd2cdd2a2c7ca2de0e644678b4a4849b220849df9c4913

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.80.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b5c80328c084ecb8bfa44c573e88f5764319e74b867829ca264d0a9842a7674f
MD5 9f5aabf4207469ebb01ae14d7dde0990
BLAKE2b-256 ef59ea1a0e4a401d212756e9264ab633ed32e3bad36a41a54c7df09f81ca5a0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.80.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.80.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.80.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8354217269e96f7228b03ff19533a8d3b29b88b8043ed05207eeace7d082053e
MD5 8f9ef7be3fa1a294d6ebdf8ed6a7578c
BLAKE2b-256 ca5bc5d8240d25b27bc9901581b1f447e0ad939e46a93a33560ecf9fbac0879b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.80.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 290b06ad00a919fa7c19a43413a336a21a5b4f9098114da34d703a8fc5b462ca
MD5 c244e11bbed9e426c2d6ff0bdc4921a1
BLAKE2b-256 e4f79421830eb3a66fdf6b6e9383a9f540f4c2822744464cbd14feeccb1ad30b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.80.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f9e020759d0a3d0f8fa7e198c10f5e4f8f233a112e93e8b4b0b3f3c0a7213c6b
MD5 95736c314f7d86ce21e0398f20aef990
BLAKE2b-256 a6af7d345a37cc2a5ad5d6bd008eb2b26d001b91dcf1119cd6e765eee66ca785

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.80.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.80.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.80.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0254da1e14221760c7f6a04bf6f101742fee47767a1fc6a07941a69e7a93302d
MD5 a8a70015048d681a041f328804c59886
BLAKE2b-256 dca365cc1a677324b246de3b1d0c12beb8d11e274896463085530c05010ed533

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.80.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3ce76d12adfe76d9f63437cadf401c90d8fcbaf601d25360ffce351193d95382
MD5 87f74472d82596d5953447548721830d
BLAKE2b-256 98a0737391923c0e5785f778ca5991f1b8640f59f29b7191c20ed69415dc373c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.80.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.6 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.80.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 159debfd0ab7de79edddaa39a9c8c3a6a15d711581162e529346f159d22c349f
MD5 3a88eea2ea01fa239568ecc90803ab0d
BLAKE2b-256 0d1eeb6b6bc3f14b35a8168dc318efd135b95e543176fdf402dd8329c6d2142e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.80.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.80.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.80.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 75f301cdecb45ad10bf2378f67bc572c7e99f437024211520b11072a25933227
MD5 02101be42565da5be7a7df9d1ee651a6
BLAKE2b-256 cd0377e5730ca311d89dc86878947400925908414db3d1f662903ec26e8c652b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.80.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d2c72afd147b5051db43164a2a0b75d3954319ebc738e2a65e540519239a95d1
MD5 652ba2aa763d21a638c9d08b4c16e1a8
BLAKE2b-256 b7dd6f919d4907d8955f4a9642018432007727fcdcf54650a82709bc6393f816

See more details on using hashes here.

Provenance

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