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

Uploaded CPython 3.13Windows x86-64

openbricks-1.37.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.37.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.37.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.37.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.37.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.37.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.37.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.37.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.37.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.37.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.37.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.37.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.37.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.37.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.37.0.tar.gz.

File metadata

  • Download URL: openbricks-1.37.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.37.0.tar.gz
Algorithm Hash digest
SHA256 86f477dd3b7b6072c8d6d4dc31c4079137438c1f0b983042d8109ebdba7242fb
MD5 d35107ed1e1e94869f16ce1c50f2bf99
BLAKE2b-256 9f43fe20295b6ab9f3ea00ceca12182fec3642e7f3ef649f2cafe840f82f049c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.37.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 974a65ec9448b004473c3158396b09825b0d618468567de032ee5795f1855f7d
MD5 f52f7d703e2cbd983cae8ebffd0e437f
BLAKE2b-256 85ff1d5fbd6011a23863661cb0bef28d90175f89176db579d866e9ab3f8fc527

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.37.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.37.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.37.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 cdd04a1473495a231750fcb3d68f36275d616513aa806f52eb19fa79b1fd7126
MD5 5e0a3311362f1cf1bd3c71e575a25c79
BLAKE2b-256 fe023deeabcfdb4f9cde470c4b9ac266922ed738187d2f4ba4fa58423bf2a1cf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.37.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 58962e13a080fe98850e95268b6ccc79f4e68bfa78996e9fd47ff26ec6ef5a6a
MD5 dfab8a392c4b6acd52de37c3d286dba3
BLAKE2b-256 5c89ae9e6d2aaf0a009b6be3289a34c84c6f5e5f5bcfd644d9d972b8e604deed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.37.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1f02a8a2f275a4fcf035896a26ecd3d6da90cda4c3f486802fcee329e44e7b34
MD5 bcf6a7c539473eb3c28c7868a6e45d28
BLAKE2b-256 c239d40af32bc32a5edb38143acbccaa6e653fc2e52229ec293259641186aff5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.37.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.37.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.37.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e0fb948b2e7e71456ddfe1532fb47b81322169c302bc480238be12fc208e8345
MD5 a33541679075dd760f2b41623ba78f5b
BLAKE2b-256 42d70fd18186b1bf31efe733f0ce0d62f8b065cb95003277d0c553ecea60453b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.37.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5d5e8bd723aec416e0d1be2db87722b901c25454168a52e6615805ba76780417
MD5 6da67957ac816ac56ff8a2445eb72498
BLAKE2b-256 18d12f02ae906b6cccb6851025e9a60dfb51680052bc9e35801dbecbfa23a1f3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.37.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 546a716b839f62fc8743bcb3e2e3851efa7631c55e834725794cdfcc192493ff
MD5 34c6a8e1c605ccbbd651006baccc1ca7
BLAKE2b-256 17669a9971f8e7088e457e6f02778717c6ad07d6bd6bdb2345242bd07595a53f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.37.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.37.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.37.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3815b5fc587cecccb83b9ce5c058142310a07e806078f2c5185364d25e77f54c
MD5 430a6926f30813e0501a5355dfd02e6b
BLAKE2b-256 3b7c19464b2b815f0d0dcea94fe93f060ad42b7aed6a32646c50ff537a087897

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.37.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f5612cae07497614333a5401929e0edb41cef616b787ae3e89d21b192988dff3
MD5 69de7d7a42ee9f7be4a7be8fdf5140bf
BLAKE2b-256 4b51b27245d7178ad467e334dcf2044408c8b9c57ea7ee1112fbdf4449c7d084

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.37.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f8017ad86af035e9b5e8294dd78880e8da781d5196a7d33a1f4614d78c8a484f
MD5 e2e1c68d31137f65a9a9eff0cbf24e65
BLAKE2b-256 e240e0639915982e6f8f67761e4d808e9cea7b8dfaac9e9d50f0cfdd26cd8d08

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.37.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.37.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.37.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 30b10302d248d2af6c6a24b8537c8c501f6bcd168ac3e20aa244cdc68ffd46c8
MD5 db8897e0c07c6af3e8c63d93726682d0
BLAKE2b-256 dcd64c10b233432a8e018ff8786746ab84a0ede04a7f7419d90afe104d914473

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.37.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9fab3a3c1edfb5a28c1e804f9c602df1f45913c19c122ec29060f109aac2eb8d
MD5 e7758563b51337070cc292403587b8df
BLAKE2b-256 18ac63a5c3367f7afa323052dd4a7cd91bdae31181545c406bf3ae72d6b4c664

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.37.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.37.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2e87ada5486cc8f06483ad4b8a4a36e6b1eb5cf1af8f650f8a6cdd43b6cc232d
MD5 de4e383235a102ad4a80c1754edd6c3f
BLAKE2b-256 16bfc08f5891a295e658d497646796cf47bd6035a138637d3274fa6f86bd2e31

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.37.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.37.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.37.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8e87a22d9f76276b1c1ef59b35d0d030482610e1f5ea7397cb3fd57ca73d6273
MD5 c43366463444204cc46d4361217bd6f3
BLAKE2b-256 72f9ecf6dfc689e5290bd2e4ca808c5bacfa1a1411ee5406337e2c9e4bad8d97

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.37.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e8710898b1fce1c4ec54d872eccb92b9c3c57bab17c47c8523164b39429204c4
MD5 1221eccf155f1eae18512645707f6302
BLAKE2b-256 2898fdee6b797c16a1e4405b69c5cf1d60f6a68e9fbbf43e64d5f97873e980ba

See more details on using hashes here.

Provenance

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