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.61.0.tar.gz (3.4 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.61.0-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.61.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.61.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.61.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.61.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.61.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.61.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.61.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.61.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.61.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.61.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.61.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.61.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.61.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.61.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.61.0.tar.gz.

File metadata

  • Download URL: openbricks-1.61.0.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.61.0.tar.gz
Algorithm Hash digest
SHA256 f498aab7e1e02db3b8f5f016a1159a25a41d804711b33648882cd95b0b6b9a1b
MD5 9713eb0271f70a185821d174dc601741
BLAKE2b-256 9c7b90a08e54c94ba562c5760f30bbd7b12649d60d082cb39f4d1f192dbbb5cd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4547eff09c35c7d9e5aab8d2cb836b72f5fd72d8d3816d10ec70a0257dddd061
MD5 18f7ac05c43a3791d027a690abcaed0d
BLAKE2b-256 d15aeeb403273996dd73598bbb2d1bb31b4294a3dc17995b5f6de8f5adbf96ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.61.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.61.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.61.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 04f98b75f61ddd2fae9d62f7b5ec014a6f2bcf8f8bd3287f028b7381f819cca0
MD5 842cd631659010ad58671d66fb231371
BLAKE2b-256 095d679d7504e7776b88a15252c3117735574fa894cb341a2e5f6cd2ecfaec7a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 c0ce175eb798245c27af2bc289330d887b0e6d1ffd7c2939d69dceeaf047b8f0
MD5 cc8e1d6537aef67fa7a9da4eb0dfd8b3
BLAKE2b-256 9cf7cb3f61f85f1347f196d0f5d76baf233f24fd38e4e789b7e353b8f84af378

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5212aa8148b4d711a4604ea1a8e92107df60eb561b1ebbb4a9c50b5df4e99422
MD5 2974c3013297c00932f151e2bb3073e6
BLAKE2b-256 eb9c202394f8249959f724ea126a91ac9c9d1d6a962a12bf596bde60c63ef2e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.61.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.61.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.61.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 90de6ef863ad0b11961a7b45078778fd13a83ac7d24bb96fb5d7052e30471f45
MD5 7798c4eb0cd39af32df1528792751677
BLAKE2b-256 96efe50ecdb24b9f8b40f45909432219f35964cc723d223ca3309c2f2ff8dba2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 73bd1573672cd9e7dbf66ba48d17668a4677cce0230d12f5dacb80e3be0f06a7
MD5 6a80f68526b18a9b810adf4912e50486
BLAKE2b-256 299bf80f578cd485c78b00c97c917184a6edf0dff01569ac6712d1283c096a5e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0d519413c120e3a34c9cee4eb890b7636f8f2524361b73ca0480455d8ebdae8f
MD5 bb583c9c9ee9d5f1eb6c09d2c5e8070d
BLAKE2b-256 9eba1bd199bc745c753ffce0ad623dfcf7625b0887465df1d1080c35b6b67856

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.61.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.61.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.61.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a19d5a2bec054d00fc92d0b10c061a1ec1b51e7c524af50d20468563854278fa
MD5 dc764daefe2a84ff9693e39caf5baf38
BLAKE2b-256 6291f444e1c66a69b33a249d1c5265b84028a85686ac02757b592d4975e12b0c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ade190b0053290cc1c9a8237363c616c71b4bd554af75d0da90c1569daf69dda
MD5 da852c98b912af80c3e81959e4eb794b
BLAKE2b-256 95dac9305ce7d9dcec6c1303a5ab897d2f2e97daf6cefd590517c25ed111f473

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 194b2398d865fe184564f435678c7cb7ce6f113d51dccf43041d28b34c01aa7c
MD5 6711486bcefbfc3b7b10e1c318578d92
BLAKE2b-256 9b8567e26a6fd5ee6b75bf2f1a580ac937a21998e92bba8e2b2f15de7b4e00a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.61.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.61.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.61.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 949fb5c46ca58c6fdb67fe4678d5a473b0d5bf4f6f12f200876b5d516bf910ce
MD5 c3588b35c3647a6182ebfae775947b1d
BLAKE2b-256 fca5def4025aea8b2702d74590cf1628deb5e42754c386e02d136952f7b0d759

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 86a07e5ad91ef9752373a34ffaa396cc0a5d1ca5518b9f96c039d11330c14bcf
MD5 112c6515a7885920588f7054320e7bd0
BLAKE2b-256 6a0c8142236636bfd3694c4e777aa2fa4463015802792c06715506bae5caf2f4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.61.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.61.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 736fcf64a5626ea2ab59f5960f568f1650dc94674a71485d3906479e01fb6726
MD5 25659c2e03e7b7cc12a999af6b9d4cce
BLAKE2b-256 7f469aa9fd388e1960210f8418985aa24b2d6d5ce262465dace1abe473a7f8dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.61.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.61.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.61.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 390c0b93c51bd3d76efcf44674ae95df613c35fafcf89f38f4b913e792616e53
MD5 ede04b48b8e8f7f59166af26212d6071
BLAKE2b-256 cfcdb749787149d9ded6c8969f741275ff3db9594b2be02497267aa435c593f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f4576529e148eaa9dddb77e9f5c9552039973aaab12448ad29747a2f76846188
MD5 aa30abeddd6f27914ec6aa83c5920d48
BLAKE2b-256 6ed3a8a7130ee642a6bfd91a36b66f5df3e3f98834aff7c15336cb796a6766d3

See more details on using hashes here.

Provenance

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