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

Uploaded CPython 3.13Windows x86-64

openbricks-2.6.2-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-2.6.2-cp313-cp313-macosx_10_13_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-2.6.2-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-2.6.2-cp312-cp312-macosx_10_13_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-2.6.2-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-2.6.2-cp311-cp311-macosx_10_9_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-2.6.2-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-2.6.2-cp310-cp310-macosx_10_9_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-2.6.2-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-2.6.2-cp39-cp39-macosx_10_9_universal2.whl (3.7 MB view details)

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

File details

Details for the file openbricks-2.6.2.tar.gz.

File metadata

  • Download URL: openbricks-2.6.2.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-2.6.2.tar.gz
Algorithm Hash digest
SHA256 a62659f24195d5dd01028ec988fb817778ba491c83b2757dff989b168c15c38f
MD5 a481f9fa5684ea5c63a3d2cceb4c61f0
BLAKE2b-256 3d3f4602f1a01793215d1f9f5c130c203782cf318c59fa297c9d658970e5ea42

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.6.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 912de82ba4a15e5cb537b5eec6a22a646e3f39537fc9f89e52e63e850d04a89d
MD5 900489a40b154fcda96660d05cfc459d
BLAKE2b-256 38c56b707c9a339a9874b7a6aa817fa2b2255e773134958e08203578cb8a1784

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e2508ac877ef4735109959d7e8ec57f9dacf07d2dbe81b6c22131add5a9e7a3d
MD5 29ac8c35bfda56f25e155c4d9aca3e99
BLAKE2b-256 80d4c263bccf5640b4c12d46f5162334ad3336b7380f595e1328e67efcc44d57

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a4b1d8cadd9a317e08b1be24973b61d3c5e6d541dace1b0fa1f088e99c5cd390
MD5 7653ab5de7f9ebd14b79b119012b750a
BLAKE2b-256 05ec74e7b7586dd2709882ae02fdfe43796db5f6d4a330ef1e040cf03299fb87

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.6.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 714b714c73beee8368aa96d672c84b97660dc3ce7e60afa05dd17467d028ffcb
MD5 48db62b4c132bd1ac1d4a44f995e8c2a
BLAKE2b-256 b8223b4cb8414f76183849ef31fdfd9f685742397bfd7cad8217ef46166c1798

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 66beb320233dbd6d6c3fdf1663765827fea83f5ec0be24cf9699e451bc719a6e
MD5 47bc655a3973c379fd7f0b08c0512f80
BLAKE2b-256 627f541d8a09fc950be0a9ae098d8aae0bb6f3690468dfc89cf6cd40038c88da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ad5657cd76653b4f5d9027be1013728c7874ad70b7a255869e4e33aa6960da41
MD5 004904809fce6929e87f6fd6b6f05867
BLAKE2b-256 b7428c7396de370ff08e8a4fc2965b4059ac078ee93c60775122989352c6c75d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.6.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f856b44719053c3e04175f6bb6d3b56e1ed60b702823fe0031e2a7502f1e53f5
MD5 a8752ae42e2ea7a7818aaabfb5c8af08
BLAKE2b-256 5885165e044eca7a802701ca6333a20c425b157a0fa254ce543f983ec5bfd2db

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ba5c2af0a8dae3abcce9ea171bddd6a125342736e70cdd1b435f1e3f09453274
MD5 7b1fec1618fa00e4e3c41e497e2c2b3b
BLAKE2b-256 800a259acb8a54d99772d553da132d8f0617f196523f24231b83004cbd5f1beb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 695488d1a0f54f29fcb814796ca2b6297a6e18caed094dc5fca2e47bdf3a4b54
MD5 5b24371dea6d67979dfaacdd363cd70f
BLAKE2b-256 003f81fe8de8e8111e956fe53fa13d50644623aee2996b629220b45d9bb0cd5c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.6.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8c61e92aa6b7722fa512b59492f18a855e14558709a837cf70db0ca8febb5765
MD5 c111e59d4bac9ae26918b9be2741c4d4
BLAKE2b-256 ad756a230b4411b2ea4da198196654754b57c9d2ef456a5119ebaa536c92199d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 40bd7b200ff1599ba6aba5ed14516b7f0928e62036f2d6daef96254c55fb64d5
MD5 c9745162aec853c17857376f788956b3
BLAKE2b-256 883be0cc010f3fa9fd8e8f48a667f71e38e100b7bc4851da776579e0bd891c97

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0bc4454e70bce161b57b0fcbfa6948e0cd2db232d0607fc413bedddf14ad5aea
MD5 e2b080a95e5eb1fc5bfc07f7a5889295
BLAKE2b-256 15b062e874a1d019516a60a5c14da1fb812279b4abdbb4cd421f238164d6abfb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.6.2-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-2.6.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 37fa10278f8cf1352bdbfc7b1fe82f98ab8b34b810d0bd39cd770207aabd8fd6
MD5 339a13967421ad155e19ac7333a0f394
BLAKE2b-256 0b76d87333c71af09ac598f7b5b094e065e7fa8a8cc1654843eb1608e3c4f6a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e12b59824b61fcd05cbaf74c4a76c697e3a845b486da71c15328ced929f13203
MD5 00d1b8142ff2598b349a74a06463884e
BLAKE2b-256 1850e118e85cb1a5d8957fefc2d1db754237e34a090a8cf42fedb10b29fc5565

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.6.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a2830377e8e1187f9f878e89015d9e05653beac0819c7925c529f442aa6911a2
MD5 5e49f3fde97d6e5f174a2e67d4512527
BLAKE2b-256 8964186fe179686ecfbcbdf9cd254ac3f3fde2475f3eb90166ba1ecde20627f9

See more details on using hashes here.

Provenance

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