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

Uploaded CPython 3.13Windows x86-64

openbricks-1.55.0-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.55.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.55.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.55.0-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.55.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.55.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.55.0-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.55.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.55.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.55.0-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.55.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.55.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.55.0-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.55.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.55.0.tar.gz.

File metadata

  • Download URL: openbricks-1.55.0.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.55.0.tar.gz
Algorithm Hash digest
SHA256 15b51d21b4677f52302117f47751d6d4e2b4530f5987938e69c92bc016f4790b
MD5 02a4a991b549c9ebd14c291e70ec76cb
BLAKE2b-256 05f3db3e5342e513f04229678e687dc83b4798abba77a9d3b6d90045d972b751

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.55.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 05a8a76d438638c0cc7b16dda0871302568df323586badecc5ef79fd137b4f0b
MD5 3aca1bfb1c46ee0322f6505713b6e62d
BLAKE2b-256 e087cbec5f42d035ba747e92f2ab76b4556d0a9d838e1fbcd6193c2b2bb44f27

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.55.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.55.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.55.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8cca4561bb3a988d93d08d4b176995c408a156e9f75f0c52d2d304987f0b9621
MD5 9224f7563fe4369333cc5652b1f88c29
BLAKE2b-256 9de5b61411a7ddfba61a27670c4df7da5c83c4d072103fad1cd5913db47e0d53

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.55.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 694c63ea7d01214de7cec30dd2df992353ea431dd3ed7cef0d4a21f0e8cc6f48
MD5 01c9bf1ab5070da2597ceccbf3a0ac61
BLAKE2b-256 302478db7553eaa053273eaa580606c335dce511167a06044009889881a980f6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.55.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c717b09e02614cf9a318ae61475bba844f4244cafcbe27df870214e845ae3066
MD5 3958f8250e04aec8eb20ebd63333f7a6
BLAKE2b-256 cba654acb53294f88fd0ee91da6d5560f5d83ddbd97ac81e9716d49756821c89

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.55.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.55.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.55.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 47bd1bb91c00d43ba5fb8bbbcf3d624b892dca71c80b4a62edd42723952f0f8d
MD5 2297241b135c1aea90c25380779c287d
BLAKE2b-256 14358e180ca558da8ed62038b6a2016dcf85b7471b9873313cbeee45c658c4cb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.55.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 017c26d7b0b985d635e6b0365627efd71492a809013b17341be218bae77f239c
MD5 f718bb804c9cdd4728949763e56b84fd
BLAKE2b-256 b3d5d9d441539b45693162ec400bb78ce5cffd80269e78a314e2f3027ace95b8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.55.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e542f2f92764713528731379a74026cd21186e94dc1ab1d3e7ab583cec06a63f
MD5 bb0c1c9f481d88b9c35ae6a3fe1f0090
BLAKE2b-256 bc3f45e6db17cc70b7ccbfbed11ee4d2a33fa7504b42601a3061aa1079f9bbfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.55.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.55.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.55.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 81c200a13bf277b2510668476400c0bd7937dd302f2c34ba2c4e708fb36b0a39
MD5 fdc03f9e96806495c00e619e2438f7b2
BLAKE2b-256 3903c10024e583b2b68c65d314d39ee0b7fca54b536eb1f81a9aa4e0d8f27997

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.55.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3bdf7dc433648d1d31b9fcacc3ff09f8e9d12b8a04080f52b2e9dda9d9640f72
MD5 fbfc7e4adba83f6a41ec89021aaf5409
BLAKE2b-256 c08faccb969c83a2373d82d4d91ad1ad0142f93bb4f566714359072b966d86e3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.55.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c2bbe65197336c24dda30d7a761889c5afc4ba2ed8b80409d106dbb8d267fbb1
MD5 b4d3cc3f2d202ba5152156ecae1510eb
BLAKE2b-256 35a4e43ed9e030848ba7e83864e86ab2096cfcb46631f21b74789fac62997e0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.55.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.55.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.55.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 131e71c2489774d6d002ff3ddb278d5bfb1a1667b8205d7cd9ea5fe031e40350
MD5 49efc72e02390050089b84f2ea8f5d2f
BLAKE2b-256 aeb0e1171f90d26b5914124a16278060ce68fc5f0fe81a11fba94885a83ba871

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.55.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5a49d1519ce583102dc176f041ea1d364004ca638e30d6fb7320e3126d2a8a30
MD5 73867c1456401228738e21236f97984a
BLAKE2b-256 f2ef393ac1b047f08974775d945094505b86114a88168cd3ce64eb82998479e9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.55.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.55.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 53931531b4ee64284cd58f79a95ba0e3fe0ec262d684e47545cc439f890ab1a0
MD5 e492cfc532beb300ff635da5458432f5
BLAKE2b-256 6f910cbce97ef6af91d73e1a89da763cf2ff5bbd2e9ef12ebfad66913243c182

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.55.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.55.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.55.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6719aa7250146ba8a65ce17b1f82e3c19f90bb42aefcfbb82a49a66594098b94
MD5 904b94b32f8173d0d4b4adbc9be65e0d
BLAKE2b-256 a1b8921f78053d8c8fa45afbe06c97e9a5a567384492ce658b143712c93b6db3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.55.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 04af7066f171ba195cb79051c4cd820f845a81ede29e80d546751553d437ca49
MD5 e2401e95361c309e6eab898fe8fa2e2f
BLAKE2b-256 1362c008d1c26b9554155a32641677beae3ea631fddbbcf916758974753dc487

See more details on using hashes here.

Provenance

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