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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-1.96.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.96.0.tar.gz
Algorithm Hash digest
SHA256 7843e4f5d74a581eeeaf3d45ced0d077467263457472146a152f1aa61d138582
MD5 217c93337ca43919e20a0249a59fcbab
BLAKE2b-256 ea4c35af39ddf3a5bfe4d60b210dfa724748fa05ce4d5e4f08ad282ec6be31c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f40e7653409b83de7ea001c0d5eff015ec770d12bacd16ec1a1e4658291e1339
MD5 07b0dcba410467f486904d4a048d5fc2
BLAKE2b-256 9f763cbe8a135e4dda8eae5586dfc405ff5e22f63e29fd256419937d8338ac42

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.96.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.96.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.96.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 91761bdd5b640e9a13ab95569fe0cc8e9a0a61a2ceb9b6bd96a9eb6d3e27c52f
MD5 ba3e1f8af3ed6847541196444755c258
BLAKE2b-256 afe541c1f2a3a9b2bb647f62c478bd156b459292727fcc4347707455b5827ad6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4b9d7dd340b1ff064f86b2993a1fa6c7a118be4c612f512361a7a8fc37205c34
MD5 286fc2bc50fac54f8ff8b3e25df0983e
BLAKE2b-256 e21db1bdf9a37bada7b6ffbb2417187d71e3ba57c153fa14a095c3aab02a0463

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1fb4584698f2ebe036fd07299bd0dde941c4a75a3d77779076e396bf09e82c31
MD5 c038897d57cb5c22f939f6f189daa449
BLAKE2b-256 44172563f61b92e777024ae8e13595bf4853734278a880ccc1e8531f10070467

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.96.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.96.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.96.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 770639c7fa1543ba6e53934a0fd0dce1b5cc71d26ff88b2f6d20a2b3e3b907ba
MD5 618272e6447d1c0c99d6ba982f75030f
BLAKE2b-256 9ed2e92200801351f9bf9c89b2b48afb5637526899962545a53fbc9c65e34ee7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 cf7663cd89a2bad31a51d5e776702cf0ef77a57e18a4e18c1e57b136cba92ae0
MD5 b14a5ad724a557bb884876742cce8111
BLAKE2b-256 e2948fe18c5ca1f6fd2137f4ad7d36aec50c2f5fc2fe8d2d7584d0441d6c6c67

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 139c08e187d571704fbca10c685d69c056490848b9cffc11c3a346c690d87225
MD5 4e6955aa43a8fc291ee7b8fe8424df89
BLAKE2b-256 65f15a00bd10bd8470ff59a82629f198a6b8ffa966f51171280697b67b0b5843

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.96.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.96.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.96.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a8b322858c8e16ed43bba83cf0667e10989167136ed3345bb246e160caaf27c6
MD5 64509891e69abe657a873ada5d3a0f7a
BLAKE2b-256 9e388b66dce76d57ca343738d0a1fb48860f7dfa454197c0be93b00228003316

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1ddaa48e71ab827aa5a5621af753949f899e761331933e4bc9e96d0db8170459
MD5 13b6c3b7ca51ea9c81d422b9fb85a180
BLAKE2b-256 7f9989fd67d70f86123d09c926871df7c4e2ec98fd90fa781c16ba50907cbec5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 70e79dee0d4c30225e875beb56e0147115be8bc90f48b3f86ea096fd43fb1d38
MD5 9a4f29c6457f03f48baa8ee0c8d02d46
BLAKE2b-256 23ed68357c7afd81828ac38260ef69e34040cadc6986c6a78a425abe98a2fdcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.96.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.96.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.96.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c5ae973ba92c86abc26b7c64a018234f110b6162c90b2d9a4dbd1206c6b6abe8
MD5 97bf0db1ab816846aebbb9b6f4c27f52
BLAKE2b-256 abfad4e84a9ed9de9e914aedc478450aa0f9d0d57855d63c90a7102d82b53153

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 813cb7e08d57845f7ab48b0457f85d5bb1aaaab4c383cb225480569ff846f608
MD5 9e3a35c24f00c4088df3bc290d9efccd
BLAKE2b-256 4c2b5778e49dbd89d33fc5022d1e0648d24ed73d52f61e2d4a76d09395e8f6c0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.96.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.96.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3b5e1352d1384b5dcaafc36f1458b8f1f0aa7d47f244373b5672fe6dd1dd6240
MD5 6ab63074af6b791ce5b5f9b5c8245e49
BLAKE2b-256 5f77856d453bee2feeb929232baef3e48aae5281900a5f19060afe0b99791ae3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.96.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.96.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.96.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9037e252a574c4cbc13f6f0290e442a0879a26e5e7df84c70346f028311f03a1
MD5 4ec37be6557f1fb6da51a674a6efc842
BLAKE2b-256 2202dbf7b4f666ae84d120ac8599c96ce560a654086ef24ee5db9f578849405b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 dbdd82106e96fcee242e68080f90e3fd03bf73ca273e1c341421dfdc5b7b26cc
MD5 c6974cc62628ed438dabba86a6606b6b
BLAKE2b-256 b6ea5261cf95a315c9baa631fa135606dcc67d9a4ecbe6cf924764f99bfa5376

See more details on using hashes here.

Provenance

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