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

Uploaded CPython 3.13Windows x86-64

openbricks-1.81.1-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.81.1-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.81.1-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.81.1-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.81.1-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.81.1-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.81.1-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.81.1-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.81.1-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.81.1-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.81.1-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.81.1-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-1.81.1.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.81.1.tar.gz
Algorithm Hash digest
SHA256 9b87ffc1a35f4145b6860de01a1e61de7cd893b1861201f3beb90c7a138a2c35
MD5 fd5aec75a4a3e5605e0e4ab926958541
BLAKE2b-256 19961546a6706fea93d62643aa2e0f0312a49ce38b924a2d29257a33a8695014

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f44aca00286e2a14d76aec671e4436dfb72d457ce83e3930bea879973e2a9a71
MD5 84a2e5fb69896c3009c596b96ddcb4a5
BLAKE2b-256 3bafc8f8f3e1dd4dc247751cb14fab339599e31d2a5ab733fa051939cfb7c7c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.81.1-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.81.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.81.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 51fa66bba8b9945e95064341352e86ee4faef6d1dc1171648beccca6f7f49de8
MD5 abd25b80904387e54c2eaeed871b9d01
BLAKE2b-256 92729b6cafc8c3b71d792224f0264ce3b93aa43ec21e7c1a240053bfe835af06

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3b9bf1f87b948f2715742684702e192c733f2a3b6042ab5b464e587ceccee11d
MD5 518680c190865108ff088dd3f66badfe
BLAKE2b-256 b4c6f5c517d6d92d619586bb0ad683923b0686f2aab634b81b793a86561d8479

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 269d5b90d66cfb4c41c301e9b006c745bf52289c763853f2b5584137ff305f02
MD5 0fcdd14abf1e94e29568d3009931d06a
BLAKE2b-256 8310f6925488d8928d574eb89c6712e45c6168a1fab9319cfca66dd80af6e0ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.81.1-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.81.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.81.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7565cfce4d2959255585ec540053fa968c6bc27983bfd40a17946b55614f418d
MD5 feb6d468970c40886e85729382391ab1
BLAKE2b-256 f2159901997a8b1e9b540776659d0edc961843c94df16d5be955f824aef6ed68

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 939e871a7d498a3cbd844eb3ed438b249c1e0bec446760532633318fc3357846
MD5 3109c527eab73171f7f10407cbdddb3c
BLAKE2b-256 a410fe33290ff711c08e7e5aafea7557081057091883564584aea5d9329e5800

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 91f20d6b37bfbbb62dfd75c09a56d67af0c342cb5d82de06e655c28401e122db
MD5 39a3529d1763481008f38cffc4ade5ef
BLAKE2b-256 5fe6ebb20493922009a75d09af4c5320702c11a28916c879b105350b12bd9671

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.81.1-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.81.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.81.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a27d2240f82c835e3abb42cb684a07e369f6aacfc0448c05c763afa5e638a98f
MD5 4d970ad8869cf1fec6a3aee19c6d4c1c
BLAKE2b-256 587ffd4fb53155a8baf6389e65c87d54c0498f1c5d8b5ce083dd1f2aa6859190

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 611233e6ea4e41e2e25b94b8f3bcd9213aadb83c2126aa9de59e5c7d943d2442
MD5 ae42901aa2b550efb467103d97907860
BLAKE2b-256 4077287b66fa291dcf2d300c55850d29bffc599202e50e175f4fd1c78d562c1a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 990d47817a4d93f0c8f90f5f1c36a9a17cce8c30829be272c261621e76fcef27
MD5 e145c4ea5b435be2ce8d143fbb9f3672
BLAKE2b-256 c3ac569de38b1626c11cec6c1dd762afd763811bbede3a68bce035519367a66e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.81.1-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.81.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.81.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 413c20bee8175ea68e8d476a95f422245419247c31ff4d6676fd23ce7d58f0f7
MD5 c565ff91acaf7af2183c04eda9284f37
BLAKE2b-256 c7aadff3b744848f11024471efe61d6481c4ddd31a8c8bc3df011d7b9404796c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0f8a2e5ef6389597cfb6dbb41e61dfed418faf1f629817793d417ad49a464358
MD5 1150f9a4ac7f0ea4625dbe32669d02d4
BLAKE2b-256 20870efc4f7ca9b69bba80eabd075c3fb293c277175583ffe6db3275478150d9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.81.1-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.81.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5680c6c6a072610663b03b3dc5bc9fe8848b69116190a283956bc469e58cb281
MD5 4beac9cffde2205dc01d02e7708c04a8
BLAKE2b-256 bcc9d4adeade81a9351d4f0ae532e52e6069cb5bba2d26778edee48c361866e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.81.1-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.81.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.81.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 45bccb905df7a4adf72544c95dd53687cb31339ecba03d3643828f1f8549df61
MD5 9c646eea07585f7716080e6ee89b702d
BLAKE2b-256 0417bfcdd873647456dc3416db023495987c01f5e1cc6a6dfb25c029f31fff69

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c44a5df03d5544bb8e88a538dbc95ef52ea325e00ae3ac8630a7a3d15bbef310
MD5 c832696bb1910cd3f284c8d6a7607d33
BLAKE2b-256 0aaa777db5e82bcb9da8b114adccf0b21cf1fb47983f05951bee7d89fc271969

See more details on using hashes here.

Provenance

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