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.42.0.tar.gz (3.3 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.42.0-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.42.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.42.0-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.42.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.42.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.42.0-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.42.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.42.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.42.0-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.42.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.42.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.42.0-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.42.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.42.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.42.0-cp39-cp39-macosx_10_9_universal2.whl (3.2 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-1.42.0.tar.gz
Algorithm Hash digest
SHA256 2155d13f403e1df289af79cb98d5ab244f72314ee539c92ffbc6cf95e5162fc7
MD5 62fda5634f0f11128a51b3db9c6a8aba
BLAKE2b-256 71df689795f2a499d04664cd44a6026517553fbb79d434975e8e8c9e37d15b97

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.42.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cae4485d6f72ac21a8d8aa8be52de0e877ea95543bffbe6e46f836577a11451a
MD5 d19e88ab05f1e19f65d1aeafb3211814
BLAKE2b-256 7dd4f647db697028fae4efc59eacfbdae979292a5a08619c762236a0518279f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.42.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.42.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.42.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 176a1d48e349ad9b510926235db6df0806ce3e6ed197f38e78283c4b1036cade
MD5 adf0d693d45a81fa4495e721f0c1f556
BLAKE2b-256 6069465ade5824cb917ca3d3479266a9644d3cbbcbe0a85839b3a40416215e89

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.42.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 9ec8f1f70aabcf0c359e7f98931a0d2eef61638f421aae148ac8ab8fdead48ee
MD5 a93823f3d263ee0dee7c210606e352d6
BLAKE2b-256 4d2fb3999d526bcccb019392203029923927f6dd2ead9190f636d5d1aa243f42

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.42.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b26422be657cfcc2645fefcc1d1ad0ba1b9f935d21c57013245635e90167814c
MD5 01e4e5bd3aba7cbb56dd44314069c787
BLAKE2b-256 c88169ef7d1ec83198aaf877cd3f2de7fe9c16c745cbc57badb42602b912b7b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.42.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.42.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.42.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f88bb99d8a3f869675a1dc26dbe277ae5020443f7c762d48ecae182d8f102d05
MD5 04f9b7003ab71f86ff2fe07c0f20fed3
BLAKE2b-256 7bbd867f0128b0efbbd6c05916faf9ad2cf92dc1cc5c07d1e83d5381bd51a659

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.42.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 61a7ed7e3ffc44bdc6af507979748f52df2e1f35a815235401cfafc0d61562dd
MD5 b0f8ea1b6db163e25b224c9e5b04c8ad
BLAKE2b-256 6e9ed378baaf13416dc80d35d9afd735804147a74793227795c5146d678ab0d2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.42.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8b3aa9be346dd516141084297ce50ced8b50bc698ddd24d9b97e2dd381b1b345
MD5 7ff8ba64bb493205dcc558742be5a48b
BLAKE2b-256 6f4bc07465752fdc9d77df7f054641a2cb3a18e3e844f2edb5306e0262216712

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.42.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.42.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.42.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fefe119a26e948495a936e96f3d98d998632619db2ea7988a9cd08b2f491f618
MD5 e4752d41905eec1f592873c28061dd38
BLAKE2b-256 8d35345c67530fded62c8aaacc1bc6e6f00fa7e0e4d0261c8c3d20a0511c9a80

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.42.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 64cd02e1a709f47250ea902dd19a3cc5234564b55ed2a310519a543c1098340c
MD5 d7e8e0c67accf4b1aa28079181fd35cb
BLAKE2b-256 6aa7e74c8a57a07aa8493f89d7c2677e3bdec9448af225f50f01ed1b3fa14335

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.42.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bdf7c82b1c708bd908f10b7db7044b649befbbdc7f6f81d5f9f98f069487f256
MD5 58c86258897144f53814ad25a3b4b742
BLAKE2b-256 9d96d5130fd2e194c928e1293aa82cbeef867c48ba8f359eb3fbd890b8fa9a8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.42.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.42.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.42.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4619aea8e44536bc2dd3cdd43e58c6771081d3091601dcb303f812adaaf81fcf
MD5 c84f28d581e8273ffd07e0915df0d318
BLAKE2b-256 ec5a3896466c2d2347cab96dabf7641768be0c88034f4433970b99443c91fcf4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.42.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 99656b5f65c7d7c1c07369d12f76d8927d43c761a0f254e39ceb48b71a54838d
MD5 e74763ca989d4051be26329a9ab13484
BLAKE2b-256 ba5a78b672c324d228aa2b41d9cd43cd3e0fc47daf098b11d4e80ce237905d9a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.42.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.2 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.42.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 333bd9a0bf428c24b21e318fa0db6e9245e1b108d9141cacbc6b92957da2293d
MD5 df240388dd72a1f61018d070cdd1da70
BLAKE2b-256 57bc3c9c70412c990c150f676ad214cc8d3877711c2c19d9afb5567fbfbdee22

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.42.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.42.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.42.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 819d4d0e22d4234ef74c423b53dce5605675b2588bdb5ac16c9e9e3d6e644195
MD5 f594de74cc7e08d6dabe378054a0ede9
BLAKE2b-256 0856738e9d4d7fce2f2e469319a3fdacbd70874a4b0db25574241e1914f3d2df

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.42.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 86926dbee1495284987158e61a8803f9117679fccf23865a344cdbef983555f4
MD5 f18571913c11b57ef7707976ad92eabb
BLAKE2b-256 1a20d44241efe9250da2d0f2f54a6cb2da99eeb1cd55c4b6495ae230dae93854

See more details on using hashes here.

Provenance

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