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

Uploaded CPython 3.13Windows x86-64

openbricks-1.43.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.43.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.43.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.43.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.43.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.43.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.43.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.43.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.43.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.43.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.43.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.43.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.43.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.43.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.43.0.tar.gz.

File metadata

  • Download URL: openbricks-1.43.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.43.0.tar.gz
Algorithm Hash digest
SHA256 f9714a8b0a91e394b74797d9dd30f659ceea1221c1257c5f48f393bbe522f515
MD5 7fdd099d0fdf9ac3be454c67404e6d95
BLAKE2b-256 90608a4b47ceee242c06e39d2563e5342244d1fdb995046a4f57cc35e6d91cbc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5bd3eea6552274465ec0588f1a293a51b040c97fc01b0dd6d8cd1472862d8461
MD5 26902c30d71375f1c359b181b05412d9
BLAKE2b-256 c9880d6c5419ed1c3d9616d1d96a19fcf20803b0321c2e3fef386045e2e58910

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.43.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.43.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.43.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 07820b4262c0dab18014c8a5b97595696a5e4b71d0efcbbeaf75daa3f684e1fc
MD5 bc5296b98a29081230f4dfa41372a871
BLAKE2b-256 9c84448e82853d0ae8b564daa3bb1e2c8b78a1d28de934bbb526c2303e6e91dc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3013e6c70036af8e8857072889387e75dfe3d3989dd694e77e0900c00ecf95d7
MD5 cfbde9bda39e991ddbb0ccd9d80c1ccf
BLAKE2b-256 ade0f2e9239843d41370255c70b1d89b6ee8dec7784d214c55172ca0084c85c4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0d02f06ae8d68965817cfce80566ac6333f5512d2a08ed2cf5d2cfc5129871e7
MD5 e28fb097bf7472e9cfea992a6167dfb5
BLAKE2b-256 8397d271cc37a32bda39fa7057ee9631a9f6184e8fdb82973348d0a26a81aba8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.43.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.43.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.43.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3e430a9f33a2588d2502296021b7eeb5fc695787db034e4535b22791d627b58f
MD5 94cd5c1ef793307f69f71e95fe452e29
BLAKE2b-256 2220e2d9073e01bb7806728eda3fabe079a20ad10a69cf870238aa96a7830096

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5d437ccd374b4529866a7e50738b5ee082bf43464bd70e13a69154258e4b55bf
MD5 c6263eddfc01a7631b90920ee6a8cb69
BLAKE2b-256 1f036d21c7d1e4683454e0c3c2e6a610a7c9623e3e4a882735294cc65795e391

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 359875d85b8929dcdbc1b31a02183a6ad04ba1b464bcd70cf508ddd77cfb9440
MD5 fb02eb604e2af84eb0564fa28096d853
BLAKE2b-256 84f5f2919a2731de90aed76b0fa706b2d553d593d19716bcb4850a4bec9b13d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.43.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.43.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.43.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a9910de4e00730d48e739c3a0e15df0d24a60a1e2db10b89e423483bb5b27e8b
MD5 86038a03c227c1bfb2df7c95b448ef57
BLAKE2b-256 0c399d3d64e0ba8e30aa237605dde09991e519cc7b379213f546c62dcb6ac99a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 48174fbcba720491ab79338aae8f8cb0cc6e94bcc0ea55bb71164f41a659f1d0
MD5 0b7cbebc836250bfb4e81ba26d5f8e8a
BLAKE2b-256 791670321c901b472f6c98d35c790bcb1f39de031e798142ce22f4cf89266e2a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 26215f63267aec1d4c1e2043b6c3067bcf813648c98b6b025c9080a99092c802
MD5 9216ccd942922d50d465225e79f423bb
BLAKE2b-256 1ffdb35968f450409988e2345133bc638a94b3badcc956d97d8c612c4c32717d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.43.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.43.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.43.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6c2dba21a958ff373aab078b9ea0a595a3460dfc3e783b93bafc58ebc73c1742
MD5 572d15ac01c43ccaa347057d9551db74
BLAKE2b-256 0feb75e042bc874fcfb4612bb840b93d60dcde3eb4cef6807f8973adb0c07872

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 82d9cda794142b672617a11e39861af2798eef807ed8bb100b254ed23323285e
MD5 2bab9fcd29e1a5283f13d0826aeded52
BLAKE2b-256 840c14bade488c3cbfee094dbbcc0f29633b22ccd21080bbc77b67d79feb0f25

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.43.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.43.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7a74bb7917c6470b412e0492c2fcf6d1a78fa2393d2bb0f82809f9570323eb60
MD5 3929c6ecb5a078b98243d5de641b064e
BLAKE2b-256 00ae1bd2c1807e9b02f11c8a25b169c62a97dab4361608470a6830536addcf70

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.43.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.43.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.43.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a970653f0a1fb321d3f5b14b785f38f4b450356cdb0a083d8b9f5d4704d8f14b
MD5 189e985ad21ef9e2128cf05efd708a31
BLAKE2b-256 40dee58c1b2bafe1f57dcc7e2b74676236cda106f9022bf09f57e8c86ceedaab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.43.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 19f5930f84fa2102f6f143e4b48806e055f7c4408e6c71d9bdd779c291725edb
MD5 37a51fcd23f1acbd8b472f506989d9e4
BLAKE2b-256 fa3c3350af60be4f3e5eac2696e337e689b97b229af73fc9f15887b615594854

See more details on using hashes here.

Provenance

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