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

Uploaded CPython 3.13Windows x86-64

openbricks-1.71.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.71.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.71.0-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.71.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.71.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.71.0-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.71.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.71.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.71.0-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.71.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.71.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.71.0-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.71.0-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.71.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.71.0.tar.gz.

File metadata

  • Download URL: openbricks-1.71.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.71.0.tar.gz
Algorithm Hash digest
SHA256 f62fbc5306883c4c5d48c7ee9868e18fdaa1a50ec281fefa70baa1e4549f8b38
MD5 c702de2c58408b399212ed6603fbde45
BLAKE2b-256 d999546cdfa1fd98437aa0b69d454ad8f1f5fe165e8c5f8b6a2b3a88b6d5f81a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.71.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fae1cee2a0e5731c9bf4dcfde094be8756138c7600667f194669a8a9184a4784
MD5 7434e5efb2918e4e30d07def78f64611
BLAKE2b-256 06275a40613159e0db37df246c08f2520f56ec36719f0afd8053fbd634011d94

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.71.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.71.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.71.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 db21e098f146308d0a970f7c6c0df05edd5fa30d106b37a817d19a9501c4a196
MD5 8fb666c39e3b496e927522d46d2c7e68
BLAKE2b-256 6b06d0e1e8217299db5b9c285ef21cf28b28cc960432ac08dd786e239849d70c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.71.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f2432bf1e31e8fd2379fc997292dbe07b8d7ee61c8f4e56108c6a0d879898834
MD5 75556cc081d8edf7b6a5c7bd3699dd95
BLAKE2b-256 f807cde53a56e1735762fbb000b2ed6841f86a7c600e233193888baf618890c2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.71.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fa75c7d1d33433f5505f67a3502aca8ddf1efdcbb5e2ff16b62c556831bab309
MD5 a79ff71b6295c099f2eb30761da49d91
BLAKE2b-256 4ba16b5561d38de289fa981fa0aa22bf4b568496da25f88e288045b31a0ac9e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.71.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.71.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.71.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7eec0de523791233fa9d24bf9b929cdc5494798a6132b4e151dd87be765a7248
MD5 053d85d4f93907bae6fff6f881bba311
BLAKE2b-256 0ca9b28a1be62601e36ef2383d2823e0fcadb5648390b23088aada88cc553d68

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.71.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2e07ecd1865734234369674cce04861c83fff01272591a01ea3fa68c128f2fef
MD5 a73cd10edcddc96721afe28894aef366
BLAKE2b-256 40af5896082c864cfb19979db094a74557dc227df1657921862358c00e1c0e2a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.71.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2d92ae22cd3094691aa9b44afd77cdecc6eba0424c6ea468d396018112a50718
MD5 8858c7f7eb83fdf67cfdb6ee9bdfe4dc
BLAKE2b-256 82d74a55ef7ab0bef4a102a8e254a208a200225a2503db421a214f5e0c9190b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.71.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.71.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.71.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3fdaaba3713cb5de24d197f2b6ed5e551c10ec2d1b15a8b2006dd705f385b67a
MD5 ca1ef84e28e0ac6068315512baab2df7
BLAKE2b-256 8ee8bdbd1f622947f44c78b9fb56a3b90f0163a35bfa79d7d34c94b6bdc924d5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.71.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 57ba867816f795a791a207c32b2a4f72cd4e90d7e94e4ead037cd3d12ba09753
MD5 0a919a525b2a8cf4ec5a9d9e2ba9b425
BLAKE2b-256 76927a6a5cb82fc9ccf8316d44980bad9640392318be792c887d44606819bcb1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.71.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4c25c4d84fde35722ad9bec9fdbd68867ea26111ce8753ec10ea5b1e2e09a5ec
MD5 3ff37cbfa5b064a1daeaef1af7fc17fa
BLAKE2b-256 3e8a1f266acecb8981ad828c4c3b0891ac5ddc7a03c30aef7590f3db0736918c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.71.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.71.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.71.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 87fa455ef1ab961f71c515622a08a2abee57f8f6c0df134766bc35efe8a87c93
MD5 26a408c4ec68b72855c663c116ce67d0
BLAKE2b-256 aa530333d7084942ce9834ea50774208d4498164cdd2c7c919d8ae28dce2a3ce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.71.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c9e4fd018d7b01a7755e3047b3711986ba8d63967846bf17295f7d28f7cff5f2
MD5 25bbd2480f1544b53d082cde3cac37dc
BLAKE2b-256 7d308320dbe2eede16e470792ed727b806b40062b85b5e1cf4172a714b718267

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.71.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.71.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d850aa8d86aaa6c2012522c998ea3e196d4fbe0cf9ade16581a75fa42ca7c170
MD5 afde234525f05440073a72ffb4b2b130
BLAKE2b-256 4cd7058b021087a0745ad0dd31027981caaaac711fbc9661234f3a2dda59ad69

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.71.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.71.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.71.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c986222a2789ecede629b0a59476d3d84a6b6bccb5ab0d7e052d9a8a284ecbdd
MD5 05a4af5a52af9fab537cff2a85a73286
BLAKE2b-256 c6fdb6989b631d29f73226f1b7a87f4b5bdf1231d14cf06242a4a1c247f31c43

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.71.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fcaf1d191ba32c161c10efd0cdd69d89203451cfe06f90dafdbdfd77a0c7ac73
MD5 c19776f37c7f9afaa946023e3c74e095
BLAKE2b-256 2776683db304405ba15cb588ffe90e3615e688384193eddf03fb5df7afefc909

See more details on using hashes here.

Provenance

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