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.77.1.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.77.1-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.77.1-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.77.1-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.77.1-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.77.1-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.77.1-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.77.1-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.77.1-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.77.1-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.77.1-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.77.1-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.77.1.tar.gz.

File metadata

  • Download URL: openbricks-1.77.1.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.77.1.tar.gz
Algorithm Hash digest
SHA256 816c205641f51ebac2a059c9fe58df5a5547e6861b4e5779b318dfd0e3493fbf
MD5 576d9780687669d2670c4aedacd1dcd2
BLAKE2b-256 9c059aea3c541bf0f1deb2dfc3d0bf01378100b37a38a25cc65431353d16715c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 568a5120b1f9ce687b9191711ccbbf5892b4aa7aaaa82feab84deeff368302fd
MD5 3938c1cab506f8c11f6331b88c23abcc
BLAKE2b-256 a186c52f9a25cfeff2deac126b38301ac52d5200c7df3af093f44286650ecc41

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 49e6aa0adfc46f905a22c83ed579ca97c2824dfad95a4a8ea5aa9fc9bb8a3571
MD5 8cfd7ef6b1426eb13afd90215437146c
BLAKE2b-256 f2cd87c96fb93f700dbd45cdc4da8f2fd692d8889ee0238542972d2b4635426e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 c62b886becf3ecdc3d6d5c964dcc7eaff43554be470c4b85787e79baa51d4581
MD5 88a600041af8d5ce99e30445c121defb
BLAKE2b-256 f374897622c052ea2338d0a6dcf089235c863adcd5f98bf9ed3794685f6a37ab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ac7e73b215c7803543c860dd7fe2073c4884675ed4c9ecea2b2fbdb5998c5443
MD5 e18b999a5d00c7b066a2393226a3893f
BLAKE2b-256 060584f4f65cb6bd781ff88df1cdcc423917d36b292aaaa0a2e2e1e0e2804c77

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 de4309d82865691c9d012da10d766042bb75d4991fce4420bb0f50f61a8fefb2
MD5 9f3ec89f56032ee57f9265c396fad0c6
BLAKE2b-256 70a71363266f5be7e65e76149fad160632dad5a4ced028e2903601d1ca3dcfca

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 143ea76dc2cb59b759bba8239700e373d35a23ed2893a957d6f4372ab0b5fd8f
MD5 8ce324c230d79a2c9985d824002fa1bd
BLAKE2b-256 d7aa921826c20e75408f8bb890d9817135b00d55960c206f5c69ead12a02aa73

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d50fdd0d21fa448cec7b2fd4969417a2b02feaebe38532a7637666ce4c8267af
MD5 d6aa59e5400f6473d8260fae9936cb4d
BLAKE2b-256 1d9a144f817e7c4aa1f0470e670098566b42a5dc26a80044bde2e6b36830bc03

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2b002e023be3b1e8d501ca4ac508db0d49463e41f1a6fadbed1d5f38bfdbdf22
MD5 4eac648eb19ea203fd0cb6e0c9813e44
BLAKE2b-256 3969e2c68d798572f5a8a5383df8953f4fcceec2c7a71a1d7785c5455a9f1834

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ee513379f3c25ebf01951540aef38b37b1a46f5157f86c80bb7f9d971fa91631
MD5 991af88ee27ea20f5aef00b8831ab420
BLAKE2b-256 c04dfe4160371197f24675962aea979f9ae88414aaa26947828e58e6d9603e1d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b244d543b0449571c9a32f1d46b1da7b6b569e68c2b4ed0e572d19c7e33d828c
MD5 34dcdafaaa2f091b37107176eef4cab3
BLAKE2b-256 578efb75b5724e7e8aaf3dc6abfb288b4b3c25e289b1ddba968c2a83ec35fa52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b35fd888aee91df0b952763dc8099d11a299a46b4a86f490d75c9c3073dbb458
MD5 96743977b95a98ffb561dc6f19a256ee
BLAKE2b-256 492ba5c128f406f98d95905be544719f1d9239cf483683c36b7f4f890903cfd4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c8092d23feef13dbdb592cd4b42b018517a84e0488cc40dd04e3b5672e5865fd
MD5 0da05d3ac18e9a0e6ee9c8329025fce3
BLAKE2b-256 b9f2a958611e08b4610b5889fdaec0077a3ecdea0417e18eabe0f78f9f452b6d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.77.1-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.77.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 470a1a8f9f71a73afc121c0f60d517f3c8feaccb30e784f1347755d9781370cc
MD5 946845b2ca1f01f19c9fae8ebf366a61
BLAKE2b-256 3f087b5ba4c443c854a59c0d6a1cc37b338d75ef6e285c48cd6afe0dc8d7c15f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a0f22a35f6b8f355406a37b9b7217a7fd120a476d66f08dc2fa4425cee2a3242
MD5 2464d67941e83c6efbc3bae80d73349a
BLAKE2b-256 a23c219ad37ca12e37632e0436f7caf689c058d94de3dec3201c3feb1c385a68

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.77.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 407eb5d0f31031bb88b8400dc026af27cff76aa74ba85eadc170992d434108b6
MD5 13ad698793b59504d7a32de6e91d5a03
BLAKE2b-256 e506f31d6ad9a8983c7eb300f1ea4011843796e24e2d858bc5c9066a92c62261

See more details on using hashes here.

Provenance

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