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

Uploaded CPython 3.13Windows x86-64

openbricks-1.72.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.72.0-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.72.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.72.0-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.72.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.72.0-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.72.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.72.0-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-1.72.0.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.72.0.tar.gz
Algorithm Hash digest
SHA256 107d51271d5037199d23ce454f0944d83c357ff2c2889f16b8926e60bcb01f0e
MD5 247bc7a6d2b7a3b87f2231304a441bc3
BLAKE2b-256 6bbd4f061172ff8da40ffe8dfa07ac6d70b05d9913136dc6ca91415b7ff9658c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.72.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a8c517cdd35161fbfc2c9c398e3ccc9548d05df0c447094b14564c8f6865070b
MD5 61b4755ffbfda49ed394f11da1bef79c
BLAKE2b-256 262f4d7606d19e2f3477de8940e2d4002f5b2e217c4c3a72570579bb1738acc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.72.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.72.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.72.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 10c45ddb74cc572b41e00de916bcc4d5a1a0b79587dc1bb62d9619a4bc6aca49
MD5 242fde5fca43d717853f13e20eb6af94
BLAKE2b-256 cf58f9a8b4fdc097f9f9a40fdf76a52e6a493e22d78bf06803a1a9f397b14671

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.72.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 9e465a23b43a7725ebd65c29b9de6e2c664b20d6fb00b2a9ba2cc0132f3fc4a0
MD5 322884fb4c89c67a226df592a97e8b73
BLAKE2b-256 a54880021cf393c2efe01333d33702dffbc3b0033dea3f28d848b0a090db3317

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.72.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c5e03e03cfa6638d6661588a24d3fdacbbacfa056e368cc2a9b3cb73c2d8d538
MD5 453f2aaa9c5ef515ada49de2fe78a3e1
BLAKE2b-256 6598e21c94e952bb5518fcb8992ea8812833a9c76cd46d8bcfee4c69871b6fc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.72.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.72.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.72.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ea23494479beaf02bb94e65190a24965a4fc3fddb8b83aebc472b9d5852b46b2
MD5 0a4951faff14877edb75341228227c57
BLAKE2b-256 cf7e1b10997c807e6e02770119c4d64d0ac2c39e195058cb81097efa6d33f30e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.72.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3985d9de374b1d5d53d3a67e7e3acfbfc5e29df7bd9c423428d98d34eaf84c05
MD5 87c1f2ea24d59edde7ed05f16094f252
BLAKE2b-256 2fe9a1e390da7ea434aa2a5ce9225facd4a0b4a818fe71af70c45beec7faad55

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.72.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 533aebe9d832a0bed64937bce4f20b10a36921ca7497c10e442e1f327d2bf054
MD5 26f03a467f8f8f1dee09ef123978c836
BLAKE2b-256 a06865da4f3605ad8231ffe581ddebac640b9436ea2081491b913c7ce68eb841

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.72.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.72.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.72.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0d195f3a5e28b0d10aa04e99c6e63bea9a061ef538da110924f1a0b07930b32a
MD5 8f03ae7154620bd4cf58736941b77e08
BLAKE2b-256 d544152c472371c8ba08610f56004b2689e636cbdda324340ae6d6ebc7780af7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.72.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d1745b3c6943918d4a23edbed58e9366ea4a90f7ea96b15778fb0c569b3dab7d
MD5 69b530c430f7322a538732711ceccd41
BLAKE2b-256 ec4d7182e04fc3daca4a10cbf53da20c1ed1fd5b424fb8baea3b4983488e8085

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.72.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 73d0a89403ca5582af5b051d421a82d65a601c1321d70c2c515b4535ca11a34f
MD5 6033a6e8d5858057667c5dc38057f6f9
BLAKE2b-256 95540e0aa4daedc71f58eaab72f1c1c038bfc9690f43e8c761fef1e326a37d27

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.72.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.72.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.72.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a1cf596c18cebf399e7fe6d8a7974e9368fcfa19df64929161f332abdaa2fcba
MD5 5722a1b792487ceedf23257959a48790
BLAKE2b-256 448d1f6757ca8de57eb66e52441b096834490e05479c17405e844e56ff353707

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.72.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1a894d176ac941f5057e7078b006e3b6ea45217de2958b7057774759376b9785
MD5 49d95ffb41f3e6bbeedaba5bcf68d622
BLAKE2b-256 ee674d5440faf13b51e307c47bef514bf80d3a19e572a7d25ca203982802de91

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.72.0-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.72.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a0a2edbf08c2280b658911228ed3b11e6a823cb26997c2cc5060acf35da71309
MD5 45393f00c9fefe1452ed74e5b02b9de0
BLAKE2b-256 069561d17ef847c5b257fe7565b12c8f0af34399c81802baf72f1d541cac1b25

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.72.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.72.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.72.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 413267777e7266f27519b154346ce7c12a7d8aba98add24105f8e5579c26e362
MD5 5326ffd33a68aaef5df541e4c2c1400d
BLAKE2b-256 14262c7eadcfe894c8eb132ca2d6195b64e4b0f14b004af83c892be8e85b0cac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.72.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5f9921be6995c50aacfc64b046f931a60c026f739373d1701ae8ea87590c658e
MD5 c73a7f87689b0d87435237d8fa3edaae
BLAKE2b-256 18512a556e0233467082d6b2d5ae08a7816ec16931143bb21158abae958865b8

See more details on using hashes here.

Provenance

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