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.3.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.3.1-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-2.3.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.3.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.3.1-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-2.3.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.3.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.3.1-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-2.3.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.3.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.3.1-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-2.3.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.3.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.3.1-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-2.3.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.3.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.3.1.tar.gz.

File metadata

  • Download URL: openbricks-2.3.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.3.1.tar.gz
Algorithm Hash digest
SHA256 8ea7852564047f26ef1dc9168eb95de2fca051b3a50a6567bc63c6fc9fb8c5f6
MD5 fa0a4000927d650237aba360ecc836ff
BLAKE2b-256 9610df43b5aba26c2e748a885367ab3cf59124688d3d43b265a2295dae5465cd

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.3.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.3.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0bbb21df45ca424e238c92724e5f17b55f41387fc989c1a417ef80c8c9f90cc4
MD5 1829a7bb33acc2adbdbe3ec57697c314
BLAKE2b-256 c2ee67390694cfa80b2989cf3f8cfc6657ba540edcd261e67c1b53e5d1bcc208

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.3.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.3.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.3.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a001c9afce1793ddfe921f0a968b5a40a383e03307ee523d0c7294405f8eae66
MD5 2f8b34cd606e7942a35199b4482e40c5
BLAKE2b-256 b4d63b497fa41a6b81177a8e4740965568bf9d56f27572a99b00901cc827ba29

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.3.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 c02824f5f3db06f9a3cbae77e12fc552eae45163722c2aacf9677533bd98d39b
MD5 fcd8502eb5f83447084f03c8085217a1
BLAKE2b-256 22c19e43af2de29b67341afefd150494b4665d2d918b20e47d37c168c4ec8416

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.3.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.3.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 602c7195eacc8b8e87f575849d91030c341a4d7ffd82552c2af8477d3d4651c4
MD5 8c2a28642930ad620914b3e82236d4bc
BLAKE2b-256 ab564286e8ded112a37718ee89c1e2f77e41c9c7cec312353ab66591b4cfc83e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.3.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.3.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.3.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 69420c107e9074d7d745dc11038ea45d1daf380713642a1468197c23581a6be9
MD5 9b754ff94bc7df90cbe2a8e775c2d938
BLAKE2b-256 bfb82e7751f84a1578fc5da2802a2a081126c7ee65c4e5382d7947e05438c5e5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.3.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0c7e88818dbbd42c0801618f4bc20210fcf674f8c92a7a6a5fdb7242acfac0d8
MD5 e354e86bd831d1cbce661f0fb32630b0
BLAKE2b-256 192f3d8aa2e1356dde1602ced55a31e27ccae3355502e24d6b11bdf8b4140714

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.3.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.3.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a24b75e23025ae45fab648fbf900668e7ac33142a184ce4d219214273e4aa8d8
MD5 905f1717138c2f7c562d0936d4a6cca2
BLAKE2b-256 01c4564e78ce0e6b2d4ec49f3dae639202735cd6ebc17c77031f74273352f31f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.3.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.3.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.3.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 20ec58f12f8de89986dcb757d3856f7b6b039babdce4a161ab08e67023337156
MD5 1d09b483dd069ea8139f5ec6b4b74074
BLAKE2b-256 251c0e91637d2599a3c8063cafb070c3cbb5c3f727839dc5820fbb9864b38236

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.3.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9fa5e8482c9d35c78368269b20804a2884a2d964bd30dd6d31215054071156d9
MD5 f7a364ffce3be672922f73ad2eea4acb
BLAKE2b-256 c2e2ab22021e4520851260bf8a67359c3e4f9ef37e08b5563d59bbcd6cd665e1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.3.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.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6c8c5139c2f10e975b35d6cfcb816a031f0032f6600a600f5ac854b804a68975
MD5 4c2089e5358e4ea9f219177c5ad79929
BLAKE2b-256 e5c2996171d366dd856dc90fefb65b3aad6cb474c6e0629ee91c96b5744a4cea

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.3.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.3.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.3.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e5781d26fd75b336c92394551e65f9fdc35afc0a3b19aeb9513b2e61bf53efa4
MD5 6647b045a9d337fe25ff672d0cb78b01
BLAKE2b-256 b60e9ca1fb8e89a89fd2a7d8e6d1ed503a6977ab4ab3b00666a351944f56af67

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.3.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 779a17f110424c679049ad3cad38190e6d260925169d414e5b5e23038a1ab20a
MD5 b81ac774a6ed302283ff6bbffcf21fbb
BLAKE2b-256 de765ab2125e2f550b8b60affe78f01e33b43c348f25857a5dbd4c3a2983f05d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.3.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.3.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 63bc11ad1a3cbc653a78e02a1c9fc0402a45bb0e7548aa4b9fa5ba332bffdca6
MD5 61f20188b22f0cc7ae55d8cbb4f59a62
BLAKE2b-256 2f7394e4288931a46067229b39d4ba4c522d003d1988471ad25f4b8a864a8e39

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.3.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.3.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.3.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bd5f75c852c8d90d31c7efcf2c5ebc9bfd44d6535d15fb80d7b053a8d5cfab4a
MD5 ce8f032b5a83dcc55140b58875af49eb
BLAKE2b-256 fbb0958d090c7b60f2c76c36df9480ca429d409d8a97150a0b86667b6c9d0c89

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.3.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 144043b99bc6ad86c92f0dd08619113d779fabc604c6e58a50565fe09a6e01c4
MD5 8a67e3d6e3764531f45d409e0095800b
BLAKE2b-256 0197a17709362103c34fb579f3991a1b47d8c97ab32e1abcc2c225064f9b9067

See more details on using hashes here.

Provenance

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