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

Uploaded CPython 3.13Windows x86-64

openbricks-1.86.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.86.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.86.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.86.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.86.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.86.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.86.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.86.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.86.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.86.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.86.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.86.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.86.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.86.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.86.0.tar.gz.

File metadata

  • Download URL: openbricks-1.86.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.86.0.tar.gz
Algorithm Hash digest
SHA256 f2b416affccb2c563cd9d80dab802b58c69bead7cc1336f7c63d0654558485ab
MD5 43448626e1a5933389fd001b360c2c8f
BLAKE2b-256 3a539f1a57e1137998c023817bb7834828c883193e35dce95da7d3d19b367058

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.86.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8353e4672ac41bbc83367844f5b92b2f9d094c6e881e0609ccfa21fdc0707f86
MD5 ad9e419ddb026c4d6a29869058813d8a
BLAKE2b-256 c4df9e181c0492d6e7a741d5b0bc77b913c73aae645b4bd6a368ba539879f863

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.86.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.86.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.86.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 addedbd374cfce3feed9907b0d3c7f48eb071bdd45c0d1f4536dca13e648804d
MD5 bb14f90af8f85eed86b79c11423a48bb
BLAKE2b-256 f3ee50bdcf62832cc556abd1ccc4bd08a533b44986183e6862929ab8ed4d937b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.86.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d0099960b353d54cc9c1bd7b4a89123bdff619799bec31cbe5d8690828781cdf
MD5 38d2c95e820af314ae04ee417512fdd4
BLAKE2b-256 fd0eff99f8a50d60a8cbf1c42d517591f8838a4feed3480c2cd837f1889f654a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.86.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d0e035ed56b69f12983c80e3b56ab7bd430fc761a2d8386bb093e17fd6ce1cc1
MD5 0d40186720c3be455acdd764ebf57fbf
BLAKE2b-256 b7277171b31558a82ee1c124439769d55eb8e278675c33ac19aa70dcf68e2ac6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.86.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.86.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.86.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 69cf7803bf6126f81217126fe9752a23b15b05127c0ad1fadeb991ce9847cde5
MD5 ee7b6cd39821fe116c39866b4bcbaea1
BLAKE2b-256 88a645d2511f713887a9a8961badb6ceff0b80d9e26924c1cecba32fa64b6242

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.86.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ac15d2358d819ea56589664ed9bfee40e95fa4053c33f2082b8aebe9aeb61168
MD5 58cccef0f8f971b7d3b6be346ff493b4
BLAKE2b-256 e7a93a8b2833a24a392c68535ceea5434f269af30f1d62de393fe971f24f74a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.86.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c528f6c8b1d13c8885ed045805f3d8aa265656df009309900c6f907d3ba21bad
MD5 8767909d5ed2228b1612335f227d77d3
BLAKE2b-256 241eb6ba0864f7ae3588303397d8e77c7b0bd0e00dca6a80d94915849ba2388e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.86.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.86.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.86.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4cd2858284d8320557ceca994544d66f0ed752af2357f88997183d306ebf239b
MD5 365ccaf7825cbe2dcf4936efaeb931ee
BLAKE2b-256 56fd1f175e536db0156b5ff6e9d25abe9516170105b3d3d595eccec29e5cbfae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.86.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6d2c15bc3393e74123c1d3c6bcb7c3d717a7e764a6fcf4b9913dca1298b8d782
MD5 59a20281692c7ae152a6161e9233c5ed
BLAKE2b-256 c4ccc28e0e335c78d11f49bc781674faaf064ce9f032d4a0a58e86bf2a226d19

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.86.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 366f23971a4923f2561ff17c66caff99b03fa01a0daccce7d91ae8b42aacbaa3
MD5 096fd33845c89cdc5e9b10ec10efe3b9
BLAKE2b-256 d973a0f57d880c21bb177bef9e056a0824a2259e9a7c971be6dd116c9ff9ed47

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.86.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.86.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.86.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5b5360057991ed8056efc60d4688c42450d711b677bc5df0eb0fb1715061fac9
MD5 81a3edd3d8b1a4d99f8243b0403c0b7f
BLAKE2b-256 ea746ed48e748af9760e5fac3541ea8aba40ad306d06416da5b9654fb9b97c28

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.86.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 41e6ce97cb5829113e2200959c8ec11a3972067b027bbc76f3bf6abb3815eb2a
MD5 a2748c03cf87209ec6f16024936614ba
BLAKE2b-256 15644d9ad98aff5890ff98d01ff8d8e79ef111b63e3d0966e564932e5b4549c3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.86.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.86.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8f9f7429947aef64626c86dd2346b42c09dd74dbeb02e9278ccbfe2dad931793
MD5 5f14a8b8826c59d0cc1706e84784903f
BLAKE2b-256 a16fbe3ed215a1501815c6c5531a4f97adfeb37685a799877f606a93387f5fa9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.86.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.86.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.86.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 24ac95d1f10b1c870a4a9e824f62f0ebd96ca950f548ebb84e5c49fc0e75ee89
MD5 e25102c5fb877903a35e1dbc391dbbe9
BLAKE2b-256 6f4f018ffaf66501ce99c5cfeac1091216a417dfe37af84d874f8af04c4461c9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.86.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 838a254548623dd54a50a1b26066ad2e332b617ca236e35779ba44abc97a7ee0
MD5 fc515f4ffcbf712751ae57714b931781
BLAKE2b-256 7cd5223938ccc39246946e04ab50ff79ff33262a48d8e167e14339eb218551d9

See more details on using hashes here.

Provenance

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