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

Uploaded CPython 3.13Windows x86-64

openbricks-1.84.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.84.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.84.1-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.84.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.84.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.84.1-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.84.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.84.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.84.1-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.84.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.84.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.84.1-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.84.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.84.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.84.1.tar.gz.

File metadata

  • Download URL: openbricks-1.84.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.84.1.tar.gz
Algorithm Hash digest
SHA256 224fcb00ba776eea10b985a653f6dc157cba52ba8868eb233b40cae715a941a1
MD5 05b40f09fdfaf823f4aeff999781eecc
BLAKE2b-256 c941e4e776f8c33bed4cda5272046e18d9b535ed0f0fcbaaee2619306a837f6a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a3e54c1ad4496f65c6dc6a71f864082bc08d4dead5e9cf1a744e649f77c8b426
MD5 678f019036467d288bcb2fc1c0ae1c94
BLAKE2b-256 9d91e20daa244135d018ac1cf0ce82b129f8c0c0e1e66a68750c1daef368ab99

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.84.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.84.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.84.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 58b943497acdc9c3f0fd35e77382d7908e38ea9154118c428056d12794f62df5
MD5 7a835a81a36b812d88872b610e0a55b2
BLAKE2b-256 029558f3c4d8351265fd47d6cf43953840b503b8fe7fa903245474c04f9ec174

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 29e3a6ba54c6d622c4dbcff012d0d84e610ff250029a06f774f385547f513fd4
MD5 afd37a50e67da236d33ca27f0ae0a3b9
BLAKE2b-256 13689b783016ae198ca7d0cbd38a6cb169bc183f1dd756e560a0122220d1377c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0df2524a5d86d7aecd3c32e485419793fd0c718d81899e3baf74f258ab835eb3
MD5 6d6e074e7fe3de857c5d63346eac5432
BLAKE2b-256 4830bb7c1a5febd759a46b1848d002785e876419680dcc318b9ad4fea1824bfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.84.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.84.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.84.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bba8ad113f239e089eedd7f5bb39abf15d1a6098688527af3aa07364d36d5bd7
MD5 64f3b43a49a644d2470dd828da8575fe
BLAKE2b-256 cd07f80f4f503e8709c38b449c44f7caac39fd67871ae375b99fb1a2a43e8059

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d5fbdc67cd8ebea834bc88e244dfabd3050fb97a8791eb102819eb389b13811a
MD5 c687fa829cbef53957604834905514d6
BLAKE2b-256 da7f30d1255aafe2edf8bcbc346106fb24c9bea8f406cd008176cd466f9f47a8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0793de80453f01846edc4e864aafa0d54a17eaa5b29c0e78c46a59268648c7fa
MD5 fdec887561238e5e949a29dc12b693a5
BLAKE2b-256 ebe8c7878afc21c2efbb1429f8e305cefe61cd8f0a21d9c75f6c369a611d5763

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.84.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.84.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.84.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ac2e501483da5923b62c9434efedccfaecd22d439e8e2cced2d3642fda8ba70b
MD5 c753dbb84e747fc8814baa8dcac8ecf1
BLAKE2b-256 da1d16909aff5bed1c02ecfe89649aa6577db6596add1df817990d8dda66c599

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ada8aec45f634f2750fb804737b32034b5810f8de8d128b25674f8b0c4a8ddba
MD5 07dc7940b6262312ad1cca8a7390ba12
BLAKE2b-256 725625e4a762b9bb05629e5ba37af4974820d7552c30e3021b92e8e974b67d83

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7627dddccafb0f58e0e330be81e36703552c8534d24d2eb7be356233379fc559
MD5 71565d7cef7f8980265284823ec05cde
BLAKE2b-256 af11fd67bdceab7f4cb1f8ec03401b04a7a83121aff6fcb04892df691b32fcce

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.84.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.84.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.84.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bb5ca59d418f9c51f42f478fe078e1fb605df7a670c53b05d18183be1cbfe23d
MD5 1b935717da1eeb42201b79ba7885063a
BLAKE2b-256 19a2ad6c0d859c43ce614153520eb67e49cf242533b6fc5e434145e240ccb928

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3d8672714e4e581afcd05301b3586490cbdf64fafcb266295eae09d6221ca85a
MD5 85c6ccebd36c218c7bfedae0b082a955
BLAKE2b-256 e442e0f0e15d7686ac6775e3bedd88023e66058f56ea24a246742d39c9b5c636

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.84.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.84.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6f722cb63f5fc9843a38b23c58e4d277d74699327684ac30dde593ba56468236
MD5 39217774d6860d5f8241009da4e9720f
BLAKE2b-256 ec9a3f31f95509edcc023c20c0ec7b5e01621a4ae9eb95d6d42f52a98aa3e732

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.84.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.84.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.84.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 52caeb49b98c2c0f2b476a1f7edfc524b1446d6cdab6abd2237d0f2ebfd4bd58
MD5 beb237f1d3b8d19e899e914c23c5a79c
BLAKE2b-256 a056161872c595eca325be65fb28e1cf6f9e228dde62280ea4dfb5e4383cc14b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.84.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a797f5320ff9a656b93271f5ce24a508011d1667d359f1c4cd962b93421a976c
MD5 91b7de035fcb22d6fc8cbc6615f31856
BLAKE2b-256 06902d97c1b68e55635a05460ea5acd9c1b4550844a6bb235e60461bb4642f3f

See more details on using hashes here.

Provenance

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