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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.96.3-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.96.3-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.96.3.tar.gz.

File metadata

  • Download URL: openbricks-1.96.3.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.96.3.tar.gz
Algorithm Hash digest
SHA256 30d35448a56205bf539e1922855b2c9782ce78173c22bb1a244eb3166fd6914a
MD5 4170c7503b4cdb69226b8690d3dde56a
BLAKE2b-256 1d7b5bed78e5a4b8e696532d9f82c09ff5a33fe7d1f8e9b2fb5f9dfb95c5c03f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 147f91ba128dd004838a72e20a2c8c1a3cedc039246cb6c76ebd3f75bf838959
MD5 1d8237882641ad9cd9be48998a6952a9
BLAKE2b-256 6cc36489f2c101797e8a5d1ee53095084f1760f912700fa972f99aef7148f2bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3cdaea30b61f593bf090f02b287d386e36b7f55a5c4f4c0c5fcf16606b96367a
MD5 4054fcde36802ab10b372a53174cdf52
BLAKE2b-256 7113743b937dfb9c442c9c7939eacaf510d2ee7e62c3b4969b8a557c2c9b8b72

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 60223926d6bb24c559d19de4a3b11c7898102dae416b22d61e052e07c808da13
MD5 5c9d212b1e04ae5ff878079b975d71dd
BLAKE2b-256 2085dd5f1ce2c8a8ca1f8406e99fcb048edb6e49f8ee94da9789820cd604df3d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4b429fd76d28fd4e5da64e0dcd6bc0a9ef9fbe0bcf1f9bcec9dcc318e90fa652
MD5 8a83082e1bda959a71edf2fa7d997375
BLAKE2b-256 8c8ac3ccb8be63b66f1bdd31c73b215a0c5d558128c41564202537369d936ad7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c99c842e9be24bbd8d84ae14e19fde00b4fde748d355c2a75824147e8f353d4f
MD5 1624d450cc6a8aa903c14370aacaa4c9
BLAKE2b-256 039db2de2fa1bf00b868f36e5f06c840f2dbde80783d6e7b8676abec7032e4b0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5a22fc7ef8c91032dfc568def4b715e48e71a58d987c926ef1498050f8558eba
MD5 0154a7ead4b369a88baf3e86c1c73e7f
BLAKE2b-256 ca0e7d05e9c18d967ac4b74c63bb734c40d17bcf683c51dead350cf68d64e401

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 da621413b4ca717eaaf6bbc63586c1ae460e0e64a432423463f2d3ec225d8f75
MD5 323d53ff634d2a3da25bcefe06b7b533
BLAKE2b-256 0270539ed728bfe1116fcf2cbdbbbe1fb90d9c91d85798c773182ac3b5501efc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 dc503aa2426ca295b5b2986f94c548efd5219b5909244769c098d899cac2fe90
MD5 907551bbb89c7a345895ed8849cd6b29
BLAKE2b-256 7459dce0d1319463021e6c745f5ba666270978b9b5776cd76de5d37914a37caf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 916e3253d7416b69c8eda3daf724b4890422695b91efdf06d0eb8d323e486ca9
MD5 abffb33884b5cf7ee78745cefd2b0ca5
BLAKE2b-256 50abbbc6f0c9b1f723529bf631031f3f1f01aaa5ea1ecd5a3cc8343a5365d489

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 13c397d4a9a0ac36afb477304cd8ad8b6aa1315524bd68ed673695597432e111
MD5 dd994589ea6aa0b5795cce2e21010122
BLAKE2b-256 d0b12d41a9e81b5bfd50647b61922cb60d8f08c225dcdcb7b0cdd1d64899754c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 cfee7d2a997b7b941f28750ed366db8540f10bee800f70a574978c34ad9f70f2
MD5 1bc619bf53d7bb76c441039bedb26264
BLAKE2b-256 44c34a42cca13936f56c9c2ac09091b7d9d8f01146b3c0f961eef5850eaed4c6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b2c154a80c740c5ad74a555f1dba402e6752fbf80d5832ae61a55f0a8169ca65
MD5 adc9e938b22fba823ee06f6209d891b4
BLAKE2b-256 050a196797b6003d71e70c62c3c7d29953cc1266475a31db03328a58aa0b42bf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.96.3-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.96.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5bc0de10b8ec4005ebd37ff475ec8736591f81e048668e1db1a471d0ae030cda
MD5 19b130293b748defd474bf96a0f62435
BLAKE2b-256 2f8c24776f0e99f0bf9c80cdac61564ac30e24cc2bc259cebf2889a5da15b0bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 19c45054b91822028cfdeaa7fa2c7897a57fa1233b63d5eb70646e10e155677e
MD5 9b05afbe4b00735ac7917608a069d6f9
BLAKE2b-256 ce425f5abf2b93e222632f9eeacb1043eb946559e6bdd7855a2ed4971f16c5d5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.3-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e065a6b7f7d71a78338188d8521df87ad2a230411e79ee9a8f2ed13d9a4a4c2e
MD5 1d65a00fd85eb48bf1c8e240807833b4
BLAKE2b-256 87f427a4a984c294864502e1e39fc5dfcb1bc64c9fa4fd9471a215ce5dcc8fa0

See more details on using hashes here.

Provenance

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