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

Uploaded CPython 3.13Windows x86-64

openbricks-1.88.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-1.88.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.88.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.88.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-1.88.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.88.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.88.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-1.88.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.88.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.88.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-1.88.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.88.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.88.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-1.88.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.88.0.tar.gz.

File metadata

  • Download URL: openbricks-1.88.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.88.0.tar.gz
Algorithm Hash digest
SHA256 b3eca496a6724521cf8ec07fdbb3a423c4c4f2ad4f4f5ae57abc4c6cb806d6d9
MD5 8a27ba102ef551d977cb198049a7a746
BLAKE2b-256 7de7113765426a210f0f3a08fadd9bf863eb4eb2e2b3d10f0ffad5e7c3fa71e0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b4ba13cf667f55b80129be0fdc600bde6d55c6ca3a6994b912f72e28ef482775
MD5 70f232a240ef732c7b3a74d5f696e820
BLAKE2b-256 3d6ee0cb7b9b9e9c969f042d6366bce39401f9316945f4abc9394b15bb15b649

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.88.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.88.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.88.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fb4f82567f7dac90e34eb9950e69f95cdfe2ba935cd4446ff328e8c9c2c0e514
MD5 986c39e500fe5041509efc562b58c72c
BLAKE2b-256 03802872484bc6889c173064083717eea77cad472914911b1da27d97e67565db

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 167e0e1179692deecdbc4dbce4975f9062c4c5db791e68710c9bda5c7fe4f895
MD5 3229888be1e4cc2ca3acd1cab81eefd9
BLAKE2b-256 cd120fcdbb8690a756d83e1f11d599400ce0520a64915f75b493f318596fcef8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4bd56470d8c385275af5514aaa579f6b84aa282103767a8e9fe61b88adbaa321
MD5 a3c971dff239df05b251879ff5eebd7f
BLAKE2b-256 3d63f379c4c05a51ddd594f730d3cafa7f38ec9d0aac03bf055eca99c7b1ef61

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.88.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.88.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.88.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f5ae7940649735bbf65afce019904d078a1dc665997dfdfc709967c48e492b44
MD5 4fb010431ccc0850fbf5f486fc5fc6a5
BLAKE2b-256 9305966d8718d5c010a160d2cc6caf8f53006f4bb8e8901135ab3edc938124ce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e252b0d4c2c56a0701e7319f34527d33f1bd22b9e03aa83402380fbd933bcaa6
MD5 5469394f35fe169b9990c5652bc0590a
BLAKE2b-256 49b2622cac8adfc64f64ea03ea8697c77dd023b4ce5468398a2e764f6f5ca34e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9c38879e0fba1185f10926c881e47186150c497d753bcbd0d517890f17717aa9
MD5 52bbf5596d4b2d07d81805129c42caa1
BLAKE2b-256 835585fc4a7c4b74687bbfd1cddec41b275cd3d95737844561e3a92698f4151c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.88.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.88.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.88.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 17cc9e0c5bbe35cba1c4e790a50428e41a590c6aa0642bfb86f54d91b155af38
MD5 bbf14be1be9a581a74c0bc37c38ce9be
BLAKE2b-256 531bd34aab573af56d7fb2a5c75d743768660ad100310d4f84346579b2d8a6f1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0c3b9a3d5012398939e6694f64ca330fa06a7ddda5997f7812b1b56c64a94ea9
MD5 ddb69058ea8629bf8d99487d59977786
BLAKE2b-256 9da198b6e51e339bb3f7623db826accb6b5a4458a4cd9807701ba28d60156489

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d59d5a7662fd7dc2f7a14a91e2652361703fc937b62425c5d37ff96d00fe552e
MD5 ee4c787d7552edbe2aa0a735e5a0c5fe
BLAKE2b-256 68404cddf92d4adf0aad96b5d256d782a5408d821c822641c41698ee686c9ba9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.88.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.88.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.88.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0d761adc8962c35fa9395a6657c35159f1e429335d61fbe8c9329f3e609fe3ab
MD5 0a44cb97e968d38aa2a87c670850834e
BLAKE2b-256 8e7bbda638851e010a2dc4055e8409a6b4b46735ba47c87fb42627b4ddf8e08f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fc3544f583c7edfc328f67794bafb04e5d7fbb8b60f6c08ef4819a4d45fffdc8
MD5 642f83da83c0720939883affcc2fda6b
BLAKE2b-256 c23f85d07e5e62d596771404000393966a4a360b814d786d23a797f8b5dc9128

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.88.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.88.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9f19a1c46bd983f3896bcb1113f8a83ca8f7672d4549894c8dad2688e9772e8d
MD5 3bff7ae7033fdd21f9f1ca273060a623
BLAKE2b-256 ed57306104db092b62fed44997c21c2b992e800aec72e364a020364f0ed996dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.88.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.88.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.88.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 27bc013434877f2db8480173620b2d1fed6257b45d2696f4f93162a3aecb8cc7
MD5 3a140412bac8b91893e54432a0ccff49
BLAKE2b-256 eb2f381cc2163ecb9db0557ecf84eab61c6690e0fec298077cfcdc25a04872c2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.88.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 04f0b59c032f6ca61f21d5c8f2f8166f5016386718978349f2c3689fe635df3f
MD5 e8cc3db7a539035818f26a7ccdc224cc
BLAKE2b-256 22515ec47de96c7394f3639a8181557465ddc7291a2ac9c1b38c90ac8ff74be1

See more details on using hashes here.

Provenance

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