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

Uploaded CPython 3.13Windows x86-64

openbricks-1.82.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

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

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.82.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

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

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.82.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

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

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.82.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.82.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.82.0-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-1.82.0.tar.gz.

File metadata

  • Download URL: openbricks-1.82.0.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-1.82.0.tar.gz
Algorithm Hash digest
SHA256 10d32769ac50ba7ab9c6ce028f7a183f2ad76e0afa3828a5b7265da1e9864628
MD5 da77e81942aa7e4bc374e989695c76a7
BLAKE2b-256 76a346ad9821e8c214f85d10779b0962d61bc5b861cd28ca5be100950817d18b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.82.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3eb4d14c6b5d75317afaac4307212412a80d8fe56568f3c2a09939064ca33cda
MD5 24400db02cdb7da00443497db4fa262c
BLAKE2b-256 3a06860c1ebcd2e4d37f4c9dd62b99bffa111df8ca5fb247b2ee4f420f833eb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.82.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.82.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.82.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 106fdfa43b42de5f9aedf77a0c023dec6e0cc19d35823a90564f7f20b28766ec
MD5 7f77cbba96277a0a9cd9b67e12c66988
BLAKE2b-256 7cd06866a1087553dba864f1eefb2873e7202aba790b638d9b32c78d83ee190a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.82.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5487fd07a93e9b861d8c38121f397eca67290e3edd685a214c558d5a3932429f
MD5 8f96a8e48f020a6cb8d58f8ae4aa1fa5
BLAKE2b-256 355264455e44381ff3bc45b6653c002e5a87023caa3dae3d638c1d72ecc82855

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.82.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0aef995155d502361b656d3868ef9b1714c16e7c56886ebf14edfdefcd2fb5d4
MD5 5a07fa37ac5d7fafd2bf0fe777f7b3ba
BLAKE2b-256 78c7127d4521c542e03e68f5618b22a2376330c9f6a8a264d61b68b1bf0afae2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.82.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.82.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.82.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 24ac329e8d961ff760d1c286e8447ad24a99c79bbf7a5ca2ab9895ebc935735b
MD5 ca3348ff1e90afc2995468f22579a8a2
BLAKE2b-256 83d28da61215a72584b94d881317b3ee13bbcf62f5ab3b46217792512d4fa0fb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.82.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 07e2d88347af9edf461a7eb5e45f836778ab47fc3ebb7d8edd4acd827df698bb
MD5 07c013187c2c047000f9ec20b8dda5ba
BLAKE2b-256 99d4d3691caedf4b6b30d7468fa649b275b6e3830dd6ccd96275cb326dea33d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.82.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e2c44d63742663a9c92fe30661a7cb71cf251d97af5a4d4bea4d61374026cf11
MD5 3ab0518a4750250c476d4fbeda22d681
BLAKE2b-256 2ce0406fd32128a9b8e9f8bbb437428ee4367f868af8da940df9bc87845baa70

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.82.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.82.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.82.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7c94053ee75ec4d15441a385c37fd557eb328aa5e65d7ca62995d6f8607d82fd
MD5 d09d0aff41a3f2fd69dd29adae8e274c
BLAKE2b-256 ad4d1000b625f9986e0ed4e68bad79f246e9c90fd2b5aa22181d50893d732222

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.82.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 29504f22c539b85844e33949c2224231c28a48cfd0c36822e2933b629e8c2d66
MD5 f2c56fc974e73e324c878ce0bdbddeae
BLAKE2b-256 5ce40bab94477e833f50026bfef33ed1a28f66814999f1b1a606fbb13c8ca804

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.82.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d8f5e7bd643a37024592e7163c00bcadb07663bd4bc09d6e5de5707ceb702908
MD5 c72ae513810480a5fe4ca604a314585a
BLAKE2b-256 3c6b77b1ce0d05d4158d195b20e7b4fbea6a83d2a1ddd730a51d5493f78c9b46

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.82.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.82.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.82.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7f6d489db76901b1c6ee95ce84b7aff09632fb8b7ca3487e7bd41b43c538eaff
MD5 19829db5b46fc9b98b71421e293dcb7a
BLAKE2b-256 23664f977295daad6b1c6e7b5622f6bb442a9697c0cf7e0953225d5602f28a52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.82.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ef4d53b75abd5c4f25040b42897ee73f49f89005172c3839b4345b3e15acce17
MD5 1626d2c34c3d0f75bbacda1739c45ebc
BLAKE2b-256 a7c5dcc034c6909deca4e7480721901d758c7d7b0b5399184026e81219393303

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.82.0-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-1.82.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2d4d1f5e6e938288dcc3877541499361de23258123b639602a6cb4b42a1acc37
MD5 c06f378baad671b2affb45695145e517
BLAKE2b-256 70525e8ab74eec52f64a15deeb6a5a27b9fac609f5ad7c3fcfbcf60c38b113d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.82.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.82.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.82.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 18a3b0fdfc29f515b3f15d45e9c7c03d96f96a9f9f699c5bb9b83bf2033dc435
MD5 b775b4adab445dbeb331502b2be51fe7
BLAKE2b-256 25700b7e3377011252f616646b7c62094815cc6338132bf1a774986461f3f908

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.82.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1464d5856675bd0d45f7156b13a981daf6ab27c92dc99df41dadcf9caa2052ea
MD5 79eb45f67191a2c6eccf6c29d1ad6229
BLAKE2b-256 7926022ddc59963fc0d5a3e422d63bc24d49a9814b95f6c3dcf2852096107ce9

See more details on using hashes here.

Provenance

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