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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.35.0-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.35.0-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.35.0.tar.gz.

File metadata

  • Download URL: openbricks-1.35.0.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.35.0.tar.gz
Algorithm Hash digest
SHA256 f350c56c2e1868f44c3aed44069b5b4cbcf0a532542128ebc7e0c1b6f3228445
MD5 61826f01b7d09e4366e0a9588adf8bf1
BLAKE2b-256 12f62126abd33161e40f721ed899addb94d4433a7adc557395a5134226732596

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.35.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fda945dbea9849747f880cd7a53cc527c0770c1c0c7746ccb60581292934f6bf
MD5 7cd2cc3db8a0cfe9cb4c2620c690d3d4
BLAKE2b-256 d560357a0aaad3236017a30fa52bc0ae91f8a04c75d19120adb4aab1124ebef2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.35.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.35.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.35.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 998e1fa81640a6c064fee84af9b3c60f464c91c68aacfae1db16326cc5fa1aa3
MD5 b29a1eae9e9c834feb44429b581d9e2d
BLAKE2b-256 b05a19488a834fd50f1c6f50fdda1bb6947d7fd98ceeb1d3313404d66ce35e62

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.35.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5e44e06c0a6a11c7e7077e58e220b332dd6f0747f59009b2b00285f6f161256a
MD5 89d8a5ef8e7ff2d6a6934a4846d92f13
BLAKE2b-256 954d62e34d5502b5a6b02c209e0fbeab2241c7fa9ddd528951d84a1e6870d1ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.35.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dc58e3e29d5d2d5f20ca221a72d947aeb4018bedbbfa72caebda63fb2c4b9251
MD5 2739ecfface2db2ff63b0f1079f2ddef
BLAKE2b-256 e18d4ccc42e99d689123d7b2bb145eb9d3c92d2089282d0613edb45005e3a185

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.35.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.35.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.35.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d8cb137a1fa89f8d3b3bf9a740ee5b46d52d3e13f656bab0b8aa2b02d54588a1
MD5 eb8db89ea7b27b38eecd65292df4253d
BLAKE2b-256 79ffe923cefd8161042a27d4ec0377a0a0fd1613bc2da43996954af3d98c413a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.35.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8c16bf6bdfaba09cecf73763a4444bc7847b089932978e21139d26099b360c4f
MD5 2238bff4605830dc95d35146cf19b5db
BLAKE2b-256 be2a2e14287c6d93696fe8969608b52714e900e5fee0c8712e519965eaa158eb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.35.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c260c28b70e285d14b4dae735153937816b3731fef1e299d5f08ea99fcf153da
MD5 5ca11cac71bebb27843f0ca823fadea4
BLAKE2b-256 67173f2f7f36be7ff90b547fe0efa303870b83d261c4b4a7583200b4fc841818

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.35.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.35.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.35.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6386f3a51ab2cc59838d4cf89eca3b64849742e1c8f5b206aa61dac539d4ee98
MD5 0b001e7cba327e9fe7b48a84a2b9547b
BLAKE2b-256 00e728f76b0ba9b1844e7ad31f45b25a0fd830ca788cc59c80c0bc55b555ff94

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.35.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 787f10b40e5124aaeb872e9e27375de309649807013df16a56136e78b1facdd8
MD5 420f09a92ddd7b20024570213fcaab19
BLAKE2b-256 5822a90826d0446623ffbbe7b211b27e3284e7255bf253e93cb49023594b6ab8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.35.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6c21772318526d460b67780607daeb3b62128b21b34bdb01649cac5326f6f5db
MD5 1c30e988e077212474ed58bb427f6f40
BLAKE2b-256 1d48118fe74fa2306b292dbe1808d4fb586a373f25aad21d96cd1776c92a7f54

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.35.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.35.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.35.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ac90f41b9bbf06f0faaf29cf246622ca72b010504b5d4940cb0714639556bfba
MD5 3d1c28af61d37a795dae1f6de207ba2a
BLAKE2b-256 48553479c58bbfd5fa7b271fe611ef7f7bfd33254e628e30ee7b381204d3ed02

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.35.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4cbe6d4d5a3f31ef67cdf9cc5f1baedc06257ec78252c2ed8694eadb9679101e
MD5 3dd19818940b9d0000201800b273a075
BLAKE2b-256 c23e163e537d816320830628763e968aa4ac0008684c8fdf0fb9ad0f4b983cc2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.35.0-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.35.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f3a8684f0e7a5806aa75b47f2b8d6755d5f90faf0fe576fa68642441657759cb
MD5 f62853cf2772116e151b8dacba97feb5
BLAKE2b-256 570dff48699b46e01dfc6e45c387e013ddb337f67cfc5ee62103dafadbb6c5f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.35.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.35.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.35.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 cab2f1c3672b2b024526962161028dfe47f28862a5d5a172706573d1c3dc4656
MD5 d4df1f761163cf3c146a3f04e4830f48
BLAKE2b-256 97d17c00a136be9d5f948f6500cb95cbca7c2c93f42228d1e4af7e08bfe749ff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.35.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d45c4340fed47ed1bb48c3c5dfc0c8eede9a303aa823fed6073e556389ce1900
MD5 29fc12997c7cea5ad750d3bc575f7048
BLAKE2b-256 f78f136fad4782874267639bfce1a2a9836cba99abac29737f9c195e83aa7f0a

See more details on using hashes here.

Provenance

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