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

Uploaded CPython 3.13Windows x86-64

openbricks-1.64.3-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.64.3-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.64.3-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.64.3-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.64.3-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.64.3-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.64.3-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.64.3-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.64.3-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.64.3-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.64.3.tar.gz.

File metadata

  • Download URL: openbricks-1.64.3.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.64.3.tar.gz
Algorithm Hash digest
SHA256 9ada9a154e162987dd15456fbc08cd063ddac82b1fb4d3569ef3d4de5cbaf155
MD5 e0b5be946fa8afcc0a5cd3177e900e2a
BLAKE2b-256 9a8607d6fe1cf45099ae0ba0dd975b2235706126bf98e80711aba0b986a9922d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e3337cdf712582ec87938f19ce0b5943415d4c96a4b89bcd33a8ccb58130e164
MD5 71db09ffd3d440d2b0a57242cd4784e2
BLAKE2b-256 a27c347469ee0d7ff200259c0b202f6627c0bad2c055565806a2440a94f8fbfa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f55f072b586c52d715283a324b91e093590b7b8a9d98c1943b74ee24c99dd393
MD5 f06d2f5e7be43c58099d22d00bc128b4
BLAKE2b-256 79ed91fa870afc36e8bade04bc4636ab3093059cea7c04a795391be66e36aa60

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 95ca9681ed7a9e2259762fdc48e824a34383556ab86dcf025848998399d66524
MD5 fd02273e7ca92951ddb750147210196d
BLAKE2b-256 e27e9c7b6f8c1c5da251ffaa66bfa721366f26f85dc5079e73191bbc3e62a0d5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 35c1a573525ec7d764deddaa95a1d6b09d4244b504781ac9be4aba5ae4d773b3
MD5 838bb45a2514422b6439a288476e148d
BLAKE2b-256 ea05d5803a0aef2b676842a2b8f16ee4a591a031fd76821acde992576559bede

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5d0421bb1aed7cd3d6bad643f8e8a7a62f13935a3f0f6f849dca2c6f93e2e231
MD5 4209c5f3ce47c38e6b4ed10ea31a43e0
BLAKE2b-256 77389214328f1a0a829af0f2756ed9de66ffa16005176a52e2d4cb55eac36a84

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 41d09bf41baac92987b97b1991ff34aefee8b49165b3424fa7a9c768eda13205
MD5 6feb8ece8abc4f3d112c5dc43cac0b04
BLAKE2b-256 4a2588d0d9089f07fd1d63d97f3d2af25f6593e237d5c1a11cde8e8efeb84f49

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2f7d147b97f3c172a08ede734b3500a4142561609cf72ea71dde5e19e53af5a4
MD5 2daa8a6f5582975c2633a2efb33c5abe
BLAKE2b-256 c9bfdcabcb6213cbec6aaf9e2f2fa46854bd795bdc059b66b9593c46f7d8cce6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 68382c3068345bf0c73ecfbd387b920432b81cd514bf32f34360f6a7d8dd37af
MD5 fb61a2bd062857d6425736a6e1960d63
BLAKE2b-256 18429e705d68f719b795b0941aaad007e41b09c2881ddb73f725fa5ca4fffbce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4f181e7d61b4de91551416234145c0ff53cd6f67f78f3ee47f52b42574e75140
MD5 c6ed8ae1eb28343c7108d753c2da8d1a
BLAKE2b-256 57191d6874dae9a70a546d48bf12f4225c2b571cca5af9cf119559b8e27df9c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fe1fe6b6cd919452ffa6c7e79cbc7bd481ba1aff8a376fedb004ceaa6f9eab4c
MD5 9a7100c81e20b8d00773e34146cb66cf
BLAKE2b-256 1e096d02a7182fa9caaad45e5e62e581a34e2f1d50718af517f2efa9efdc3a9f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 72694dccf9848ac73bffa00a4b4870a7c48ab71a6f31518f30c54b4327188f9c
MD5 cb3764b6d7b9ce056c7587b54deb50d2
BLAKE2b-256 a7ff92c659a8a3c73b1312b9f4f5fde31169a6654b9183e7729ffc9c32194b61

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0215209e2ef40d3fd6549126d741871a0c72ac692486b0f891d4190ac23926cf
MD5 98c3b7dfb0d7dd2dae1d3fa299ed0e13
BLAKE2b-256 a4e3e16defb28434062ade745ea3e9925acf2faa7e34f4fcd652fc63418303cf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.64.3-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.64.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 24314df49e12d22872e79358f9f8c309bd9d9ecb2560d917d2ad97145e720527
MD5 2e9b7ef159059c54a12418e543a8b3d9
BLAKE2b-256 07ce1c09f0bc55c4bb984d6679b1038c444d4c621ebb0403847cd405975993ca

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 df1d3b324946bf01097d0fea9ae2587daf425db26411939dc8edb4dc547ffc07
MD5 5046e5d7646cafaba83fe0086db1e939
BLAKE2b-256 68c3e15b893fb7f1b9d87e157f20ba5e9b83a554ac258798f88e77f8a91012bd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.3-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 883424f08296938f6a72a1401cf662296d15db1d97cf53b10994892c4c6a8710
MD5 ef37f157b73dd5d43e1b1b013270e7fa
BLAKE2b-256 86b3f1ce8de19348fe49cb39b68e57b012fc780df24bd0a2043f3054dc92542f

See more details on using hashes here.

Provenance

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