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

Uploaded CPython 3.13Windows x86-64

openbricks-1.79.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.79.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.79.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.79.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.79.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.79.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.79.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.79.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.79.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.79.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.79.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.79.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.79.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.79.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.79.0.tar.gz.

File metadata

  • Download URL: openbricks-1.79.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.79.0.tar.gz
Algorithm Hash digest
SHA256 7abaec75a660b9e968d166c3ea4dd6a2112d5dec4f778189c8512625e23c474e
MD5 b04f918d21764db5f55d620cefb6b632
BLAKE2b-256 ec949e6e5c981fcf1bd956c955e3a9b2e932e455e717bf7f643ebcdb614c3239

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 244bac51dd71c3e302127e16483bf976f99a126edad724993c376529184b7a21
MD5 4f33643180e2c1d36b85fd2bc0922cda
BLAKE2b-256 a6ba1689789b10006e60205c941e1e6222e9c979612de5daee134ff68dc5692b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.79.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.79.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.79.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 876733b0c549efa8279e30b309d747da6217b42b9e4bd5366f3e3b6eca796219
MD5 738409bcb7d609f0a4f6deb7efb17b50
BLAKE2b-256 de842772b2bd7a7b0fac9dc6d48ea1c42635710e9076cf533a1c5276752678b7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4cfd7f713910145e08b216d32f06cf30618388a8d5de87e9cd3466937cc136b5
MD5 323674b348f765891ce995c93b554b45
BLAKE2b-256 7510a8c349cf60fb27e1d7961cb0e7dea801834c7f17b9d55a75f5502e409ad5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8dcdecf5419e5bdd9d6f9b28fbf465bccc4715878467a8d0d5bb13ce8cabc6d2
MD5 75c84fa6a5020376bc00cca063308472
BLAKE2b-256 ead2633083b4a9973383ab199ae770eb96760cb06120fe5856b8a450df043ef3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.79.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.79.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.79.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e8b74325e7e286242c90565d6eb781023335cb21dbbddad19d8725cee792b8ed
MD5 275c8352b1cbcc1afaef4bb0395200c5
BLAKE2b-256 807b86ae9847739742342e2721a6a867be4b96a37f80fedbb018784bd9dd0bfa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8aa10c87abe47c1083ad9e2b8fca92f2eb4bc5b92951be708c076aaa965bc66b
MD5 6cec1aed1b7a26f1b9323cec9cb7b490
BLAKE2b-256 024f246835bdcebc3a51684cc546d46794b9d77ea1b28c091cb797cd257c1e9d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cb53f20b7d6b8ab064c21eae591b02ac82638d112409706bd540a27fa6d68c2c
MD5 1c67a02d77b90ecac1289ebaabb01314
BLAKE2b-256 e3cd9b237640fd85f701aec6df22b29fbfd86959193d36de2313394778edf2c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.79.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.79.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.79.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7fe100fdfd9f8d27077c62dad23ce51d5d8fa5f50d9b001579e30334505eff2a
MD5 20dd0648e6298d8e8ff385e5db004814
BLAKE2b-256 9bdb6cf7e87378b387954c44d779f5e9ac2bf92d97e772e5b868dcdeb1e62581

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0860781eb923d1d6991b697e0a8219b1ed7d182c7913dbf82c46339877a10750
MD5 5124d7849e4fbd74476e7dfc64d2f0d9
BLAKE2b-256 15a81082021756877cd98af195acb540a9519ae79ebed3676a36d11fba919fed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5763d391a069bd77b4ee90630250b1b5997c8a8afd8bdcd27663188b4be96ac5
MD5 a645bb4a47c1e0a565b540ff7061a024
BLAKE2b-256 7a3139217bdd8b02875ab1012fb37efa28e26a855974a0e0f429589a66adda07

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.79.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.79.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.79.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 02c2d954ec79d8b8fc42a01a1ad2badc9ae7e25064cff6294d98d33e7feb0394
MD5 052edd80abc614537fd976c40922e3a6
BLAKE2b-256 371c5525da6499d809ad79e05195a33f3bae6dfd45a91e4b899fdb60be24e2f0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 86a0340604702d5edb35e5d194615ffe77e36ecea21d16f89dde97ddb0d102f4
MD5 450fc1810d9334cbb9cc1a74704a3153
BLAKE2b-256 57aad7d1f883fc7e9db43236d4a4889bac32259ddc6662687b2a35fd02b11124

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.79.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.79.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9654f7e00fd5af0b9da194f08caa76e44499f6718905ca40bcc7c1f99112ac0f
MD5 a67b18b8924f8c65f93e3ad8b1c83514
BLAKE2b-256 a4fb3ba28ab76677cacae52837a1ddaf9a9ad616f3543b096b8b96216798d2d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.79.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.79.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.79.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 89add10e1cd756bb13c93103e3c84e9ed90c2d8e06a4218892e2ffd6629cdb6d
MD5 cf2ad6ad6a42b58e15307a303b614588
BLAKE2b-256 6ee6ec49fe613be886d7055784fba375a15924c4b6aae65af7c787612566f513

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.79.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 92f800a4b2196eb3fece35d16c1a60a29bc4b10f5a1b84610343f4c0ebebf833
MD5 f6a252b320ad079b4f14745868be4b18
BLAKE2b-256 cb33ec07305f8868091b7140b808fb7796ef5fe0d75f7dc134f4c66f39aade6b

See more details on using hashes here.

Provenance

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