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.29.1.tar.gz (3.3 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.29.1-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.29.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.29.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.29.1-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.29.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.29.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.29.1-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.29.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.29.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.29.1-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.29.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.29.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.29.1-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.29.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.29.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.29.1.tar.gz.

File metadata

  • Download URL: openbricks-1.29.1.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.29.1.tar.gz
Algorithm Hash digest
SHA256 646061348a82fc7304bc7a848bde186061be408589520ceef024b75e1c880390
MD5 6177b47aa87749f63f4bfe85d90a45a7
BLAKE2b-256 05a351f483f665555be49434431cd36f9c92894ecadbf1dcb702b3a2a7742359

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4ecddc1cef6d6e770bffbed1622a70748aa35471cdc6c9c960d8ab4960267c1f
MD5 6276d72f515f52a18490bb99c5c6e205
BLAKE2b-256 a978ff324fd30e5997f6b552b47b2624c90c8d0b7d385eaea70b8b8dfd723b40

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.29.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.29.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.29.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3ed3c03c78890f215d855ba8cfe7217ad57160473739d564a5fb2e2320d0bdc4
MD5 2a962dc800927ff3140b14b8556b7d2f
BLAKE2b-256 4bd8950a69b85650efc45f7e5be7c925af55f5e3ddbb9499e20cbbdde66c3129

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b9fa995c9aeacd06fa642102550c12b83d84a2502892ceae11c907b0f4a1dfc6
MD5 9698d565771f3367344eafed358a4fe1
BLAKE2b-256 b98df147ecf7ebae25e1d45475766e3f13931f2c299050da08ef7b4f5d09fc99

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9c72a55d39f942b4c9b8ff45a2aa86c393366b7100f814fa67d831049b419b93
MD5 6fa7430c41587f1977c4befcdd9568b5
BLAKE2b-256 dd021f65a1ef7746b8ae5c524961aead19ee10e80171613a6e56a458e7ef370b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.29.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.29.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.29.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6a7fe307041b9f087704ddb44256ed7585fc41a92e0dc1e913871b1a6f8c6c74
MD5 e725c45fc9fd9d2ef7d264c714348d5c
BLAKE2b-256 15c648df22823e29e28f70c4a7cf9fdb21d5ab42ea18a754ad28d1972cfd4129

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 ae78f9bc5dc3d57d12f8a83756cefe9f7a6813be89b8963109a7e960762af1b5
MD5 9c77db7ce024110d3c85d1cc1a90f51c
BLAKE2b-256 c38bd2663d0ead38f95ceebe6cb90965fa4e754551170e7d10e44ca6bd1d4e1f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f6aa8fcb0c351755fd89df063ba2c87a9745f4ac32d9a87f24eb7749cdc0782b
MD5 8708a05514e8e36cb356a7028a7c3279
BLAKE2b-256 bddf682aabefb174cdc06155dca0c1108fbac77056e26cf59178e791b5c2b7f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.29.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.29.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.29.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 de45a83e0ff1670507c1e11c9b9e05f8466f8c0c742090edf3c3089997832f1b
MD5 cb5ff890d4ed72cc3b33c8e3a42a548b
BLAKE2b-256 03f8740ec06baa84a33e18c52e9581a8e63b66805778ce5201b6fea42ddaa64d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ea2f3760e757b3179aa49f75bd487cefa09fc5286afb7ca858fd6e2560816025
MD5 3a84ed71cf5b1088659db4d4aa7a8090
BLAKE2b-256 48a38177dd1b59d068d4f20ed592b811076a9a1cde742003521b948277671da9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 19813dcadddb6c737775a65b7a8c3f224cb4ac74f08c4454dd2787ffe72548aa
MD5 23dd0077da30e7c74c933846cc05ea5e
BLAKE2b-256 9b0be4303300d1c288e851a6bdda893e96f27eedd25fd300372f6e1abd41b91f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.29.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.29.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.29.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8d9bc4e3fa15c7b2926bb58c76a9c86edc3b41df233f5d0c74bc78c9ea7ea09b
MD5 3a09f61f6f56748ff772a7cc23a46782
BLAKE2b-256 ad0c0527a50f7e5437a5a40df5cd1c6fcbbffd252d6220ee23fe0572bb5d0163

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a4dbad686b21150b3f2910768cffb978b200c5093a803add4c5c68928ada85e2
MD5 672a5a4b895d2de81d6b843bf90e8c11
BLAKE2b-256 0f0206ef7142846f3d69dc0c0a062e309de6c5d5166c660a982630c333624480

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.29.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.29.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a49ce7496cf81f9c3f5b8287295c133987f1dc86ec7bb5811064917b4cb4889f
MD5 3f1efa600b5ca47fc3985edfc0f3c01d
BLAKE2b-256 570863a39fc713c9673b8d759ad1c2bd27483c152104b494442acb3b2d09c0e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.29.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.29.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.29.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e52d8c514b6a2aa26a901effa8b1e06405b2680a55b1a321836a1dc8ae7dbb6a
MD5 d173ed8eb4686349aa8ecba62bfcb286
BLAKE2b-256 9e554b290e4e0f764901e6a4898e89f6d042ecb9b900551f07e5ed1ab60cd58b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.29.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b9599c19836b32feff1da8cffcfe975fa4c05d1954c38934cecfa2d4f8233047
MD5 66b69103a2ff8a3f8cbf70911db807e6
BLAKE2b-256 11cbbd5d10c0a3f6db0888b6455d42d53ab9e3b22c3bd212a0e726d9264b116b

See more details on using hashes here.

Provenance

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