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

Uploaded CPython 3.13Windows x86-64

openbricks-1.48.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.48.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.48.1-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.48.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.48.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.48.1-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.48.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.48.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.48.1-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.48.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.48.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.48.1-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.48.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.48.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.48.1.tar.gz.

File metadata

  • Download URL: openbricks-1.48.1.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.48.1.tar.gz
Algorithm Hash digest
SHA256 e4b5701d0dacb80001a446231ef955c04c5b1d4d196b27481b555a543b661884
MD5 bc3bf6b775e17903eb9d521f86aa3ada
BLAKE2b-256 df219f028769c6132233ebad189a09fc5d641d4d67df96486c5e526d59bc4984

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8ca58a4ea8e9b2523558f6cc6b18e4545002c722b6d7b32ea14c7bf1c28585e3
MD5 00142cf7935e66a1532e3a99ece52d46
BLAKE2b-256 00490dbae0121121cb43581c27d9334c50f7987406abcf3ce9a36e7a7b988402

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1ab870b3e0277c56ab113a79a9533873f519ce124953d001905a92e8c1885a6d
MD5 d5738c1b04449798fd33f66b36d1cb12
BLAKE2b-256 4a1ab168245a78ec8be963d323a3d6cf0f90a8668849bb0f089d85b2a88481af

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 442195fbc3c686517d8ebc9b61b17d23b2bb6d2cd8de5a3f639cad27f3e45fdd
MD5 bc81e4a5b1a71d1b2c71f5108c07e98f
BLAKE2b-256 3deb205d17c536eabed9385e05744b2be5e74da53a6183afe192391bfeb94de2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6a00e0f27ddd1985438e667f5486bbf06ade4fb60ae9b4cc03db3ddf1b85b31b
MD5 3df1c1638e9e150d729de5af211a6fe0
BLAKE2b-256 893e759dcabbd2cfb001cb91b4aec007563e797d4c8092f063214f97a6af5c59

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 04f6c8918aae8f35ed602f6d6a55982aff550742d718313dc32757e251719362
MD5 e5267b7f51a69867d486f0e3a0bb5e83
BLAKE2b-256 12f9e0c9a84016ade757c38af4cf602bf81c1a85418947f0e4ad4fbf9d52b97f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 353094003c25f4f3f1b288f57415d6284507f55a4d7117caf990417affc3760d
MD5 9cdd754b9209584b67b556d1f0b45dd8
BLAKE2b-256 ebad99ab9ce9311757757e9a7d39692b02fba6199b42fa10c8a331e79c18eb4c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e877b7f82e5dd7a59345e99ceaca5a0869b87928ad47acbc27d649ccb5131ba3
MD5 6810f73aaa38d64bb3a5698fb89f0553
BLAKE2b-256 8dac4efc7f64738b43c7918caae4353f893c75fc1131f8c1d21b49156cf6f4a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5b9658d41f900994226e06ccf36d392bf2986af703b74c7dce337726a8247dfc
MD5 66b87a2bff9bbb282cea98733a5790a6
BLAKE2b-256 58f31adaa605e27761912e76f1512746826442263a6b90e01b138debd8c4f08e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 113a511d8cc275c7279b42a9a9c0e1524cfa6ce5d46ac1f6065663caf6b9db52
MD5 35a6b2b875c4ade529aabb78f210f65e
BLAKE2b-256 008709b3168545cde2b05450f5cba304bf6948b7a85bd5b649392f8d02ec318f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 dcfabee79e9ac191cf35d468e88ff6bc52477f137a5b7972a8dd78dbabd7e202
MD5 51e01ab98ee91f45c9f45ccae8d1df71
BLAKE2b-256 53c8c91831a58bf6d9453d773cac03318c2a2dc10f9ccb827ca037d101ff7d2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f521286e1bc9349196b8f005a5fc920c4dcde072a182166450cea63555ee6743
MD5 577f435625be7762097d07fecb570592
BLAKE2b-256 4dc72ea1cc2f33d539ee2ddbe2f1d0ff03bf45609522e623950f4414f58a7270

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d3aa7e86bbf7fd4e9a2cfa899cc20d578bf9a0f2f09ecf74e4d0f6c15480a9d1
MD5 b4be205fcccf802e238a352dc886595c
BLAKE2b-256 782a2cb4ce018177d88010512d6f6db0a07bb0c18b736ff1239f0943e70bc9f0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.48.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.48.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cd944cfb790aa6c7763a477531a3b48cc32494037406def134509c6e2a85514e
MD5 8818333a99dc6e9cb447079e8be2dec6
BLAKE2b-256 f0284cc612d8c29fb953ecfc7f870dae5adaa7252a6a2fc4830f7e9d1d868fb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 be1df78722ca829730fe0975cf044f26dead8a41271c2b2381fb2eef00ef2173
MD5 d8809b8eb953bd9f7e82b0dca616df13
BLAKE2b-256 ccefb790d242d70f27d1e51736e3efe29f0a1c82bfa84d685aec9866f5453ad1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 af7d26c1e6bf38b82cfa0953e471247ae198fa05f0703e7dd7772d31dc0e1c2c
MD5 dd1f8132850b239267efda86127c676b
BLAKE2b-256 cc650939e84f3c7f077e0cbd37dff6aa8a442eb5cb9cc9efd4d8a0c486f4cf93

See more details on using hashes here.

Provenance

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