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

Uploaded CPython 3.13Windows x86-64

openbricks-1.66.5-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.5-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.5-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.66.5-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.5-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.5-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.66.5-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.5-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.5-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.66.5-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.5-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.5-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.66.5-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.66.5-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.66.5.tar.gz.

File metadata

  • Download URL: openbricks-1.66.5.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.66.5.tar.gz
Algorithm Hash digest
SHA256 9487264c8d09b1667cc8c391f5e98ef2326d390b1eacdf2fdcd38ba903277658
MD5 038737b1d595535d441056621a8c688b
BLAKE2b-256 1731117fec5d8e52d12c58e729b17d246e3cb387a691c7b4b73d3488cdb61d33

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 04bcf495c519d6106373d9206ab7c505cb9e358137450d15f222f8bcb558a747
MD5 49b5ccd10d453bb3def4f332a362c606
BLAKE2b-256 c3db55e1530e4e8de1c092698d198b7244b86171d7b2210557a11fbb0baaa212

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.66.5-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.66.5-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.66.5-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4d2796312ef6a91c3bff6806d8b74c5678a3d0f31a841380dbca4d9402559f3e
MD5 a7fddfa927bb2b6e15a470d8e1f06885
BLAKE2b-256 53d741938471d2a81457d389989569b5e871f37121c2e1c1a4b18e6ac9c0c9ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.5-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 1ab1daa3d223ffe038c9d76881fb4e1cd0f125c128bd405feba7b2f23ef24ab5
MD5 35e32b26a7a6a44cb2a9ef4e74fa98c6
BLAKE2b-256 bc23c38833a58b73204680b4858793671787ddf89878dfd0f4e6180aa349e719

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9be7b93016392641a5ecf9ea5cee8322107cd8fe63477dbd991b6bc6ae55e543
MD5 5392be6c3bcc6db704baba9448472036
BLAKE2b-256 b70ea92f4f07d7220495989c6df9fc108c6a23396a4794d30ffed9584e1bdf28

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.66.5-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.66.5-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.66.5-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bee6638978d5ef36cf21472fc925a4dff6d5df7741edf9cf59ab79377b2c1e2b
MD5 ee7ec98e1f557b38d7811bb9293da1c2
BLAKE2b-256 51762167276209e44072d8e1092ddf8f313b1ccf70e7ebb03e6e066bf08ca482

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.5-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a50e52d1847b752a6e22667703e3b907bf4a0d220b2e7702c6fe31ed012ffe66
MD5 44a1e12a48b1db23ce2711456c76bcb3
BLAKE2b-256 126c4f9cb650c339a5080911a5a11d71353133a8df910f1745256acde70c3846

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e24a2f658160bdae4f550110172990f979915df6d9a791143f577b8468834fc8
MD5 631a078534a0a3f3680099f6c4940cf3
BLAKE2b-256 321a5fc61785c78c7062736bb3b39fd1f7cc349001fece9b5eea03972dce045b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.66.5-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.66.5-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.66.5-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 48b7192315772c1a63f43f8b3bca1247f340e5c384077f39453578b637fbfd88
MD5 c15672a207da205946a72538892a3229
BLAKE2b-256 be1fe9a7d4828f150f5ba526a4af952f1ebacc51769d509577cc1a607fc9741a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.5-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5a237bf2a802d9cd73e2acd2020269c126fb0859a80da4f6503fd6c8df9d2259
MD5 260674d9bd3250037f4a9bb21866702a
BLAKE2b-256 af8bf46230d3d6b43185380677ba9284b52c59b9bbad66a3d59a99222d9330c1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 57cd9e56112d3794c452bce470758687a2a9f613045bd53185ef7fb3e0d80c77
MD5 8f9ddebd846e4c555f94a1d6fad66c73
BLAKE2b-256 330634860fa5ba6835a8d77083cd6f305be288d86e6432d0ea9f2fb59ab38fc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.66.5-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.66.5-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.66.5-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 53132fcd600e32d9bda87df5783fd83edaf20ed3b58d82db947e2dc50fdbe03f
MD5 733084260c0d6bea09430843a77dd83d
BLAKE2b-256 361132436289117744363019fe8f90df6128ea9ef7c1ff231de54cae196f8f62

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.5-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2bffc0282b4aa6f323a4019a71e57cafbecc4755f1bfa44f2de7c064e206fad2
MD5 38ed6934e2e79f6068ff456eeccd8b68
BLAKE2b-256 503620bf5dbf1c99497afde23bdf80e8f210b6ad17511214a72ce57bf8048d8e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.66.5-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.66.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0a6b01456830822bfa7d488c1d25d150676b3c64e0a8a1a98110071e65e33575
MD5 87f1ac48775439e37fb3608659193911
BLAKE2b-256 522db0a6125d974f749cbcf35e7f60d39640263036869656f725f452bf9664f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.66.5-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.66.5-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-1.66.5-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c1b19befab682110bb97e2396f4d0a0dbfaca13d9ed68f7dec4b66f59382a06b
MD5 4575fe59447b7f71f1aa39f95e65ba8c
BLAKE2b-256 49dd9f62a58cc1fb7aae71a3e8e617d21909189aac3fe1d9451f34dc714bdc29

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.5-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e6f7ac23fafbeb480b738c54baeb8db538a46ed8fc40953e43506f945dfd53ba
MD5 5943f3d5bf01910d8d49d58c9ff2f0e9
BLAKE2b-256 0409426712922b3289a48272d7bfd7602e80d8d6fb22c173201ac95ea80ef47f

See more details on using hashes here.

Provenance

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