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

Uploaded CPython 3.13Windows x86-64

openbricks-1.73.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.73.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.73.0-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.73.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.73.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.73.0-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.73.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.73.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.73.0-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.73.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.73.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.73.0-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.73.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.73.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.73.0.tar.gz.

File metadata

  • Download URL: openbricks-1.73.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.73.0.tar.gz
Algorithm Hash digest
SHA256 7151ff96b9e81434da0e3187e75a6f77c204717d30a8ab543971bb9c804f1a0e
MD5 a6194a74e00503f5d5f72e8856a8f110
BLAKE2b-256 60ac84ffd3465075963d954bcbb041d488932e8a8d241d90e7cdfe287daea215

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0a53193594ff93fa2119f2839b0cccb948427ec09244320d93013ed9baeda651
MD5 60970eaa74da99c52493da2c1bf48cb4
BLAKE2b-256 56212579d55d2ad6bda3e5e821be641afe4677e08b3b69c31972fbc7ad2790e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.73.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.73.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.73.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5df5eedaa61b9c683e0a458f143e8f35ade93099ea55bd87881bfffbdf5b9cc4
MD5 5dce53f031e7a3b51a9846ef97948893
BLAKE2b-256 fc9074c319a539042c2a06741ef5a1dec81655d0dfba6698eda7cef866abb205

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 58107003106b60770b490fc6dfa4da9f793026c4d00c838f246b272d3930c5e7
MD5 fda1fae3c9edac51bc518b3dac45ae09
BLAKE2b-256 4d3b37abbf08e3de7dfc0352eac10bdea4bc87b6931237c8fb23221778028d98

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8ed9c8f3e5bcfe949c7edb27799f0ed99c81084319e55a283cdcc2b01a44f258
MD5 885379b22b578c7f5e2e85ee29f5808d
BLAKE2b-256 89e6875dc557be67f152c8c3366a54e6c4b904dc9976d1f9e733ea893b374276

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.73.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.73.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.73.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 289f9669cf4d6ded8275fa63b33d116f5696047c77bb4518b190f34ad7af656a
MD5 7ebdd2a86ecd9b885fa6c6e78d8e54b0
BLAKE2b-256 db4b63c304cacd73c681a0864d93026d0d89232b63e5bbb2b956075e43c595d5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 98465b4208960c0b91844f29ecf83275e472525040cb8d24660c3e02d2507a9c
MD5 93d411415e86cbdadb979f1194208354
BLAKE2b-256 7ef0aed99128e21fa954d82e6ae8f4e37953a206943aba652f57fc8f68508d1c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8c27acc885033911c7e2da97b0978640faba34db23c67ab15cfb2673b4285e2f
MD5 00bc1b1c7a6c8046a3296a9027b7069a
BLAKE2b-256 a637784656075ceee95eed3498742bad3c353184b64fa965f59c6ba3d7328593

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.73.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.73.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.73.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d609e61a154a950726ec4ee244f520119d0c591483cafbf8b2b8aff4e9c63655
MD5 ae5cccc0f116f5370b0d2aed7cb6e32f
BLAKE2b-256 487b58957978c5bd669956e1eed7738d8ae2fc67df9fa99ca74f1dc2b06b5336

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 48b9e40ed964609fadce678f2bd19a498bed5817eadb16f2a5f4f6021ec98640
MD5 5bdb5b1c598ecd49f9a6372a9d06d3ae
BLAKE2b-256 75e9e009f89f487f93b9c23c215651699850b6d2496528cbdc227c7d45cabeab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cb63722bfcd91a42f29a5c84b534d7be5dbe9db9e50ba1410118a1a386667be7
MD5 a052143259dfa4152c0fae58e492b707
BLAKE2b-256 15f5b2d9a8932ab4efb0f54df717f65bb743758d4a37f436f1f74fe977b89924

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.73.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.73.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.73.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9a1e0ec586882a1188a5ba1373dbf925c88e82067c0b4d6992a315e4892bfdab
MD5 8cd424bcd46679e93bcf60b7ea189838
BLAKE2b-256 315b21873061ea539ccb582274697657f8d6829364c62d86692ea10df9192788

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4574babb775d82af6b3a435ed5302171cf5c258c10951cdb8a816bd83416df2b
MD5 bed7c2f6b731d8a44adb4c705a846d70
BLAKE2b-256 d1e0a53b0eb9d6914560062024c963c0ec498bf745dfe4cb3fa50eb781bbd2ed

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.73.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.73.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f8a476869349ae11491ef7cfeb0df53f80815cad289c9bd26bb18c4f58ca1623
MD5 315d9569acfa1c13b9e9fe7313fe4b47
BLAKE2b-256 8e75b6b5c57a5bf0d363e42fbd5b1e25a57cd4f746bb57cea26b7afd21164b05

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.73.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.73.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.73.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bef59b15d959d9898e89934523ea9c1c090a53e83f83f621617fee9b415211d6
MD5 7c78aec5cf81a4fdad3556ea9e0b71ca
BLAKE2b-256 73c77c610c6bb870c242c1ffd287630ef2d4f837786ee2cd234dd57a183c6ead

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 67044d55a43f6fa9f2411ff05dd82acbaf24c73455e6d03ab5b44aa5609ee083
MD5 9cd5bd233faa8d389c6659ca1a410326
BLAKE2b-256 04c4f944faf448d2170d3a623c15959b14bbf7701ca913eb0d0f0478951b7629

See more details on using hashes here.

Provenance

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