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

Uploaded CPython 3.13Windows x86-64

openbricks-1.81.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.81.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.81.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.81.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.81.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.81.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.81.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.81.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.81.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.81.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.81.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.81.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.81.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.81.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.81.0.tar.gz.

File metadata

  • Download URL: openbricks-1.81.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.81.0.tar.gz
Algorithm Hash digest
SHA256 1fae0ee519abf707738187ae49b73b35e52a8b332383e6d6ce13bc0d67e87da8
MD5 1fe7ff85d4427d104646ce0a24e0b7b1
BLAKE2b-256 1aa338e9dcd025b13f0d3319d67e6b015243be6e46f20d6257a202302948d96b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5a68b38de9104f7929b84690aefceb0d42bee785da1de6be0fe546a69fdfffb5
MD5 8dc16a71069a5558329ccf63cbb3e582
BLAKE2b-256 2dae496fad8ea04d9b997cabd69a891b4310d8c061d0e11869d11b6c48561041

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.81.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.81.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.81.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 93fcdb60b887fb8902378063221656833a687f15d6177c17ec3d403e3ac08ed7
MD5 c2b946b3e09ea737370eae67937b49fd
BLAKE2b-256 b4aec56f79a5ce616d32a44ca59ff0b37fabd5b25ffbd0c93da9915ef10a2915

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 86ea0f3731799cae9efa6bbfa7da4b20841c9a1bbe5753c586fbb58164f7589c
MD5 8580808c08013331cc939dad478e57bc
BLAKE2b-256 70b29298fbf8dbe81f45cab32b43235f0ce9a74bac04814f8c3f784b2809fbc4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a246e6d752d088699d33c3db7d7b2ce3fd11d2d031b02a5f4011e0f35bd2de79
MD5 acd27b70eefe7adef498ea087a2bcc2d
BLAKE2b-256 599ebecdd019c99bcc6ddaa41d0ae8a7110c2d77ef8b61a3305b4a064b0f77d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.81.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.81.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.81.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 376a08b8cf8f85d2e8a8bed2a7444d10d647b749155ccc4e97eee3666516ccf2
MD5 cf03b672c7b1c2b9378d003c022e3ed4
BLAKE2b-256 f14b3c4c34736d8910aa2479fd05271bba7eed9dbd75ea62dc3d921222773bbe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 80350b19f8af1ca8e5ace26a7bf528a0d15b601fa98f89e9f1a1016713e013fd
MD5 da5ea5fd3e1af5869398040710736702
BLAKE2b-256 de8e259cace28a21a97dc3c4d93936721cb6bcc079d24c3b6ca6562c20702af2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 293114d96e73d4d72fcc7c9d1cfd51893cff3528cc07f1309465755675a5ca7c
MD5 7e4401e39d185bfe8d7027a357aaf674
BLAKE2b-256 b479ded1f79d5ad2c6a40d4e35ea971476d33b08ecf4742c2be7eed1f707e51c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.81.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.81.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.81.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 17d81e983679b9db0bea8c0a970df45a0aa29028ff0e528047cdacd44da37caa
MD5 d078107994cb3d04b85e54b705c9c85f
BLAKE2b-256 7f61bee95fd8854f105432c532da58e059df6cb7e07bbe6d294c93c5703b9062

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1ef5dd679037fedeba31819229c5b71f5832c41b23df3f162c195934c59bfcc4
MD5 5f0a26008d87d289623572403e1e08b2
BLAKE2b-256 858ae497abb2b7cc4a04bdf7f70080d23d91a4398d2e88e986a0a76470382722

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ff8420a66269cb68a91ad79d5202f52865a881165373a780ee448750948f7383
MD5 588689850cc784a43e9fedd3ee93c03b
BLAKE2b-256 4ef3cf6d798090de69ec285cb84e48a8ffbacaf1ff6602cb38400c5e1efcd797

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.81.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.81.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.81.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ddaf7992359687a2b3623768e71fed217d463135123570b79dd63db20b109e65
MD5 11b71402c8dfada7295fae2abc42a9ff
BLAKE2b-256 bd1ee04d598a64685466a08f1b9b2b0f0faeaac89835e11c7cc0eadb03e77ec3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 805d94ff3adeb06bd294d10b8e7285730d36f46ce6cc23be73ab8f77f82072c9
MD5 504c96f30a372ccf54a3f6afe29b581b
BLAKE2b-256 1446f3db50a353c78a996df98158134c7f70cccf9182123cd2a85192c0fa76e4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.81.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.81.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a5f0f9a47c3d63515a1d07285550a4cb4954112e64138fa1d12f20dbe88a4e31
MD5 1a18f51cec851af7b37103a5bd8b78d9
BLAKE2b-256 2c0909a26dca598599da029cb18913e360a09b799c5d3adfc6ed10b7d76c5b00

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.81.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.81.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.81.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ab31465ef7cb533e4eabc5bb0dc4633ba4556242eb8d448f090c1462d624876a
MD5 68f12168368899b87874888ef308f206
BLAKE2b-256 97e889fe7a2d0fd1dfbbd7686a24c8874212980d1bd74ecec7552193d000a4cc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.81.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9e434da0695b1936874859bf8d6e494e3990c2c32c2af68b9133935e3ab6b03f
MD5 991918059708a19c3000626567d9194e
BLAKE2b-256 edcc70f7bb3424b7b6159cd770b5152cdc6a9ae165ea9cea14dc81fa48769e9b

See more details on using hashes here.

Provenance

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