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

Uploaded CPython 3.13Windows x86-64

openbricks-1.67.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.67.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.67.0-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.67.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.67.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.67.0-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.67.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.67.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.67.0-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.67.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.67.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.67.0-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.67.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.67.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.67.0.tar.gz.

File metadata

  • Download URL: openbricks-1.67.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.67.0.tar.gz
Algorithm Hash digest
SHA256 4948477dae78a8de85449d411b97bb8cf4d2037bb69ee07992c30b2f7c8f2785
MD5 9d31aca8c82bac94b89225d2ede33559
BLAKE2b-256 e38b3550e63eca4f087bb249170cc1dc04bd2ce54f3b60b60292cf18422929f0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f52726b2c3c9920a6b17f8852c5f6af701bb328cab916373053082d80b3e1a27
MD5 da7b5868a9515bee3265f52661d420cc
BLAKE2b-256 87f1130d2af865da8048662a8915e24c01091ce35c4ab044b4ac30e772a12483

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.67.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.67.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.67.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 70a128db14d72923e3af7ad0d169529140d00e269837fcb545c40531d76ab225
MD5 066112d5737c43a4a2e67561d65aca84
BLAKE2b-256 f7379a86c0099b085468dd56bb574a8aced3addf78d3e2072899f80e1fe510e9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2a8651b7f7db4b5e1daa01d744202dec6b6098d2cb6c94935b77e6f31108c1a1
MD5 917e4af565d0ee31ef23cd6c36e8ba78
BLAKE2b-256 f172057c2ec783f146f84730d07ad816fb06a149748b519e208a4bc9fdfb571e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 af0050fbafd79d0354cc262dc25d866d166f06e685afb190e934b990c9a4a53a
MD5 cc479783ea5ee3a983d65e8131abf303
BLAKE2b-256 ea537a0f17572ac967a894778e0046410dcd783a808fd70fe9b87c960087a360

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.67.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.67.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.67.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6e595783546085ae405d8cba675fb5788447094bd08bacfa0993ceda4f84d55a
MD5 29a28c05185f11f028e9626dc6773d94
BLAKE2b-256 043c91b8673dfca3918bf7ed303eb9bb0283a7839938af4e5808d614a69901a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4f80175af10338afa3adaff903a4b3ad86e504fe46358282c788f822b6bdbe3c
MD5 fa1110528bbef9dab2aa9ea000fd38df
BLAKE2b-256 8cdf2eec76bbaa3d1300b4032703fcc662441e541d0b02d57df28fea8e0412d1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 eab79afb2f74d168a5f8bff9f45a77e7b8c8da3863bea77534f8f143221efbe8
MD5 6e3d591561b025c2fb99bfab6850ec07
BLAKE2b-256 f78b813e4ef2cfab06c89d54a7951a144cfa2f76fb991c135e23b290e811dbae

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.67.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.67.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.67.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 561dbd9d1f4645423bc311c8a800a809650ce4367609350ec6e35702fb3f04e6
MD5 6e438932655b658c53bd8d5281af2131
BLAKE2b-256 f774629fc4cb96c9e8ffc64ea9bbff03c30a7aca24c8b58f693fede2b35d552d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 768c3ac43205aeb17d0e01d5f067aee2b749aaacbeeb02d2d2793770a3d152f9
MD5 8d396e616d74dd78388310e02853ceaa
BLAKE2b-256 8ae54744fda0a5f6214bf725e81bdbb0a9e223b65e42ca63e4f28b92db3d1708

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c0010aa95d9b91449a875f7939e951911c29cd01b90bf622cb27618d112ac405
MD5 a3cf8c437b2d97a528023748beb3526a
BLAKE2b-256 170a04dcaf814faf67925f423240a00e8a883de07555b25ba67ef3afbd08b6b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.67.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.67.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.67.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 57c7ad4a3d4f3bb65b77aa7e73d10a850f603e1ef0c861c5c065ba514f35f6c1
MD5 ec71f76cf1956d279def9337b54b54f2
BLAKE2b-256 ff0910435630fb7096d804c38d48d81c4be944a0b0cffb915f18ee2237b48416

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 802ac65816e985adeb8ad632ac52981b39d29c75fde118bfdb00c23472014f2f
MD5 d583b4ebfc7a69a353a73410132b02aa
BLAKE2b-256 655ca6e049e46e1796594768c21317feaa9ba1044c62961027d2696bddd1be54

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.67.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.67.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5ec5ceab03014611996ec07b32b8922bb7a2b68f92fdb8c87f54d5943c72bd82
MD5 5770485583791c2a893db156752a977e
BLAKE2b-256 05ed2ea629bc06ed710852f780174ca19e26095434d35d8308b7e57595bfd43d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.67.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.67.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.67.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e88c5940863e858e4a5a7dfacb905a3ac4affe42e533915628d1741f69440603
MD5 0382ad36ba849f102c7c39e9f0111a82
BLAKE2b-256 0b683829110bc37b5f9a682fc8720fbe75daeecfc0276f049df41a2ccbe7a4dc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.67.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 726a94e84dd11381da23405574a29327bf4cc1d4e3c03c86de894558ba66779d
MD5 def78e3097916b9e7467e31c95b89182
BLAKE2b-256 6515493aba2b3d696049f373a5002c2533e2ea2dec4c85d5f970077a6dcbe317

See more details on using hashes here.

Provenance

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