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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-2.1.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-2.1.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-2.1.0.tar.gz.

File metadata

  • Download URL: openbricks-2.1.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-2.1.0.tar.gz
Algorithm Hash digest
SHA256 0f9fd66a3194a843f9a5eff1d75f357fb1a7537fcd9197b6cde8c90f99e969a1
MD5 a3a6c14910000cf93669eb45065a96b9
BLAKE2b-256 80f273da69dbf41571df51e4551bcb60b67bcc732a58af5992e1132171a0d453

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.1.0-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.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2fd5b30418c71b03eef1da5c50c21f1e5eac5b6ef01d8ce5e266f1565dbcd400
MD5 a235d9ee5bd3456d35db7ca6298620fc
BLAKE2b-256 f035ae877b129b5b35d50c84695129bc589467bdb0eaadb523e86960dc0b2aaa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.1.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 16ed3f5c9eb5d4aec55301e4ef3fb3a87137662a96b2846a7d649d74eff2ae7a
MD5 db940d21e1a8eb3b189f2896d53a3d7e
BLAKE2b-256 61b5e5b0be538384d6686da5b7554b7541ba58c5dfb1b5ab4f30862b2fc42806

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.1.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a92889caa1d943ae3b669dc0bdbda332fd770251fc5570cbe240e48243eba359
MD5 c78603208fba29e5a35170aa45de0f97
BLAKE2b-256 4ff9b1fe45ef37f261e6cf696b7707150521bf52af5fde221db3faaedd82abf0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.1.0-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.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a0f74e74045f2ac8dd4597c320ef2e2e15750c551af77deb991dedd6a6d71585
MD5 8a41a6d6ddabb68713f66e993d86f7d4
BLAKE2b-256 9121b1a9088b9d5ac0d50db2f6ee14308b4e4ed459f1d6bbb5acffbc9ae2d03e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.1.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 54fe01b9546e543a048f9ad93b9cca4f6f93f12174c052b672b288ee8325d9f7
MD5 c87d2fb8c378fea3104ea5f940fa200f
BLAKE2b-256 a0dcf5de699db69461e60e9696fbfbbccace2c46c015f1a7a33c09d2a995926c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.1.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 61ce9dae6d8635596ef6ec2184c535a62ab271805ca683d826b6cc95c6b5a470
MD5 e9e3bd9455215c4e003c01d2dccd9033
BLAKE2b-256 4e357de03fe9f5e1be1e4b5bb40f53258bf1b5edda7c935146ec9bb8e7c427b2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.1.0-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.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cb0cc15ec348e1d9de8548fa9498bc7e27c0d2080fc65eb9d2f29844a146ddf1
MD5 26612124f9b3e0eb5e501d7967337484
BLAKE2b-256 cbf6b64f47d721a382a5fe646354f712d38d90c2b3ae8400c817f0a5f3a3151e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.1.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7e778f28bf8ad7eb1b478be4444f1ec57afd314dfd82cf16c2f6bc5e44a37323
MD5 56eb4e40a6258f56b2a806332f911118
BLAKE2b-256 beb4b82bf3e8ec95ca5446e29ccba36a3f98ce99fc9cfdde47be626d711dc4bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.1.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8d438e4b0c39b7148e60c690cf66f76875357d2527320f3a6dd75737250a5a49
MD5 5eded2d05a1cc34597d330e4a327389c
BLAKE2b-256 0795dc5eaffd2259523f8dfdc700a73cdc96ebed2505524597936e15e86bfcc2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.1.0-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.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 436c984ca3d4d51aa4309efc56d06d4a3ebd073e195e1e1e8d305c6090e03a3c
MD5 bf822e831f56f60e6a502650b7acab5f
BLAKE2b-256 9eaf9ae363105049f5433ab3b53232fa1571cb04b0088c5ce694f0b3e1105b42

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.1.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c8e57abac5c1c466f90914e67dc33b425f353ca2b2fae8d4488e364f22990e10
MD5 9b6f3449745ec647b39e94e2bf363d9e
BLAKE2b-256 564da9f62fe99a62f171f40dee6e3e140890b00c1af38302606449fd940c754a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.1.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ecfb229a1a294148cc159c436f3836f224e77cebe6996ba9f6135b60aaeab584
MD5 3d1042c1bf1754a79930836d0e2d3af7
BLAKE2b-256 6a3412ae789c55d1097714332b3674927dbd53a64aa297a0376248a7ad5b39bc

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.1.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-2.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 41fd28d6fcfc369019284ed2cc508c7000a4ac18600a744b0ae3ced11caa2b2d
MD5 68dffaed8defdd90fe6e3805c1959418
BLAKE2b-256 ba8b43944aec5f4a2485fdd309d7de91c53a575b3e26d9b46ba7c50fab9eedf9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.1.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e9135cfc019daf4338e181acea11e7ccba976f6d77600286f4a2f0b211cb84fa
MD5 48913ad05f6a8e88d84c89440041dc56
BLAKE2b-256 3f038e157e58a68c6540b983bf6befe3298049bffb4794336b174896f39e093e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.1.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 52f2c39270edf43ac85dfac0b0b1d0c1b721f335e0fc97c0a46496defc53f109
MD5 fdc3c4226f68621bafececef64929ab9
BLAKE2b-256 873393fe63a4361dac3c516cc5e3bbaedb3297f47d7444768297bd9490e73030

See more details on using hashes here.

Provenance

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