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

Uploaded CPython 3.13Windows x86-64

openbricks-1.48.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.48.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.48.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.48.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.48.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.48.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.48.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.48.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.48.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.48.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.48.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.48.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.48.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.48.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.48.0.tar.gz.

File metadata

  • Download URL: openbricks-1.48.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.48.0.tar.gz
Algorithm Hash digest
SHA256 22af15d404c89b695ef5004fb1458d2a8f6f367fbed68ec9f6ee890fe3143fc4
MD5 8e84347b9b7e0e3823abc8ca774ac188
BLAKE2b-256 cf91c56ab3be56fa12f621f7396c476c7e411dcf955b4a2f8628f6ca443dfd1d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4eb75308ba960a48e886ed2c3d858e479770929749486b989a7d7b16385eda38
MD5 7d2e98fb6ca4f6b4693a8104be6982ee
BLAKE2b-256 aac4fb69e3761e2c3111b4a0676f22fd3ad52f2df5158e437870ea4b48b5d0e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ab36ed15649534b47bdfb140e2a87bc6d1b45755b0e9c9e817ca01506c3d738e
MD5 849881372f1a21cddea05ce43eb97eaf
BLAKE2b-256 7ebab34e98ca20253973628553884aebc4c75f6b2b0c321dedcabdd7baf480f8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d233058c58bb8b5b90f7706012bd748a3aa2908caa358fb39c4d6679b403b57d
MD5 7a3cdba038416fd9c90db26fcda16913
BLAKE2b-256 3c60386dde3d9f3f7f7ff3ee73372be07f7dcf9a6263f614e80645b1014905f1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5b3ee76b741afffad977cecffe6196425a731721b9c05fb3cf0bbc678ad475ff
MD5 10a6d9f1e5bc03e600ed96158a9d94d9
BLAKE2b-256 efaec6c141e16b0778818a712306977cafa114714767ac943a39c144c2d49ef4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4866944b4cc8a1bccce3f8c59a3e5026a47ef0d2cedf7c5066cb4fbeb25af56d
MD5 fe3d0def948caef9f62f2a9621b6c173
BLAKE2b-256 2fd6319eba50fa50fbb17bcb7f892f334a5fcddb0c857ab90abc3e692e189eeb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 05f634767e59d7b7ef8802e54c1627ba95c47fa560ed5b7e8cb8515f28906bb7
MD5 8aaf9d20ef6423f54dd81a0f98ba90ed
BLAKE2b-256 35183faeab177950f1918ac1c23f3aa565a02ec484c51a5a71c4e8afbb9f51d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 28914421d86bd9bc0e1985bdc925149d3f5b81a5054f07f9c329e2cd18717d4d
MD5 d3e5e6120c4e2932adf1ff769dce2f19
BLAKE2b-256 70a38d34c01b524dd555730ee37f628c3306acce63d2c4d5d97e59731aa6e3d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 59e0194222f9e476477d0c8b3159c888eedf32f4de8bd8abe3701c1ed70f152b
MD5 3a4026dba20ea7a7b7901b331cef522e
BLAKE2b-256 65997aeea98181500914e03756abce77fe8f6b6f4264e22055c112a2da143d0c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0a32d7f0e7c65e1eb9d4d7b1f5e876daccd6289f953541a90be9ecb071911fb5
MD5 cc5412c2d7c405895d8a1c3b3bcaa9ae
BLAKE2b-256 cb329ba7794ef38454a4732b80bf0539d32b1e4f8387a2111805a454bd1dab3d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 275af908a4031d66165efe95f175a3ab56686265ac5a5628f979a43cbbbf049f
MD5 f38c9e5b713c8efb364db10bc026e868
BLAKE2b-256 1d55532adbff466d82e3a25e95fd6c5684bd0593691037b4d8cb1561e17f1418

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5f3223f432dbe9e5b65d127d6a2c9a88d0d39abcaed72bf705e74c0a35b1fc28
MD5 46f2c00a98a1a8f710282a8b228fcbaf
BLAKE2b-256 980d6e2568e79ef4dbd83926f2055f2813d45a045d569967e2fd982f7468f601

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4590a5e42768dd0d4b666e22d9c309aacbfb4650e20e9c2755c5ec5f2d1225b6
MD5 99db18c6f4492e648ec23459ad8815f9
BLAKE2b-256 20ebd0308e8415f7027a6fedecbdafae0900993850cdc3725bde89ebc7e6e5d6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.48.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.48.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 98f33204e131aadaf8721fd4ad0b28f2a5bd162c26ff48c575d8520652929ee4
MD5 e7b9a36cca484c4ce27f49409891fe59
BLAKE2b-256 14b9f0661adb2f6be14d08098a8c7a82ca1c727970f7238aeda22e1ea28498ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1edce7857428986e387ef13e1b6c94aa5574d165e70655fb69fe293ac607ae41
MD5 d3220798c718869e102ea71c41261da1
BLAKE2b-256 fc9fc50930d9503a4a0d8a3567c7e41b8b9936c181a3c2b8626087a36d402c95

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1d52fada634094d5bfe22057ee8525a6808e929c3ec60276ebaac27c3c662fad
MD5 b60a706d79f8e12131551351425ca8bc
BLAKE2b-256 086259e830e46dd8bb772fad6c57c934994ab3dd8baf98960c820fa9dd3a4363

See more details on using hashes here.

Provenance

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