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

Uploaded CPython 3.13Windows x86-64

openbricks-1.58.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.58.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.58.1-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.58.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.58.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.58.1-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.58.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.58.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.58.1-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.58.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.58.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.58.1-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.58.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.58.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.58.1.tar.gz.

File metadata

  • Download URL: openbricks-1.58.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.58.1.tar.gz
Algorithm Hash digest
SHA256 b9ac156de449a57aab2ca7fa927524743cb0ab1c1ce4d995fb6cc87221587e1b
MD5 2a06418d59aa30db14d36178f5e4d4dc
BLAKE2b-256 c6a7df7254248fff09d16ccc4ccdd0f90ed80dcf8e1c052a4c1c5c3f339b6055

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.58.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 836a0428acaf5d9084f04e988bbcf619922c86ded5ac4deb05b5a8886bf70b76
MD5 db3963fa79dd0c7da0435e6951f9e8bd
BLAKE2b-256 1214f068007ec5828c7a5d7c75909deb4e06de16d42b94d39be64edd8cab80ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.58.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.58.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.58.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 94403016725b91faedb49a9e68ac081da57a55275ef6b203859545ab709c1b61
MD5 27fc608e9091b114b3fe9fd7ee129cb0
BLAKE2b-256 905bc9da9ef0518e66b26d56d3d92cb88d104e3bdf52fe5cde5d05ca26391779

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.58.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 597321052ede8a5a4740c076e0f7bff58042275a2469c88ae941efc9cde90d66
MD5 0fbe5614a9e3b342bcb2e26796bba84e
BLAKE2b-256 5dd63a699698467f322180ced89d68d6c7855fc7c407d7fc79387a28d0e2dc2f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.58.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 35cdfd45857ad5722c7403c36a16c8c2b7d74538c1c84f13e805610d005d65fb
MD5 a28cea1609fc17bb3151e01535dc30f5
BLAKE2b-256 f7f19a88ab609473079be49c360356c8133d373d27b4ce7da3b141fe848e9648

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.58.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.58.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.58.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 53ac71cb6d404b76404134ecacce516d74f86e42aeb65732c715b38cd9101663
MD5 bcccd978e01aa59341c305bd23a12b7b
BLAKE2b-256 9b2c1eeda698a7095aa65e030ae6c5534fc8b2b39bb65e9c4c4e18620f70e045

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.58.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d77a19913e10528af33314571ad1e76db5b5cca4bb88f4b8fca7d009c85dc093
MD5 a29ac8a41dff331f6eaa39a110632903
BLAKE2b-256 d3235091742eb2ef81a4e96f70ec525f5e57b81f26ce693f387963276599ff40

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.58.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 35e794210328ff2f4fcf78ee60b8a9a0165e7946f636b8f1cfc324a0b9a90a5c
MD5 e92af602cdecc9f84e2dc4e9167b4e69
BLAKE2b-256 d8298dd4b3ce6f03645891dcf2d4e3171951dfedf0ea277006be2d4a4b6e4c22

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.58.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.58.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.58.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a8af13e7bc82c006ce3b6cddc3f0018f18cce3f3cd68c88a25ed8cf6fcb9c3ea
MD5 2e7b4b1becc1f47bc0901e2513d0b65b
BLAKE2b-256 6877a3e65dd7ed696b65343bba98554fcca210438048bbd336c02a37ef7ffbbb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.58.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7a9c9a5693457b3e1192b1252f843e1597c4bda3735221978411c442f39d3590
MD5 95c05091ee60a3085d137f1b3c824310
BLAKE2b-256 b976c2b2462474eb2bd365e0bc906239f6d00712f320029e6164bb717849ec24

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.58.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 04a2faa5e791889e4585067afc4a5412816169f70e763d4e6f40ad6830c5e9b7
MD5 0927b2761cea4904558fd3bdd1bd686b
BLAKE2b-256 763e9590a4d7da77ce906ffecc42a57a2fd860eb7a7b686e60bf7bb5767a65ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.58.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.58.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.58.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 18b65278604bd6f9c258a86ac05c8bef67c804deb225cde2547c34f6d721328b
MD5 2955f3b1c6923f4c3c5859bd4b5b76e4
BLAKE2b-256 3371217f9befbf0b6773d3d6083b7b75b977ad669c1cd9a66235458766c85f52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.58.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 91c578691460594682f651e66802b9df3b2c5ad4094fedf7d5b63d51fa8ab906
MD5 ccd6365bf1e43a3d936b2e6fd53a87a9
BLAKE2b-256 6ed13ef056a51b72ab816fed90e572e3211d1fc7bba308634e8be05c2f5e9402

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.58.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.58.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 84c9a20894eb02aae1fe832aa9f9cbad7d7934e8380941aa730d31a4b5f0b28d
MD5 540aca652e63f5ef6cf7bb4150e18821
BLAKE2b-256 f8163f99f227b388a3ee6ea00e8a28281d29ed905ecc49389a81822ee7407882

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.58.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.58.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.58.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ec0a09e88a44eac5f6594af0e46fe99ac5f53f43e6017ff8440bbd681db0e671
MD5 2ec3e16888f32a76d23b5eaf5a591edb
BLAKE2b-256 6d3e9487342675b922b43e1fbdc9192bc25efcd26dc045ba19a81849c4a2a089

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.58.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 41e47b83b238f91fbdb07c013a225231363dd70327707dc11e632983afc1bb29
MD5 59da6cfdefcd26dce91d97b3046deba3
BLAKE2b-256 e8198bd2dfc13f9ec8cd8c6079fc31d897f779a7b14c5554491fe2ceb510f2d9

See more details on using hashes here.

Provenance

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