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-2.2.1.tar.gz (3.8 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

openbricks-2.2.1-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-2.2.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-2.2.1-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

openbricks-2.2.1-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-2.2.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-2.2.1-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

openbricks-2.2.1-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-2.2.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-2.2.1-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

openbricks-2.2.1-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-2.2.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-2.2.1-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

openbricks-2.2.1-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-2.2.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-2.2.1-cp39-cp39-macosx_10_9_universal2.whl (3.6 MB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file openbricks-2.2.1.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-2.2.1.tar.gz
Algorithm Hash digest
SHA256 26e9cc3075fde7f386e76959d7918cfd548ff46c5e251db52b60bb75c5660bee
MD5 02eb29c16c659ac6bf22505844846055
BLAKE2b-256 16f745116ebb671bf9864e27207dac469db32781395ac758c7c06a0b9c483183

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.2.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.2.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 08ecfe11b36e82f91a677a6e3ace46dcf6977b95bf2242a082f6f59ba2c27639
MD5 4813d60ebe4e3df674f46830bd56de3e
BLAKE2b-256 4685291ea17107189a19710a12f39ffe7108317919e499c178a7ae311812ae8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.2.1-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-2.2.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-2.2.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 49d51be630d58d5f8ac571fbde399b0e41f312b82e57c14147d9931760d8f55c
MD5 e1f8ef152932f2ad39448be44df5925f
BLAKE2b-256 4170d89f34971beef5f166498e774d9c2fa9bcc30042c119c1d8c00993747f1b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ed2baf627c0dbeeacd703fc169db5a2578b42af89c31af9129e131b4fff178d7
MD5 bfc04e300118608461d1ea11b84e1994
BLAKE2b-256 18c73cc6c9881e4ce321565f46e87cded55ab9836b274bb02ebd7eba0a059607

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.2.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.2.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5c2358648ef4e04d5c0819aa0f525612d38e465e5a843f6245830f51158c6d3b
MD5 22647fd61d24030322ee65a363136727
BLAKE2b-256 7a273491a8a7604594eb443a8267a2ccc06623aed246bc53653d60e15e5a8ef8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.2.1-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-2.2.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-2.2.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b006e76d3dd3bc1b8f9c042b864b162565a2f5d0a78d98cceb34dd170de3d706
MD5 6bcfcba98c94bdf0507def4e85fa7664
BLAKE2b-256 196046a820e4216e8868dcbb00cf772e52be68aea4fe744146acff37d1471c53

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4bbab34005ec8cadd60db82c39143f913ab1dc897c353c721ad9605817f7274b
MD5 8923937d20b722f8c6d1017139dd444a
BLAKE2b-256 1663e743a152dc530cc7212fa70c11c149c981de7cce3d3c02f1217a0b595d8c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.2.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b77c4f764aa8991de89becda7d9241c16c4f33781a11c6ffed1663f3c916dd11
MD5 210d508f2fd4ca8b6fcd7bfd07d9e235
BLAKE2b-256 5c2926626806c2202f835e9ef33f2ad6b0e52bbe271868a6ae6f769c91cbb7c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.2.1-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-2.2.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-2.2.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8bd134b0868ae9bd3503ec18320325215552dc85a2680fa80920b1ae86b7dfad
MD5 69bdfdba956eceada124504a97ea27b5
BLAKE2b-256 99897338671d1ee5c899e005eacb35a921a82f5a16c02bd46085e90fccafb373

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3184e818518d40803c91bf4eecfe289b06dcac9fd84da6e761ce410e48616fb0
MD5 a20c0a4aed88e85eb853c4098d13859a
BLAKE2b-256 727f3dac6c01cf9c41713a4e433fce1b67b71c60d26e9423343ff76330f9647c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.2.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bbce0ddf6f6330f3fa86e6aca3d4834f67dc328ae5cd054ce9fa72fef80d1478
MD5 6eff14c3afdcf97a8b2c45842e4930ea
BLAKE2b-256 d9a58e68b7713fea50b2d73f7d6fdefe167e746ac6c08591dbd3bd012dc27a40

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.2.1-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-2.2.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-2.2.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7c522c92e6425e0038c11fe2a870665666eab31522fb039d2c97b2445483d8ad
MD5 e754c07ddc7337ac37709a3cc664425b
BLAKE2b-256 798b7f900b4a323cada7fb40cca94f3d88037d9765ac16c8b62b72bc6dd7227b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8567aaeffd5bd1c4757b0056d29c52ab70636efa9660001f54603f356aebfeff
MD5 543173aa2c61a4007413ab85f10c796f
BLAKE2b-256 f42a009872f561c79c6c4817b2d6fbf58705e3809eb08607a84875366268e5ba

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.2.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.6 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-2.2.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 59ef4fdf1257eeae270674158873b4eca4b39b02e683bd8c0a16f79130d76d06
MD5 3dc8c4ff3e45bc639baf727b90ea6fec
BLAKE2b-256 0d40a3591d426a8602ec43b94493836183a1eb3a15c45a73672bf2a706471f07

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.2.1-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-2.2.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-2.2.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 17716c03fc466f3017af7716d4ba84f6c0afd8bdc67b5fc3447439ca82577d6d
MD5 a2f77fa7681ff3356c61a0acfec66cd0
BLAKE2b-256 2f9d98f1f788023cdd04f4dcf0209249f0495aeee58dd6a7b6e34e6bd8554668

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.2.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3b8de31a9eca7074ebf9d918aeca06a78c6a4225248840e7ce7d6a6b638736cd
MD5 31602b7c4e6ee8351ec1d3a40589119a
BLAKE2b-256 9f8ab7636b8ef4779ef0898627599543480d28b957d5d147e5993a31f6cb1265

See more details on using hashes here.

Provenance

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