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

Uploaded CPython 3.13Windows x86-64

openbricks-1.85.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.85.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.85.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.85.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.85.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.85.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.85.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.85.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.85.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.85.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.85.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.85.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.85.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.85.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.85.0.tar.gz.

File metadata

  • Download URL: openbricks-1.85.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.85.0.tar.gz
Algorithm Hash digest
SHA256 132547cd6d7a5b3c1a50d63dcd48c56a57c21747759029a74cd0494d65e74b72
MD5 5bf925eaca1c729eb67aa858797cc9df
BLAKE2b-256 c1e280298ec2167e2a9da6deb480e9a61980d8526dccbd3d6f7475a36c87fd30

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 daebc06b0471229f6f767afb478f9ac14f3ec9c951b1178afa0856252d71f858
MD5 e336618d838a31a732fdc2ca81301b0a
BLAKE2b-256 4a1e0e73123e8d58148d2166ec10f011624454234e2f5ad2fe838fe4740b26ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.85.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.85.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.85.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 062357649e5c0e8a5350cef06dc1fa09a9939336fe2ccc685db13c11d997d838
MD5 95efc26a82fa6d494887f1a84cee4af3
BLAKE2b-256 ea79e3c82b0992e105f1ee495e67093f79f47ae19853e067a9c0b65cb6bb3e8f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ab4049c673f1b762cc1e5cadb4b8af78381639a196a2965a4d8961d838fc25f8
MD5 9892e11c8582959e1f692f118302362e
BLAKE2b-256 ffedd698e5c76d10ddc03d44c48fda541e357e7fe0dc7e1eb11f79b4cbf1a08e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ff793047ade95fd8c6fec80fb605fc0398dfec5fc5b1c310fad65773eb9fd731
MD5 096d8e9cb63bdbc1af28c6736cd60853
BLAKE2b-256 8cbd4192c2e7b79f67e045fab5ef2f648273918b2fd4ad01ed5712824544bec8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.85.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.85.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.85.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 09605dba6e1d7ed60fae80ea29352c7d514c426097ee589f24ea7acf73f03595
MD5 7e1868a9dda7dd6620bce2d50e66fe5b
BLAKE2b-256 5941601066922bee69a40a7c3fea4ba10f3051b8eb35664a1c4a067c45130982

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 aa08e40146dbd0f91aff5eade21becf8ffea7b2e15aa68c1b54a770d1b96dcb6
MD5 2cf9c0f2fca1fc2671badf9b4bbb0d38
BLAKE2b-256 da5a1855125637466a14fc199b2320fc8f0769da636b3a60a3c0ccfc8a02e12c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e9e41ed41d1ddf5d64d38532026762883b60fd30e1dca42e37894abaee60896d
MD5 48c7e877cbd9966d28267240cf9d11f2
BLAKE2b-256 ecfc43601724608217b5f98fe0709a411e4e4a048f21067aa1d4e99c613502c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.85.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.85.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.85.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fb44725c3aad80d08020e10357e20a6bdcfb02d6a694bc577871d96622cf5d1a
MD5 ce6aceaabff45beda5313af13cf6350e
BLAKE2b-256 e7d734a39647b07c21e5a6563c3a7313b4e96dfe77dfa68f00c4c7e06914c321

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d7353b4da4c5427b1c57b242d7dd5048c3a4f9bd8037b03e5674003e3835025d
MD5 9ba9ae8ad4d39a1415a03adb624626c5
BLAKE2b-256 fefb8f4be6eb6491e3b0030da1eca949c1a43179746fe1dfc422c6e163464cf8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 31c3470705734d89161a093ef21be852d12c157da99c12a3e54e30a78a6abfd0
MD5 118811652cf6163428def532563ee97d
BLAKE2b-256 a5f8ba4c4b3cd6c31f3f91e503fc0000034fbe28afd43772729789c08146da29

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.85.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.85.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.85.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 09d6c87f643826eeb2fd70a3b2a0b91ab98c0e695c174759781f2a74aed3fdbc
MD5 b95ecfe6d7f0d689fe9223de4096f2ca
BLAKE2b-256 85f3164e6b055b1235eac8ee83cf5bf645c52a1a7751d9fd3e1534bcc7de9181

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 aed247c9f2365624068c243780ea89fe5fd70b4179d12303d70d3b541f5cacc5
MD5 d57c7a2139019cffdd2adb5926a0742a
BLAKE2b-256 73213fca06cddf01acf4b6e71944ff2a5d3492862394a9c147728372002cb1c5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.85.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.85.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6554442bf78db30cf1b155409d42f3b62f7dbc5a0eb82bec77f7392c44c9da04
MD5 9c7833c85a51f15794d58fdaa20edbe4
BLAKE2b-256 ea9503300859f255aa9e4569ec9e95dbc716ee1720ca3ea052ecbc62e8c2bb54

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.85.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.85.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.85.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 afbecd3c27cc3e37c215762363d173b42ef0b305056f5443672ccd16e185ff5e
MD5 81c7d32f8d0e532faa4f6892bc15b9fb
BLAKE2b-256 7cbde1b5aa40bf950c8e02d872765af21742d674adeaf761836c2a1a6d42c1f8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3f1340cb58b75fdd7796935b4d47b6f8b86a981d9381ac6dee0b1dc5158e552c
MD5 73256322971a9503cd9d1ad3a58b162b
BLAKE2b-256 2f71c4e58351069ac4fe529f5ebf75a4a8bbcaca77433db83a423d2f8cae5e43

See more details on using hashes here.

Provenance

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