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

Uploaded CPython 3.13Windows x86-64

openbricks-1.30.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.30.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.30.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.30.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.30.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.30.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.30.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.30.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.30.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.30.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.30.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.30.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.30.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.30.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.30.0.tar.gz.

File metadata

  • Download URL: openbricks-1.30.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.30.0.tar.gz
Algorithm Hash digest
SHA256 d2901ba8b02e18de8280ac22c074834ee57f7a8500f0f787544dc1c36d3ec5fe
MD5 4e9f035a0e4f20630c930bae8a0aeeb7
BLAKE2b-256 372e5e3e88ab8ed8c5738facda5120ab9cdb97e4be3f14ddef45d4343d2289a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.30.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9b21d335443f8cb3ee9aca2e2e2141b05eb6c5efa8a4cb8906d6271c77c92973
MD5 a650f71de1d9b51f6e3b7955d989eeba
BLAKE2b-256 9708b31115cb91814cf5dece2b052c3db868b023a010524119400e47cebd2fa4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.30.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.30.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.30.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 786a3cd7347745351968be39c8c72ef3ec22aa740c96a6dc0d6f30c9ff066e2a
MD5 2afa5f3461cebd57e811988ba1770bc1
BLAKE2b-256 4a2f708a390b692cef4b5391ad0f44c1a9d465a248adda6ec212626b5c339c07

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.30.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2c408bc179745806d7e3bcdcbe4df0700b132c4c130960ad0884574ec1132084
MD5 338253ef25a62e6519efc9defc6f05ea
BLAKE2b-256 62e764b8f31dae90bb638ef33d1cfef30c2569ee1353b9c47998516f80cc17e6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.30.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2f75bd21f7144bdf7b8aa0512fd8fb7cc617180c35db055e22ad68a5f65779fe
MD5 f866b60ce0df1af14724a74fbc03d427
BLAKE2b-256 b04b32133a0fe244503af194a3672310b2235205cecb33692f49791ac3edeb2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.30.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.30.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.30.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 375316bea119855a4c391dea4f919d4e634c2b9beb2e7847f2ed446699e88bf0
MD5 0d01ee524af618001948995824db37f3
BLAKE2b-256 0765fc8846e9217d9be0fa40b3b2b9f1c8ba6c99097483571e05af8684d44d36

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.30.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a1bb9347d2f683e669a71b9d11c33e2cf9f98f7ee62b3ac4b142436652cf1934
MD5 9c9b651c7594dd13ecc7427a4059c811
BLAKE2b-256 7022fae94a59f17dac9f4f52cdbc473523e7f170ad93bf33f90eb093cf71c89b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.30.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6985ba950adac79453c492f7ee524056e4ae04ccd36011e43e64aae4f3906275
MD5 c1e6c168e19bb86d4532a96dc30a5faf
BLAKE2b-256 d1e617196b0e086471cd2c7779d9bdfc90e428ba068ba1d86479be3c387955bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.30.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.30.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.30.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c3a6dc5fbac73c742266731eb3baed2c464309e00b3bfd06fe8817dc199d3276
MD5 3c90456c2e7c0641606a4c0e9cc1842b
BLAKE2b-256 a1aab93db898201dd93775fe4af8da248e0eaf48dc5f287fc69a39085d918168

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.30.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cb46b735061638a98b4a48ac86ac6f7e8c069f83580d350878889be46ef8f519
MD5 baaf1e539634594f341e456687cb5518
BLAKE2b-256 b0eaee8dcb16ee48a5bfc53c917da3808a0d794daf111305ac306cf47f85f157

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.30.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b620622c34df50503c2a0614c18e6b7a700e1e442b6f4d17455fbd02075bc347
MD5 f2f7a75eb2fc489e580a38215b0bb83a
BLAKE2b-256 f57ed58e1180ad5dd94795f60960d46828c84f04698e657b10444b9c1924b0e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.30.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.30.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.30.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 80f7205da7e5fac100d93fa3a158a5d22e6993558f4b2097ce0f11ac7902e930
MD5 d8b498f5e32e04c940d64493360094f1
BLAKE2b-256 f47a2ccbd0b6c98bbb5eb3b78f1c5892c96d35d1e115d0bcbf8db835f10d38c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.30.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 474e251ca85dfd504cc86e7a82be839d4275e1876417a8d6754d200f57c4cf4c
MD5 70a1e327f87491f23b5543efc3d96078
BLAKE2b-256 2be9fd59e239cb17e6d15755c4d256ee095d6c5cd5702c36f12eda015569045d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.30.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.30.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 526a49be8c0e057ea9092051900a98bad22940d70f87209906f3a993ecba68e9
MD5 aded053519d2a339c519a5130a2b429d
BLAKE2b-256 715eb69301857082b5402d03a4154dfbe4f26aa03c6464ea8c5b29dcb8506589

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.30.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.30.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.30.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ef0d151cca1476a311e0b3bc9487cdfd6cb240372c5d12bb0d4551753944c536
MD5 63e5c4d7a05bbd4cb159f05d4b2759f0
BLAKE2b-256 f1b76d450da63967b2224c5b28da8c0bb73d7d8f32a36a84fd060810eadc2863

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.30.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6c34314da182d45c37ff7941193af691a87a5bb60d1eaabb49e0a02f1957916b
MD5 86f21a299e7456efb3dcb3217b58211e
BLAKE2b-256 f677509fd04f57076779049e0a58e102de546afefbd7da9694165ef44f0dc99f

See more details on using hashes here.

Provenance

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