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.66.4.tar.gz (3.7 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.66.4-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.66.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.4-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.4-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.66.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.4-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.4-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.66.4-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.4-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.4-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.66.4-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.4-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.4-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.66.4-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.4-cp39-cp39-macosx_10_9_universal2.whl (3.5 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-1.66.4.tar.gz
Algorithm Hash digest
SHA256 942095c7ccfb95f4528327837d76ebd5ba3956ce68e059e0d17266e74c390a5f
MD5 44b9a1532cc772571a451bac878dc99b
BLAKE2b-256 5aae9d7cb99c4cdc1b775799c34d6bbb620f5ef31b1ab60fbe47931d53369998

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 00bc9bb27af2ac1798991e1b55af776260f662e22c5c7541ac620fd8a4cc83b5
MD5 3da719a666b8177cb504d895366f8a70
BLAKE2b-256 02050829e70e48122fd8a64a613a3d563f765c25373b00e3e042a5247e8a4ac1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 73085ee8ebafbcfef9571be921c36da479dac69954328a46bcae76ea549f37ca
MD5 8f4e4b6154fcfa7982f8d381b8ea01a6
BLAKE2b-256 067fd0c2ee1e071e374084c99d55c294b523646d791700947e4ec30cf4f4f1f5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d54e20504683824847a8cc53910165625326699b8fbb2e5fb6401d6c59e7a4f4
MD5 8a04d6c15454b5fa943d271d7f26292f
BLAKE2b-256 875beaa54bd2d2ec022689b49bd3f6cd9b5a8d2d636c0e80d174b6380e3d1c74

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ac13b7484bf034f19a9f7a3ab195d749ace21f7014d61237ca937d82b09b8754
MD5 86213b00cd0a708aaf8ddd19b6dc67ec
BLAKE2b-256 b485a6ffe4303465d38f060c67fdf184d452ad08d221d9ff246685189bda4df0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c684f17bd0699db3204b29395f309867dbabe5e47e2fc89d58ecc3deca11a5f4
MD5 a73a82c991a4b25f6022ca56e8f1b52f
BLAKE2b-256 3ed1681a310d3f36f4aa58c91de20bad5aae5934b6e05b8da4bebadd5397b561

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 96d0057a7854f6125daa8aeb93c0db8486f11e531c1c740afb5b76d211876373
MD5 3fc413fb9f730a26205ce9c43c1b740a
BLAKE2b-256 05ca763dccb923c6ecd652c309936bd6f8776f8fe0754c77caa15249f3cc0027

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 24ff726861df2b72efa56ecd9124506132d94e5db360aad0e29b1f3655e887c6
MD5 0d266d21f6f0ce50b2f02f2f190ff26c
BLAKE2b-256 be5a169bc1e7e6a5ad619cecc2e00d3fac8fadc0fbd6d4af524bb6eebde60b83

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 50cec97b4145c034782360d12488021251549270a04d97a6201272aa290d5bd9
MD5 929ad5bca07b0d19f5f9db3b73dfd686
BLAKE2b-256 1dd3be3e4e378dba00d389ab5b6f339247b9b1d33923c62d8e64c5ba2cac7b14

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 55e065edccdc562d6924ed7f76ae0130482a69a16e9d8a834464473fab7e8721
MD5 3eb21ccd9ecbcdaa46db95b3c15973c3
BLAKE2b-256 1774148512f547117d0375c27d01459131cb7608c8de1ec94fb8b1ad21c418ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7939fa92a55d0df3446120f1100feb98cf41577efc382a670fee8d51eff805ec
MD5 093259c78667d813b1759e58c847ec7b
BLAKE2b-256 5d6e48b6bed36c378c2c6fa09aa2fc94f0e9ef4562545f31e14df6d28f690e6a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1933ba5ccb1599278528a6ae616d93edcb81353aab56fbba9b983e9dc1c6885c
MD5 114dab79d12267835687aa0c3878baed
BLAKE2b-256 2d26a7344f9e3af31943503cfbdbf8284666fb909ee177b887791f44615def1b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 09317664d6c50cb0c231f45d4620c3f3d3fc51aaa2a3ace1e69256e56bd5872d
MD5 8adbf460fbb535d717f8cb4b0ff6f9e6
BLAKE2b-256 77136c14090cd689e1d6590fcf5fb31188aaa7b4c2b0ac9a4afd1d0827bc641b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.66.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.66.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b28abf6c29ed46ea740451e62d721ef7573454d47f214a9b8e931c677c08677e
MD5 efbb699f7166a98f68b78f658093289e
BLAKE2b-256 f56ac00167781a8bb0331dd9f7b80fecfe08861c3fe71f6bcbe982d0c0efe3f5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d3c407063cc02ec631bb035062b21ea802212b703deb05e9cbeaa5324dae0a91
MD5 317c460c6e5cac6ff592cdc683847fa9
BLAKE2b-256 56278f4d887c8b1ce04c6f10a83029ae67435b0df3d1df00d3f22426aff31fac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.4-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ae15e341b1760fa8c6126229f132ef6fc143b9a1fc59780d3bdd2e06c01bb782
MD5 3b79d249cda28eabb76e4056e67259e6
BLAKE2b-256 e9b34dc6d5ad11da027ed3083b4b40b29882b7202505afb00279c21be4911319

See more details on using hashes here.

Provenance

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