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

Uploaded CPython 3.13Windows x86-64

openbricks-1.57.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.57.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.57.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.57.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.57.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.57.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.57.1.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.57.1.tar.gz
Algorithm Hash digest
SHA256 a87d16b32f10a100520ae137cd1d5dd41dad90cfe7dc684b079ee5a9ad689ac5
MD5 124c1ecdbf0e036c3fa7b8d23da3b6e2
BLAKE2b-256 cb23fba61115b52db06605414696f1f995058cad474091684a50e282c2146da7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d4fd827cb41cdb7ccaaa5dbd017df6c504478f7e62f6642cd33a3b13a9b56067
MD5 df7b36af7faf983aede30a7a22340bd0
BLAKE2b-256 4654ace1c79c31601da80dd992862e215b157c0206636930b742408fffa84f7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.57.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.57.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.57.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a9a03478b0df89554b729d1791a7d01ccea0f20d73eef65a1b9b6b234ad4b6af
MD5 8dfefe7ba733366d16a56bbd80c69a8b
BLAKE2b-256 dd82b85b16c9978a7df1ac0c21a5e234fcad456186fe1e1712208542a6045e4b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 de5dcc78b824e1d56a802d8d663501c50f276291356832fcb083d3b4ce229a98
MD5 d3672fa4ca186fe013e4c9f7cb951f7b
BLAKE2b-256 b606a22c768b620a891ca61d45cd72ae9584b2a7fe7d704613f0d0f7f38aa9bb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 17438cc3bfb957cc325139cff9e40642086ec894fd4523695eebee3597a06f26
MD5 a30cb68c69f00920c15ef44876821f49
BLAKE2b-256 0c2d4ac6ab988b6fc129f721a06e9020e63b0c13a614a4feedc10da453e3cef7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.57.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.57.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.57.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bcca29f764f00a92e9fb784c531a6bfc25e5ebbd9b5e7d58209ac0391cd6c4a2
MD5 9c9fc13ce03ecd9309a27dc1cff46c06
BLAKE2b-256 660f0b084713c4968fdf29494f02ff2d22169182da06234869744b66f9ca8272

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7cf23d331b158d266c3268e8bc524b09852d678dacb3a5c9592c761fd4ed9401
MD5 88e6fc200836c7b6f252a3c66d3d82f3
BLAKE2b-256 dc89d09119307b57582ccca173ef6a69d199c0bca68f86f975593d821e8ec521

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a93cc9bc04bdf4e38fe6385cb6518d53a48d7305ea484ea704969c5d8330770a
MD5 1cde12c96fe0a91e15ab857d6d79c503
BLAKE2b-256 c6e30859dc4be3181119b260aec8663a3b3b9ccdfbcac7060c7a88ae25463ab2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.57.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.57.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.57.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8e73a9d2fabbc5d0cd27beab697e36b82d8dd1df69c35446baca0ad8b09cc7c2
MD5 6d7c13352401ff18da30f7cf66a1734e
BLAKE2b-256 ec1c849a0604255e5b8f5633d139c13c11bc1d06c89bdc8b4313a743d19b650a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ae70141c32d1ede4857f3cff4010bdf9a57d327e24fa52a63347e81d93942850
MD5 cd0572569f204bb6af76a6fee554e777
BLAKE2b-256 2001cc6f19c00fa2241fbd9a30671b5eb21e6bb78516ae14b5af41fc26a0f2c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9ebfefb68c7f54182653d41c921f24b5447499a27ace9f8919722184c32a424c
MD5 201483a5a7224f4702abb6abb3db19ed
BLAKE2b-256 703fab497e2e435566848e11bc143b1136e8af096fae84ba83dd51a7b7a000d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.57.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.57.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.57.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 54b89912fd765eb384fed4589121f2cde677d073d916577e282dec114a90b176
MD5 cb2574d211d3386e5646a50816fed171
BLAKE2b-256 fa7f90ff168b66fbff74f9acf578c8e186ae81d98acc3a3c07a02f847aa1efd1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f9a620568e25cea7f8b33367bc6e5f29b72e3042e9ddc7e597f2faf4414e6546
MD5 624c4ae605a5cf3655a8960415ef4f8c
BLAKE2b-256 fe0432625b415f911927998dd5850cc84b5584b16f80756eafe271ce79f20ed1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.57.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.57.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4bd5b1b51658cc028b40eaa13d6f16d79f1aacc430e2355f0ce21df528a12f19
MD5 94af4c1fdc4798a57014c2a3d1716d6f
BLAKE2b-256 5b8680ad39a29bd96bc2cff0ba26ecb041762aacfc00eed60b4593552bad1e09

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.57.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.57.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.57.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 73110b84261569ca846b31014329e1f2d64b9cd13e40b779a29d918d1e4ed6ca
MD5 65c53c2f3c85a3fc7e89ce0ccd781697
BLAKE2b-256 0da64afb8318230dd2ad61c469d6b2a4013a4e08ff670ee06ab0496d14ac91e9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.57.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f989262b0ad8d0efa657a4142d8484881a6987aeb7bb6f96aa8cdf62da364751
MD5 85ebe6942f987035b59e82a2f997032b
BLAKE2b-256 be3646595aece6ff714f34a799e1959a3347fad43f5f6bc00ce7fbe85a79f617

See more details on using hashes here.

Provenance

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