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

Uploaded CPython 3.13Windows x86-64

openbricks-1.59.1-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.59.1-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.59.1-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.59.1-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.59.1-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.59.1-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.59.1-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.59.1-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.59.1-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.59.1-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.59.1.tar.gz.

File metadata

  • Download URL: openbricks-1.59.1.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.59.1.tar.gz
Algorithm Hash digest
SHA256 7ec483748c0097c1f65ee34ee1dd8006acf33e47d47e59baa18ae1f16b041427
MD5 720b53919448217fd781c17c9116ef45
BLAKE2b-256 67be906ba24c181edae27c83f886e0e8fe922aa41a24b439c57fe320441a9041

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 00d26d3568a1b0727d7c4f9863e338f0b4e7286d6ed92fb88a592fe6c1dd3382
MD5 d86fc66394895ea3359f99cca75b7876
BLAKE2b-256 0ee04c079c4639c0266864c1167ed129d2b21b9ef9634dbed7706e3c8b7c45cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.59.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.59.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.59.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ac43d62481332be51532ed7c12975d83b1b77f88684ea4755a913d35c3a2523e
MD5 4371a9601f90da8b3a3d039d1b721de7
BLAKE2b-256 191b39ab6e14bac988babe682958f6bb3b9c33fdbf22e51b8653d057ee1f09f7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 34a178f650ffd3787285e132bb96e6ac46eadd2abf709dd344d26db2b0fc4356
MD5 05ec63d8196901c6144df4cd2f5a11e7
BLAKE2b-256 38c9b29eefa4a3313358c7480110349cf28f78cd8cdbb74ddd1a08a4f4cf0602

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e4b2d1ade16f0bf90a54e2d6f9aa4c50b469cefbb04b47a17795c299e06523b3
MD5 94a92e4b13c79190e798a87445defd03
BLAKE2b-256 1586027adb2d5852b2ec6d7013544bdd42ac427e77e3ba24b0d476f9b2471a29

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.59.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.59.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.59.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3193fd14ddfc9c861ed375bb2a36df54cd603748599a9b1c0c0d3ae83df20aec
MD5 288b38a97d97992e7401fa07a3b8d2a1
BLAKE2b-256 6fe0b27c1b302cdfe359d087bb283faf6187899e423bc419a7900b50a4cf052d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 c9ffacc53e709190f6f5bc5a9741b07b3f6397823e8b9b009d36a1296a4b1124
MD5 a0e7a5a0f8bcb41ae2e7cf84bfea25f0
BLAKE2b-256 906bc467d0c07b14aadf150a98e6d5d1f927a6aa066c5df2a73fa5178701002f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 09a8823bc8c1935e4966b636e569c121ef098335895c889a4bad6304d435baef
MD5 a7fb44c93c68be87bcfa522fbcdf02c3
BLAKE2b-256 be87c4eee88efd35f3d02f767415e72260c5a278875400e68179ab017d4ea18f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.59.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.59.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.59.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4ac1768d397ad7725ba82f1343fca30635a91f5328c066fa701137fd6a15c8a4
MD5 099177d5f5bccf69de435ab56af4f58e
BLAKE2b-256 ddadc37ab82313132aa0227706b7ad9a6a4b57e24039fd8bf75fff45186fe27a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cc61543f284bda72ba601ec27f0cd7c3c948bc46a170ce12a29378ac3186af60
MD5 3dc58fa829814b45ff62a049a18e8db7
BLAKE2b-256 4379f703d2d02762708317ca4a8069aea6a2ae3427f2b5fc577406d25697bce4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e3aa25bcd0c9f5f74fdda1392cd73c7ed79c3288e0ed55c7ec06e063abeaacfe
MD5 948913ebea1e457f62870341517f195d
BLAKE2b-256 1412de3d6361eadfbcc5b58ee5cabb80c6a009308f97495752e2a440649de564

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.59.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.59.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.59.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c4783b95a9cfb86d26492c5bcd1c6fcb15ab9484e8681f7738376ed6cc307b47
MD5 1259502dc88dc29fd78171437db63338
BLAKE2b-256 2f594920bb85ef00e663d5f7087bb564e763a06d6793748903f33df4d9bd160d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4c50a5a7ae5dbd29a2e346b7428413bf72e3aaa5dd52a2dafc8db4cbd445b2ef
MD5 5c1f48d4bf4cb4ac7b518e7db59f956c
BLAKE2b-256 7ef85936e07e2891e5e12f24a4aa572837e4baf9ac9fd108407c411a7404307f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.59.1-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.59.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7ef69365e8dca0fb1d30f999ecd860b4e45609e81716136f4d3f17cd7fa9a40f
MD5 b2332e7b4ba996f307968561c6c11c6e
BLAKE2b-256 f8cb15a144c4400b901c3f1c2f1093bcd941f387a2dd756c1a68807eac6eda89

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.59.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.59.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.59.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2c49bf59d27b881391b803b0820b4f4807d51e6d22cab9eb253819c3e35023f6
MD5 ff50529481748eca884aefe423de658f
BLAKE2b-256 683a458cfbb963ee2e2e28e655498b62979401f556e1356a86ef6fd69b0a0737

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.59.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6859671b0945bfc843ec40094749042e4b4275ceb69bbf4bdce640481d4502b8
MD5 aa71c12a85c2408c941b48bdd16bf416
BLAKE2b-256 2c231539d6d3beb8c229c00e23aa3801e326d3ca5d02a3720bdf5860c22ecd70

See more details on using hashes here.

Provenance

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