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

Uploaded CPython 3.13Windows x86-64

openbricks-1.54.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.54.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.54.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.54.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.54.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.54.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.54.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.54.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.54.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.54.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.54.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.54.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.54.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.54.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.54.0.tar.gz.

File metadata

  • Download URL: openbricks-1.54.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.54.0.tar.gz
Algorithm Hash digest
SHA256 09789f3d86c0fe8a7d31a789f32678857ce5b1eec61017ecae6b63d089ec747e
MD5 05aee429a889d1bcbd46ebbd2ac16c65
BLAKE2b-256 c3466e5199a1a9f8dbac0e80f8de5d6ea3cf3dff370c2ae5e93db7b14642d0f1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.54.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 82667bf6cfa50ea843f79427489644123066b9c2255876781691e09fdb6f542a
MD5 b2556af322572168c1abf63cc5ab00cd
BLAKE2b-256 02b6e9b9e27f26e28db243d5d52fc9ad140f6e36c7b9f21a6f28f235be4997df

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.54.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.54.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.54.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 93c74d5d3ea0a1f9e3c6e89b8aae01e3b6372c2d1831e5481a00c062a11e3608
MD5 98fbae6e2851db0d9ce29a1d6ea24349
BLAKE2b-256 47eecb78e95c820c554d34392882cb52d7ee8985c63443b050147de29387d5f5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.54.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 6123665209bfcc25d219a84fda81d202dfa2f7ae81d872f66de29447c8098bc5
MD5 c0d7fb4c199de6954b588cb5ee948565
BLAKE2b-256 11cbd3d37c14a41cb653e67040d6494cc73782115cc06fe21c40b30389730c33

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.54.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5212cf54c6ae17c41bcab90468188a7fed02cc94af0985b2af3b84f110918118
MD5 482a70541a14e4dc52927d4c4d82ad8c
BLAKE2b-256 391da9bd1d0638cea0ad7459987f0781a10f62086b8f266b60ff1480b16cd310

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.54.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.54.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.54.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7c60bbae5f99eb81c2fe586015e452030b4c6c245c444ec053d7fa58c2891534
MD5 3336db175de9d6ccb91df21ac96d36f5
BLAKE2b-256 f04c35b4297087e59c32c8d9c78c62494eb8c5704906899a29cc32b5fc671d76

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.54.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 448de7a944a5286e3482f95f0d79f8a8798b9d7f705839e899b49ad3b4d9c468
MD5 c033d5a3ba3c7364af67b17b63d7b89e
BLAKE2b-256 1825b0960e5202a08cd938f4daac539443190ac46620548a6665ae8f0e7ed30c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.54.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 35b08bb7c142c7c357ca5c62f423432fcfaaf8fb3d085770aef52414fb82dc28
MD5 052b6effe08157e15d94ce80e3eb4041
BLAKE2b-256 eefc738a25567c2d89af10c49529e3ebbbc2595b443d47c3884e652a19273349

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.54.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.54.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.54.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ebd5737a76c5bd5e6ca916c10696b0a4d061f09c65bd99e7c7a7d21e59e7c2b4
MD5 3cbaf388279815b09af4e2cf5c68c1d0
BLAKE2b-256 3c60db833e46f84817328833998e7720fff7ebde1cafd87e20e6448e9f4b65f7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.54.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c149f69d42bdddd6cfdf3c1f1cad05fba88f3167977a2394f261976b67408ad0
MD5 77e09d5e0a0cd793648d64cf1fbafc29
BLAKE2b-256 f4e641e8d187c381a9027913de54978c7728b21be0bb59ba38a4bf10368e67a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.54.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1dc387a39c07214c1edc574031006b561079f4268cb4896e735a7a37b35a3496
MD5 27e5db9e94c1b70bd791a5cbb8cc58c4
BLAKE2b-256 94b24a299c7f97687407afe19cf95befdd143278f45e61f207aad3d7f273ff07

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.54.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.54.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.54.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5bcaec29cda6f6ca8f1b2c63e26bc01a8e57b29863e5b39a510a4bd5dcafa799
MD5 06c6b7de259fd9615b36ab937069b858
BLAKE2b-256 db849631501ea4b4a2969d2be216d3b938a52ddfbc11b953d049c01e70822e41

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.54.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9bb917f0f8dbfd403e1977b00c85753076272d3509355f93195dca38f0db085f
MD5 794642537d09ee6967ed6ed9de43df8f
BLAKE2b-256 8bdfca73c84d139f9808f511406ed52f4ca6c31a2b94ac87ec9c42cb0f3277eb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.54.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.54.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 01729a4dc5c533722cd8d181d636bb67fe22986ee864f37306920e0213742223
MD5 19726d11c2911078e3e22698209a4f75
BLAKE2b-256 cdd36ab1461d1840f24f5b2263f42b299c15d699c913bfa851c44c6028daa809

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.54.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.54.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.54.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 16f0d9497b31500383aff592683e8dd4a79c80f66804ebdaa6732a85842c17f9
MD5 0df1c24c7d288c6c84cae9b6af36b54d
BLAKE2b-256 35e327bd4419cc287cebf08dd16dc9c448890dbbb870c3a74d87f7aad45d214c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.54.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 440ca18052fd05bf68ce46ee33098c030628f62862fa5bda41d6a13f6a780f3f
MD5 189889b782bb19fca2dcb047f6df02ee
BLAKE2b-256 762ef5d18b05df104e92540aa8650cef6d68e87dc06f7b95ecf4a5b851c87dda

See more details on using hashes here.

Provenance

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