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.98.0.tar.gz (3.8 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.98.0-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.98.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.98.0-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.98.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.98.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.98.0-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.98.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.98.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.98.0-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.98.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.98.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.98.0-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.98.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.98.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.98.0-cp39-cp39-macosx_10_9_universal2.whl (3.6 MB view details)

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

File details

Details for the file openbricks-1.98.0.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.98.0.tar.gz
Algorithm Hash digest
SHA256 11079824fb9aa81bccc84956773f00774b4fcc71e4f58c40e9df3a87a823659f
MD5 0645e12e7fcd300238a017036a4a88af
BLAKE2b-256 d999bd0635af668ec7588d4cdcb1285f0305440a1ec63d3ea3c47cec30a39f39

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.98.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5288aaa457a1454d6faf4c20a44f590cf5210c546b13956252fcfa318723c29d
MD5 9cfb59f3577417805b79fcfc063b2c47
BLAKE2b-256 30ae5062ac5bfb882b1f89e71e6d52b6dece7fe34c1db331c0a4aa6f08e33497

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.98.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.98.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.98.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 60fb2884f24a9ef306b71d5f859dd72a70e2855b1e36230cc0efd69a4d69066f
MD5 078a0d8223d0b8def75f0d6949fb3399
BLAKE2b-256 837f2a3c8b3da9c02b2e7c7a6a11f1fd04a62642693e6727021ecb7a19e2ab57

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.98.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 808a7c0eace2308dc216c38bb0f0d631fc896516bd0cfd91d9e4dd57f17a7fe5
MD5 615b7eed81f6e9a9e2f41d312fefdd0b
BLAKE2b-256 703993feeaf6c269cfa22301095fa3c584c21b26488ed6b7ed722332ab0d2b89

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.98.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b776bd6dceb546a266d4cd40da993c3921c26adc48ca895dce965f4ef5603efa
MD5 b97495c9ef344ceab715e5b082821d24
BLAKE2b-256 6bb4950d5c4eee5ee5c3571ecc0d1c64339fe99d62b80755b2d6e7db011f7623

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.98.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.98.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.98.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8457f07f156e9f3d2b05d05460eafbf8e065b575af0b7e43017ac0ae1a2b86cf
MD5 af4a0bb9168b6be7859e12de7f5207dc
BLAKE2b-256 ec60027c9cf2b6b44565de4b1e0ef0286eef6f87b7bf6ea6a64dd43dc7e5f2fa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.98.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a9b9808635a7d5e5db680c5efad9544718d9d121083ca69b087b10e5137de2d8
MD5 2d915cd69344294e180c07d6e3a9ed44
BLAKE2b-256 1a8a36e5f9d9bb56994a898fb0ce19b8034eb61c17446e591b4ef1ac65168888

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.98.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fd6c5d3c66c649f76cbefec14b1316c4de821c70f460d146483f750265de9cec
MD5 430afe18de4f2966937847cb7ee0a352
BLAKE2b-256 72dc35062ac0e738702d5a914b5af22b5de2966dbb299f6334b0d856e6be7979

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.98.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.98.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.98.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 098fa3f51ab325ce1b064b4a1f167a7778aaba3f7a7d8c4d901fae90c9edbe47
MD5 51176471e8466b6b75223e53eff38c07
BLAKE2b-256 1ee58c986c61d3ddce71abf4559a05641d624417451fd9adb207f6d100f37742

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.98.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 64738e7751dbe1e149a8c3b80eab2fa0e36fc72a1d565474216beb58ab93e7fe
MD5 6a0ae08ca7126672dceefc47af2dc560
BLAKE2b-256 b9f602501b837dec01f3a224c42d112decc0975f0d4ba206ddd46eff4ef883fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.98.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a76135896b0171fc905af6f170925f4860f56a0fd355c9294e76ef027b51ba13
MD5 88b422ff3b7c7d323358c8b463c5f4f9
BLAKE2b-256 8677fb59a10b4d1bca8a9156a1dae449e06e090657c82008c6db409474caea46

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.98.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.98.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.98.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9da73da7e48c5431e899c7c5317b22bcf6b2679da7c4ebe7a030d50780065653
MD5 6b117648c29ddc912fd1ae2b1bbf84f5
BLAKE2b-256 cf37c904c3469eb7bcf121227a6eee7df73661e995d1738385ac93d613ac7284

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.98.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 68e197e7be8cc61109f00bd5164d467d7be2bfef684872773d1bfcc60fb20e42
MD5 2da21533388e53e84c504f3c1c13e0f2
BLAKE2b-256 9a32d99393e1063d9e735f2498274d18e06f93f6ea018b3e55fa86d3ed8b3da8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.98.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.6 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.98.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7976d885be66f9e4bc729557c811df7387e4a155f8279c41907f7bb3da9c90c8
MD5 a4344b4d4ca95db0e2d42ae1e9292ff9
BLAKE2b-256 fd46357c9cf69e43274187dc9ecefa4403045e63eac58e7d7a4b7a957eb10851

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.98.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.98.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.98.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5137af73493b60bc678c18e2232fcd613915e0c4fc43cdfcdb82b342a1054443
MD5 8be922b5678ce51a4adca90691dd871a
BLAKE2b-256 926f38c969b64993ce4b8da6b674a41614eeebbea45fe459a2ff5217f53c727f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.98.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b0e1bea27ec30a01d0976e08ff376669c39ddcbb1458e4bb53c193da111b255c
MD5 65c5b1a89df81326869f04f0b679b0ba
BLAKE2b-256 783767ae2448bb642df27e5311c6857ad3f21d5f4de80c62fc61aa8b545c611a

See more details on using hashes here.

Provenance

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