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

Uploaded CPython 3.13Windows x86-64

openbricks-1.36.1-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.36.1-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.36.1-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.36.1-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.36.1-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.36.1-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.36.1-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.36.1-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.36.1-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.36.1-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.36.1.tar.gz.

File metadata

  • Download URL: openbricks-1.36.1.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.36.1.tar.gz
Algorithm Hash digest
SHA256 f6ff1e0e1ad09551f990080dc2fb5657aa9b712398093c17320b44918cc9bbc8
MD5 4a865c2a7b1b5e23c10e7e1d296692fb
BLAKE2b-256 52e826aee231551731e2789111f5bda4f55f37d4b0d2411eeb8e8fb35f2171b8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ae1c9b327626c5c0d59cbd5b49336db689718c3e04df1798389674acb12587ca
MD5 819b4ffbc6f2822ca669e30bc9ebfd5e
BLAKE2b-256 5691f10c01158fa06a20f7e90202244173621083b9f421d1e36abf946519d819

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.36.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.36.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.36.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f0d9e87ee51cbb3d4a7c29ca182f8c698aadd8787dcff8558f1e8c848abc0e97
MD5 bbfb36ef0192a38aa4f8aa4a89ecfb45
BLAKE2b-256 2bd53c635b28c161ec67b3bf27140b0e63410b0045af6ee38e186261cd63606f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 82a9bafd042c2e6327b3045f438986a583e6e81f1acfbecaa7ab863776350fa6
MD5 049107176e9e79ebe2ee524a56137354
BLAKE2b-256 498fb746e32576fa765452fece683f26dddcb8bb7129505cd209693602e2ada9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 811a5133ef5b7213eaac9a15706e0e3ea5b54c140cb79a9734f6ed6a54f5ff2f
MD5 fd2aebc5de2e3e47f231b1dc392da34b
BLAKE2b-256 2dee0ed11fb9729d484625807a2f45e0d02308fb748d941a928407bdac8d3032

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.36.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.36.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.36.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1c53f0213c1aeb9e32861cf801771b7c0e8ebc8b2e62fb94e1fd1cefd442ced7
MD5 f73d56c6b96b264a24da88d60ea8e563
BLAKE2b-256 b8e69aa569273fb6b589703374a7df66d0e70ff5497a0fe9ff5ad9a00f29683c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 6b5668e795c57a6a8681580c68fd338bbf7d8cbbe926a36034e48f02f905d229
MD5 73a76c5144f8935a504fdf819c79c42c
BLAKE2b-256 b2b50670a4a7cb3c924e4cc7fea9144bc0ab4df8a601f1412187b67a3ea91104

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f532de999af35de8fcc43dd99fafb93974f7e46cc8ff853fce034f76372c383b
MD5 96489ad6375d00e11ed250b9095d87a3
BLAKE2b-256 b87667b7ca3c93a0f22cc4d74b704aa84049eb87eab97edb382d4644f4883d84

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.36.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.36.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.36.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 025534e881273222240f5bcde081dc73268ceb840a02853d34798e6fe32bfc20
MD5 728203169e39dc27d43a2b3c15650eeb
BLAKE2b-256 e7e29fbba2aaf0e2a282e8f671170f42867425dbde6371314837ada3d7a5115d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 21f2916d3fe0f2166905cbf4769a3e4b71190ebeb9d8cbcb314c70c1be62a621
MD5 ff1d13b0c6727c03bb2916c1f93576c7
BLAKE2b-256 7ba696e4f8b0a7451fa2304a545b46c0ad33bcf490338084b4ed0257fee0ea9e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 07b43d3396be59a58305bba236f16e5dd158630d6787379216beb74427d57c90
MD5 b3d4a3c00ada65feefbff2d9eaacf3bb
BLAKE2b-256 68a693dfa323d74760348d40314d8b657554af065bbb673f93cc6e4d8654c9d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.36.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.36.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.36.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9189ca43d18c80e46bd6b58ff070923c8eef00ca6d8a1db1768068d703295d57
MD5 de60106449b8eccd0de38bdd9b3b885d
BLAKE2b-256 5881a6c87ad831012b7bb278b08e7667000985ac5a7fa7941e13d9ccb592e7c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 92e7f291e566a5e6229a48763c34333c358b8491b29f1a56b123682eaaf71d5c
MD5 03e210cc9983869dd6d574c896e88a4d
BLAKE2b-256 3b9714e65c47da788c3b72108c8a3b56a3b6a395d0cc9b87dc4a09d081a3baff

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.36.1-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.36.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c80109b06e53e5b277afa32ad6f9dd539d27bdcb889407adecac08fca25a21d6
MD5 075ea64649118377dd6b927dbe22279b
BLAKE2b-256 cc4fe29a4c511d75ff5374d071582e2177d1208799ec91728a2d5a368b68bd4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.36.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.36.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.36.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 eb97b04d65cd762a3806bcadc625d27dafa9a4d90edbae9a65e94077b9d70902
MD5 7006b6c81c08eda75648502fa35c972b
BLAKE2b-256 dae5f7bbfe89fb1727304f048a37e77271c1fac645abaf406573e127620af247

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 155a1ba8f5b2355e61b4471b8d278f11af66d158e9f1ad68ff0d1f6226c1131b
MD5 1440cdb7abbd061702175fbde3759753
BLAKE2b-256 ab271b214951b4214c14074f2990d3e74d09276e6b6c3325337af6d494b481e4

See more details on using hashes here.

Provenance

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