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

Uploaded CPython 3.13Windows x86-64

openbricks-1.45.0-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.45.0-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.45.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.45.0-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.45.0-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.45.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.45.0-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.45.0-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.45.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.45.0-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.45.0-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.45.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.45.0-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.45.0-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.45.0.tar.gz.

File metadata

  • Download URL: openbricks-1.45.0.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.45.0.tar.gz
Algorithm Hash digest
SHA256 8ba7f500c0d6ddc21ff775f728918888bcefb20f4b1fd00e1448b1f9bbcac450
MD5 7a0985c7c0e949a60b3edc25920d80bf
BLAKE2b-256 f65822071189034fd33b3f55f113209b4b21ad4bc8f680b275263f742d0c9dda

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.45.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2b0332bfc3c326ca450dbc907b12a1140d1d333f1519f0bece7b3b7aaea14d4e
MD5 a4d13685e6ee502c51053e3db7cd0a36
BLAKE2b-256 fd845944dbd0dcc5ffa55f1d0a03de8bd623fc5351e351ada103412cb4a54666

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.45.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.45.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.45.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 69291bbe90016017bf7b89074c5584dadb333d9bbc92fe46b3553df7bd943eee
MD5 5cb62901f4c387a1bf5bd068bc1fc705
BLAKE2b-256 fdccc1abad795e7ad98eb081b73a97d06c38ec41873bac7ef5f1179183d3ea7a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.45.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4cd015602c0ca9582efeaaebf65c38cbd3bf98d8ff67c68edae25d095fca406d
MD5 9592b0b082857d21b9501e3271cb784e
BLAKE2b-256 e131cf98351f3b5d546dbf2a81ce13e4a03900691f5d926efdbbdcbb89bbb0a7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.45.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bdd7de3b485b6aacd86789dfe4e5fc170a180ddba508522f49a30dd5b8fce2e3
MD5 aead2389596756e2c4062948cfae46cf
BLAKE2b-256 f409b1a7c2ad7944279cd265e25d002b9e56218c225643f126c0d4582ea6e9c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.45.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.45.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.45.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 908d989af34e40cf21583e4d2a751b4731fc6ae94112c1364c6f3a0016d8a262
MD5 9274ad8f507a91fe13185c6e697e7781
BLAKE2b-256 6dadf4fbd689a2d44aeae3c71725f80533f6d60ae62e4c76774a5206037be122

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.45.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7abbee97149a5295e2b580851a8349c671fe82e20d7cd8bc559f9c500cd8982c
MD5 6d2c562047c2dae9bbcb54caabcb2ccc
BLAKE2b-256 9054ff851059c2cdbb4575dc5695f0c6c53376e9f8ed1f5e41c84449f40d909f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.45.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4c0bcf350c888f30ff384d4930ca0634d677a241c0ce94181ea1b02ddd582ffa
MD5 d0cd6af0161675be4471692eba12ea16
BLAKE2b-256 c95ae69f617668ef21dfddb0a8dba09f82fcc0024c8509c07a38ec356528ede6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.45.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.45.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.45.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c085e3c6ec8f4ec71e1b6df5022727c54c93459e7313b2e999e145f672917aaf
MD5 0594e10c864f7a3d054367e7011ab7fc
BLAKE2b-256 513bb56d4e68e6bd1dbcd92fe7ef2eba48da36d7382b78eda97ce466c92754da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.45.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4f23e3a366d24110251b4c94e356990168ef034ea712ceca6ffd5365fa52be7a
MD5 da313a7334eaeb7749dc59448c8d7dca
BLAKE2b-256 b92e8ad48c2f5df626c26fa05ce6b52eb239e61a42fc04f0223a4bf55391ddf3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.45.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9f152fa0c68bedca5c2236d12caa97080a0f6395599593a8bdff6281a5c4a1b2
MD5 1cdc09c8afa92ed4e33430f09aae8197
BLAKE2b-256 27b08b91a88638d874c02e3fa1e41f8be4cfe7da436020b292a98225bbd5c0b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.45.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.45.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.45.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c0601fe636ffed9fb465d24270b17b96321b2f665a18f6eeae8d930b903ce33b
MD5 0a17acb13dd77b23f6965dc3e23fb2f6
BLAKE2b-256 8509dc51cbf4b61cc14c8c9b2e63909b3bf052858fe2c10022339f50bd7d876a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.45.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 14ba82789de60bd769fcb134901eb8f91ada843f444895274cce8d4e6914f121
MD5 2b8ecb4fc294860e3028ac11b2af7f75
BLAKE2b-256 662657f05a07ad50b8c0e24d4dd010d2fa214eddbcbb5be99abb6ac305176411

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.45.0-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.45.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6a73dcb51ca5df2d75678dfbc612199cb0975eeb714de663fb0bcc24b3d17d57
MD5 2cfc647435b50f89ebec25ff5ed2fbe8
BLAKE2b-256 313684041b204ccfa730819d9f097f2b1d9d7ca37332e29ac94be7bda7c515e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.45.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.45.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.45.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ebf3a287380a0c016880140e5d64cb2115eae5c55ee6666a143a96b92fc8cb87
MD5 c70fb31873d8b67673adb52335d991ae
BLAKE2b-256 cecab5ae22ce7281b68bd10a1864d853f67b2582e604fe6351f70c36a4c5f912

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.45.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b251f28226153a67cc57c9d21cba8006c4936537f8410709495865e6a1f42be0
MD5 58db5bcb73545cf183fc3593847502cf
BLAKE2b-256 6319b01b326798cb23cb0164e0c6f71a6e295b864e7a0d1d514e7a5a8c8bfcaf

See more details on using hashes here.

Provenance

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