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

Uploaded CPython 3.13Windows x86-64

openbricks-2.4.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

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

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-2.4.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

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

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-2.4.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

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

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-2.4.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-2.4.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-2.4.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-2.4.0.tar.gz.

File metadata

  • Download URL: openbricks-2.4.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-2.4.0.tar.gz
Algorithm Hash digest
SHA256 44bba1b9fad789ada0d3675f42af35da05376c3db4dd17f176ce2fe4fc183332
MD5 de05125c2d8695e6ba0761c4bf3476e9
BLAKE2b-256 725bc5d21c00393226ccef9164a781801fb50cea81c8934a30b73083b24114c7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.4.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a2e306595a00e75345638efa893b7205f65824b84360ea79b307b8b0869940ed
MD5 11f2a5ef7e5cda900531b71e1b7f67c8
BLAKE2b-256 ac598968494fef87bf24b6fe05df48ad9b6c9a52fa1bc7edc55107319b5c8eca

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.4.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ef4ad4c1f5d1b080aedb46bf05454967ec56b5839059681259e74c0b4e917c6e
MD5 0faa9a2ba7057c8acfaad5cd2c618637
BLAKE2b-256 17a03fc045b6de2e646c31dd068a4d6fbdd9a0502046f1a3afa2b876152abb16

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.4.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 27e98ec24402b1bc0712089f0248d32c2deeb43ec04c39134642964733840523
MD5 c6b4e106a8d3a390120085e2bcd815ad
BLAKE2b-256 a213bc4208033baa0d81a617a0d0d332de5a8eae3d8bf4c37b235069e888c2fe

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.4.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fbaa2a7499e513300ad5a64461ac73a8217d41d3aed3a7f4df91923262f977e8
MD5 08b18442d9680aa5a9188790e3783a80
BLAKE2b-256 fd1d5d540822e47aee1053d80996569ddf2f9dd894a5118a91627881062559ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.4.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 01eb34fb73d611f1b7e8ccf1097c4dde6efd8a58e57de7f4f55ea80a63d38216
MD5 25d38017af578b113ee12b0b060f5aed
BLAKE2b-256 aa1a108b5e4ce8bbeebb03d032393f67484bd63636156f931b555b86aa10f8be

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.4.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 9c15dd9783320151a825ab9cff2468d6aacfcb548524f8f4ccb80fd194de184d
MD5 dd820fb643ccd05e4f3e3b6c5e0d047b
BLAKE2b-256 52c5de1f542e2105e66bdbf630a1430928f42d58d9b313598e6bf1c35637b1fa

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.4.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7864e08005f1d4c4fe45c229f76352f76ccc3202b01299619e6721843141c975
MD5 dcf2f569a37a028c3f7c6cf8691d990b
BLAKE2b-256 8430fb3000b01bc88dd98084030138dfdfcc6418e07851a66270e9b9735d82f6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.4.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7da9ff72ea8dfe74ab7708dea5c9dcf4415520e73e5697d86064e733bb60ba42
MD5 2a0b30892bb5de6222a742e503b97a36
BLAKE2b-256 ff3f6faced68fdab681a1d429100eab1cdf05e12580419d5002e309276b634fa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.4.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 163163fffad4f385eaf51839b960dd7d36e14e3cf2e4118c8d573935c5188fdf
MD5 d6b47c705b4542e6a0d1ff1878fee46d
BLAKE2b-256 c1b25a5150ec2a535422a14145c6eb4e8d830def74bba205404c099508266a64

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.4.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 143a33ae0a77802232de5e56fdf0b1a24ae22077e3085a4523121f308f521c1d
MD5 282a1b074687ac78857e10b2670a4e3c
BLAKE2b-256 a93705fc25875a43308a3bcea8d9a68a3aa549c262ccb0d4f7773d9b5eabd0cf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.4.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 63ee4d8409410122ada06ca1af5d8dc762a1569af897438c3464ebb0b45848bb
MD5 3089f35ad2effd1accfbdd98f53937cf
BLAKE2b-256 32e829093ba0c847bf91d48417ad7351bbeb22f15449aab8857d9754b7d1b71a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.4.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 df960c4b9954fac8214017f07ff8383563185b25abc57fb3e386d874178403a9
MD5 04006fd8a9a0cc1c16048846e33fd0f4
BLAKE2b-256 4ee22d570f9fed228ddcacdf48823b90acfa600c334a49f6e20d8b3aca90118c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.4.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-2.4.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 80ccd120c511e91d1711c3349f330f34545692d0691249f1b2b9c23a55e44520
MD5 5bfc8b740e2f1676af652284cf291be0
BLAKE2b-256 1e75ee94e85f177c1d9ed863d96bedbe13e1f64e903d73727b3d43e3ef09925f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.4.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a7838cc27cc95743b6bacd7beb47484432215877f1966454d4875c74df0d6d97
MD5 7502a3b74c62ccdd5518fda48a9687fc
BLAKE2b-256 31ea8daf7e22847fce5d5d252877151486278e125197ce0077c75f97d04b51fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.4.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7bc97c55d0a2e3b19811c29a35a64508f235c76d35025173547a93143e4d44cf
MD5 59623191747646a44386ece553b48f45
BLAKE2b-256 104df8cc12a01f6c8f6a536298492dfdc3ab973fbaeb9317565aec8abaa4c78f

See more details on using hashes here.

Provenance

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