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

Uploaded CPython 3.13Windows x86-64

openbricks-2.3.0-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.0-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.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-2.3.0-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.0-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.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-2.3.0-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.0-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.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-2.3.0-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.0-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.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-2.3.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-2.3.0.tar.gz
Algorithm Hash digest
SHA256 fe2ae228d746c13473c3d5da04bbc0ade141f118a9357ad6e34427e429769bd3
MD5 909048eed9e20fab0786f92fad39c54f
BLAKE2b-256 790b6f5e73c97b2a9293d834cfdef4c7477baceebfaab65b165c4ca38de74104

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.3.0-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.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 12629b5891e088a4f912ab0f0a051ef03893f94a4899837e94d456b1b4b2b23f
MD5 46be706301fc9ccf96df41bb8b873807
BLAKE2b-256 16fe6b669956e711d0b95bf0a8317e59941cf9fa9bf56328837aed2b092104b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.3.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-2.3.0-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.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d4ae2b8855ae84ba71c6f1e5baf56b82a2e4f4b68d73faa60d7fae8ae2c7d2d7
MD5 583ac20266404fcd93a03bf303feb6be
BLAKE2b-256 c759bc401cd688c1a966238d6a7e5462cc15dbcfcd5adb6394b357d4f6e55d13

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.3.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2c2af8f7d1afa9d697f2d22abb2fb8e45a434f47ed463f9a60ff0e0e6dbe08fa
MD5 f2e62a5a84aa2e90ee45c78eaa8e05e4
BLAKE2b-256 5a788324dbe8b03e336186fcfad3d670e7a6cc7520a797e9e3b8dd94cebc2048

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.3.0-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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bc8222d58b03563cda8f8e5c68ed3f77d764bdc357a2c1b87bc749191565d4c1
MD5 42d3c52b3750f0968462d29928b1a59d
BLAKE2b-256 40e58fa45eef5be716c8f5b50d3fb710ee8302aacfff7ad0a103c1a4e2a5e11e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.3.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-2.3.0-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.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f3edd1b215fd547521bde156f08185957bf926cfda223a318d6266ad2a376db7
MD5 9da0172ffc59fa2999a8d34d458f417d
BLAKE2b-256 23f4ba2f314c0875c3e86e470b934844ebca32bab36d9ba8cf07c6c8a0b961e1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.3.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 9e46a1d6a64f42bb6551cd4c0061111e24624b97589b5484c23faeedb644528f
MD5 5f2dade410b1c6a274b3451a412f99b3
BLAKE2b-256 ef3a0cf6a602380dc852aff298e50bdaccc844dafd0641fd448d2e0d20f8087c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.3.0-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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 27fef8b42bcb36d17acb2b1f113a86519f5122c9d49c5601f7c8ca6af579734f
MD5 550809e3521523a0be6a832cd01202f4
BLAKE2b-256 f6dd32aad3603aaa608e9f823c95c663b5ea5b29c69a036cd986d5881975e075

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.3.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-2.3.0-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.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 04080b045063dd78cdc9451b903db340a913ff9202b47a8fa3fe27089cc64a2b
MD5 86b2087b4a4b167b28bcc75f68e6178a
BLAKE2b-256 a5f4b862b6761e94cb03f28584663ee80f555880f8f4963e8e59373df4b1eca6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.3.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 77829ce01137ae65c8b08b8ea966e0d1f39ef6ab955f67596970760ec61e10c8
MD5 fcc169c81a0de8cd59bcb1851c4b34c7
BLAKE2b-256 53a2d15c219c9c233752229fcf94830592f5e71d7b59c05a110f48e69e4225e1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.3.0-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.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b6dab2d1195492ad2136df86ac7fbcb5947b37411ad36e296cc40b9e77c711c6
MD5 b138e00c2d37d233da241049b1124778
BLAKE2b-256 ce2fc2aeda9505502dec6cc3ce50bddead53b1d180ecf6e0eca303ffa2059ff0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.3.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-2.3.0-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.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2823bb1683f90d18783e0a12bd71a75d7a98d1f04292c5cb1df471fe702fc5a7
MD5 8c064dce21e95b9bbeb74d9fe5fd8887
BLAKE2b-256 6e079ce5a54a48ff2ede81130281a960d5c02d71bc513f8b72d9ce3a02719214

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.3.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2574f1e3cd0bd111ef347f8ab57651d7a6899a8a3da2bf7645159f072993c688
MD5 aef72b01bc0c2fa18014159aed4d51bd
BLAKE2b-256 a4b151407ba142805bb6e25ae64c8019c5a1251234c128e24d6b195f0818090e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.3.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-2.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d81b4a49ea60909e375dbd658a4b4782b025adfa5961241a98072bb228662f65
MD5 8cde06a8e6d4e928848919f92534288d
BLAKE2b-256 de802db9010bf9a931a4b9b611e31b44b3470da8fc37335d00259eb5e10fefca

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.3.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-2.3.0-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.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 edad7e37f8ed88db784e5ff5352bd970681a7ddbc0da6d53351b3133556a2b28
MD5 cae1510996d99c23390f891c9296f4fb
BLAKE2b-256 a022a57244d8777a4183b8e07486f05f7cfc18448f30df2f73625b2f95bb221a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.3.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 75e2eb9ce0a4aff639f874ede6e0ffe7d6058f9b429f69a571f6274b754983c7
MD5 2bd087b0da01a89dc05563c1843fbaf1
BLAKE2b-256 e76aa64c5d1fc46aecc61a59921dd5c3792cc249bac10014f4b7f9760aa3728e

See more details on using hashes here.

Provenance

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