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

Uploaded CPython 3.13Windows x86-64

openbricks-1.62.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.62.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.62.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.62.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.62.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.62.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.62.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.62.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.62.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.62.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.62.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.62.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.62.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.62.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.62.0.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.62.0.tar.gz
Algorithm Hash digest
SHA256 3e8df329d148264e97134a79e7c5b5915f9b9122f8052a0ff05d767e19c14906
MD5 7b2fb9cd01da56079c2fff1c0edb83e5
BLAKE2b-256 267e1a498dfe539b74319cc3994ab8be44b43680146c8970c806dce4b4fc24c4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.62.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9565c4b8f33c22ed4ddf7340d9baa541449ef651a1d1017e851aa63f74199c2f
MD5 237aa671a77742f7668a2166a15f90c9
BLAKE2b-256 f527f550dfdeecf5caa6e4da06b392d9a54ebe9b5f964f11a82920e52972248a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.62.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.62.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.62.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9f2d45b5d8074e152d0c75df52670bf17bcbf4a69c448fe64160ea546eb256ec
MD5 b3d62cd8a8dac2f64844fc0fe21f6f99
BLAKE2b-256 803e37a9caeafb4aa954264ec98ee470378ccdf2e5fc797dc91fa75a02713198

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.62.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 efca891868a935fe986d197638618b47a580790fd03e67a21cd8ad51d6194a9a
MD5 9c042b93bc174f1efeee68ce6e755e82
BLAKE2b-256 0db3a7ca67c2cea1ccdf88a8aba14b455d4ddd234b31ae24b9a2a0481f1b2b2e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.62.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8d9ede861f492758d77fda0a875944c00b57640d53c28cfce87789b8cf98732d
MD5 b22678b55209878d0dd76f7570220a08
BLAKE2b-256 29aeaa9242cd7aa729092878d5d92fe54bb3d79290d03715b280e16495d98abf

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.62.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.62.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.62.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 93c5f93113a7af1c8618234b38ccc69eb7ddd9f0f8be173771eb060c112d4e94
MD5 245b3e8716e1a9c948b1e569547bd226
BLAKE2b-256 c34b73c628cb073d2ba251826c5d448163b8eceab50cb77ee3ecd95436e01ef6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.62.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5844709aa187d0882fbfe737e40d46b4fd50f122c2e92b48c2099740133664f7
MD5 08cbf63c2e9558b3761389abd03107a1
BLAKE2b-256 97b4c7e7c3da5a59dc307ea74bcc605831877bac5124ec63395c7226734a42da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.62.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c5b450054e11d7ce0606adfad33ff0f151b4afb365b4d82d0a75389509495c48
MD5 39895848a473e8a0e5af0238121cb748
BLAKE2b-256 600a28518137ecac59a0e0d33196ba97136bb730368f472b318043851ec026ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.62.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.62.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.62.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bec4324ddf4f52e069fc2da65d438c805a55c5314283bc59e238d9b7e76c180e
MD5 1d27adaa8d4d81ca931e38320f8a96de
BLAKE2b-256 de791f53a4aac7f0adb1b4f9dfcd31fe18f058a1d5afd8e469d157254b4c5563

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.62.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9a44bc12c1a7c5045281c9714110a9dd925ab64b8d354223be3c9dd20fad0fb8
MD5 f89229117eb05bd92e18ec12a78ebfa1
BLAKE2b-256 ff5392dc92395f3a0947f15a2719065c8a81609c87d1ee3f7ea123d9878c76c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.62.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 218fc22cae85de64d0e64c219927fe934d26e8962bfeb3134a045d664989b3d6
MD5 1818dbf1d222910054ff0c3fdf7a1195
BLAKE2b-256 6d3ead42888c278f387cc79caf46ac15135f839a86ab245da395665092c5fa24

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.62.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.62.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.62.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 63703103976df8062482328d761b9fa7603bb38a77bd901ca34c2904141c7b85
MD5 1b791473adba2720a08789e7caddaa69
BLAKE2b-256 719ef7d13a71c1abfd8c82b7c4a862ea60865da3e263e352fa67ecc5c9885d2e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.62.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 98749f7db0627b35836f975e3ab069c96148f788884644543e9aeb2c9e01ff18
MD5 cffd9a10a71c8238eac89ddb3de70ed1
BLAKE2b-256 b0686d830d9e01c57a894cbbac428ecbb11a4eb913f15ce02c12de415796957d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.62.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.62.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5efe9fa0dfe3a332d2a41606dbffd933fbb81d13372bc98d4cc2b543fb6038c7
MD5 e69f73e2343a50831953957a28b66a2d
BLAKE2b-256 cd8e8e0f41a2003e1b8b287c82ea101dcdfcf6800bd38a42c8d472b5a25d900b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.62.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.62.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.62.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a3d62de1cfcb617de12b7d6e7385e1192f006233b873d1571d1a890615f8d074
MD5 884cb746b9ddc21a7d449897cb9f27d7
BLAKE2b-256 a90fce28cb72bfce720e8f7e2679c5992e8e4cebf11a111679ddcec125791046

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.62.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 94c40bd88d358bd2c25530278c15d59d5da41afc4f1716dedbb2ee7c2df46988
MD5 b894cefe503e6637b3266d119376fc8e
BLAKE2b-256 4ba5c29c13f623d2154fbb2c3a2db632a38cafbcd51195409140acbd969f6508

See more details on using hashes here.

Provenance

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