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

Uploaded CPython 3.13Windows x86-64

openbricks-1.53.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.53.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.53.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.53.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.53.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.53.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.53.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.53.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.53.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.53.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.53.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.53.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.53.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.53.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.53.0.tar.gz.

File metadata

  • Download URL: openbricks-1.53.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.53.0.tar.gz
Algorithm Hash digest
SHA256 0cf01fc4c1cc4f6919597189b40ee7df5086aba09cbf0edecf5d041a8b3eacca
MD5 5bd70b87e4c2e734889cbe834805016a
BLAKE2b-256 ef1fae9b5d3a901e2120ef2b258af032181ce21645aae4684b3ec59322d12e0b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.53.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 65a413bbfbb6e9803b20827f56298721d62d32f69a5c687317a23cffb7c4f25a
MD5 94140b1a4fd35d703a1d5ba0769a137b
BLAKE2b-256 5b255e17ba1422a27ff3a452ca16e73993150227dfd115411f46c0ad798d40ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.53.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.53.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.53.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b7f6db23079e624b795a8aa4e8d8607fc47ec1086972e40c0636f7c7fedd5940
MD5 fe3a25d3821bafad6d4efe56d2ab168b
BLAKE2b-256 185d6d67e48826843549003289b7391622766589c87b11f967d4b3fcb6b78eb4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.53.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4ad088fadf61cefa595c15064a64896d6a9d6017f247f78157b73ec518f72b97
MD5 f93d93c32e35f47d0af02ce8cceb19f9
BLAKE2b-256 450652bf9b0ee422d4258900e9d15d4911784119ecbc3a818cf4a0cd11c40bf9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.53.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 efde40daed158338569a2da26cd544aaa30fd0a03799e9b6f363b8930ca90eb3
MD5 27044b051aadb1a460bd67b2e245e16e
BLAKE2b-256 8321998d578e0bde0e35eb6fdcb62dd226a31066e8c47972480fc68cd0fdbd78

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.53.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.53.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.53.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 35b9cab58506b72dca2cad1a6563760ff06b0f8349e05c1a119bc1cf03cf2bea
MD5 6a52eb4753b529cd7a14a4d8f7807e67
BLAKE2b-256 eda045b6df16eb9be247e96fad6f567e1fae8aaebe9812b404ba6be7e1abf3a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.53.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4e275392b421d91d94158f3f91e2364cace5d5bbfed991557a903d606ed0e054
MD5 e35162c3b3966e49c208e6d0d90e9059
BLAKE2b-256 2abcf36f19c6f724fa112fa4af5d2f0eed2f364248f1601d64f4bd2fb0b45efe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.53.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2a5adcb181db046a176c4c69294eb41c61a8ae0512157352d93e192136d3e92b
MD5 ff233223d3aae268783cd20269a10f69
BLAKE2b-256 02711dadd231720b1656ca03c670def9c727bc2903c4a8840cca8186a7c2d143

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.53.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.53.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.53.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e8ca5d3fb4b17fec7ae4b1c1379c46ab0649f2c7466c43537b361d6ecb5aed22
MD5 b18396d4d243171924e8d3ca4f6f6191
BLAKE2b-256 9be00591cfa8fb668fd5e7d239fc1e497211297e3870ca23585f911174be6870

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.53.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5a4f4b14e0cb78a2275f284d787572fd76058634fee55b6aa426223087c2b6ef
MD5 96ebe6501967f1eef4e048292aa9c406
BLAKE2b-256 017432e7c9eb546c9ae7fbee0ba7452726a8994faccbd97474eb30471fc35e8d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.53.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cc54bb585da9266afb5e87afeb67c3f72383f9143cb36ff71a5b31c09693db77
MD5 bb687306e67b3af4fb19fabfe3e0a584
BLAKE2b-256 1d59b49e7abceeb967ba2734ee79a3b9c1a26524a71f11cdac2dafcb23799c91

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.53.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.53.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.53.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4d72be2a2ccdc482fe208b764943bc6034de802b4d3238b83bc6ca31126e608e
MD5 4e02c43bf22a2b36e96db4a3a619572d
BLAKE2b-256 6066640815e75f25a13cba9b23707e6748eed0d3341984e1927bb4ff7513b6d3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.53.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fd17380f256168ede235c65e8add1ae747dbb989f27d8cfa4c6106daadae41b4
MD5 426f47c5b10b93448e3c4f0d86f16cf9
BLAKE2b-256 b35b8599e49487e896c990f4b91edb1a94dfd1a1e1a5711da12f3f856605d809

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.53.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.53.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a9f5e3653cb9602181f61d5ad17f7fcb17cf53e3e98aa83971ac028792e22285
MD5 1a14227255e460755d2e7200d63e3dba
BLAKE2b-256 98562cc6245783e4b1eabf644dd4286e0e607791b0fd8ef94a0bda8e5adbbedc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.53.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.53.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.53.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 73e608a1ff222b03ea154a46a361bd7247382c639404874ff2e0c60c16b89f6e
MD5 8ca93ff64f6fa3b3109ada40e0532f58
BLAKE2b-256 ffded2a67ac9efbfefaaec52eb2611b61b3015dbca3d58f3dfdaa78f776a3277

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.53.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5010ccb7ba83bbf9c54a417d4d5c1517f54e9b053676ed4cbb79e4015dab43b6
MD5 1cd6bb4b5301107a5a04eda17b6243b9
BLAKE2b-256 2b300f812cc2de46615abef290e04bd7a1d6201f64eeff79b14818ab9fe39e23

See more details on using hashes here.

Provenance

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