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.78.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.78.0-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.78.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.78.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.78.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.78.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.78.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.78.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.78.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.78.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.78.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.78.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.78.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.78.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.78.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.78.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.78.0.tar.gz.

File metadata

  • Download URL: openbricks-1.78.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.78.0.tar.gz
Algorithm Hash digest
SHA256 bc89eeafd61da4f9d4f76d9c3efbdd69d59dd11cb549c33a7f106817eeebc43e
MD5 e9ebaa8f4e4e76a2f51f2b695ae9379a
BLAKE2b-256 c8c29b4687e7e11aed4d23279ce87fb70286dd5ae985fe144839c2ea395bdd59

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.78.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6c9df5be9ffd9d6431142dc456cc9f4a9162d11e15a304c1efac73219213ddb3
MD5 d347ee964afa03979a9de384edaeb1e6
BLAKE2b-256 9430899865c696e916046c6073a8275c1469cb6bdf3f31a833be82dc16d5203f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.78.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.78.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.78.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b13c5d087f41c2496f909a6982b07babce4421d977f748e5c70f00d83ff608d5
MD5 d09a340c5a1938680067f9f941c1e112
BLAKE2b-256 0764faf298e3054674cf4961acbc03a5167fdbc57e0058a7ca21a07c9e8cef84

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.78.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 bc08b9af520896bb1fcc31ef5048dac1b90253c3d4123720aedd604dd20906ca
MD5 20c2790d08816405f86e3faaa71f6830
BLAKE2b-256 635ae0bac720cde86f7973eff623f152c005f34779d6f8146c9512f43ef5fd84

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.78.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9404b7d33afac259d0d9d85da1fb25a124b66735dae210814a83c19bf9d9d9ab
MD5 03987b177dcd306f1d69b2bca5f4b7a8
BLAKE2b-256 5f9ec1aeac8b751012c7c447d1f74b1f7e71319b70bfd5b492e2c8068a44932b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.78.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.78.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.78.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4eda2b257994061caf97676bb98df9c1f33e69dfa74f05ed5dd641c52dadb9a1
MD5 35a1ae22244f7ed2ac82fbf1aa8baecb
BLAKE2b-256 24183dd854419a9e989e95cbd38ef5221769b8e0d3e2afef4bb70d6c1fd75f23

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.78.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a0a691f9ae70895aca41ec80fff460d7f616ff8a686f442601fc47a0aa8d901b
MD5 8e914a7385c70c894a0e4438ee85457a
BLAKE2b-256 9c4edc5675f841accb44a5720ec1be654e1cd5301524b31e7883e0f62212326f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.78.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 83ffd57a5495a7d38ddb29e45b891205ab5ed618e731cb31df2987791aa45580
MD5 98642e9ae9ad9f898a46b6ad8929dc3f
BLAKE2b-256 a4628f38aa99c6ad9a60d7169b67e63c640d5b4ef5394c206de282254eb00956

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.78.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.78.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.78.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 68d0dda8d8ce1eb79cb1752d54721ab79b5760e5ce9ca6c4a567158ae5e87904
MD5 b822e526ca1ddb5fe1b99761e1277b52
BLAKE2b-256 40ad71c583e3da78866faddacc77435dd940e8970deb6cee84f549773e21de20

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.78.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2893b575193e2542d587687a6ee037f65078b75404da0d89b7cc084bfd273d64
MD5 9f69e0ef42a006861bd7c1481144c919
BLAKE2b-256 6f7153703c0eac18eab6d49344f9bcb1e2804fa9f6c48797ec265fa3b21054b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.78.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ba73dc835b7ac13ec6189e60090bb2bb667f7a6d9e81849b63cb2f9d6c3532be
MD5 66c03676bafcce9e163eab682c7b18b4
BLAKE2b-256 c3014bdc7ed5515f934a70e25c320cedbfe480a9422236d254da51d8fb31f7a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.78.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.78.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.78.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2287f654be5971172d0518fb2cfb552d14b120f687f6ba32b7c9349962e134d9
MD5 5631c901692dfd7b3a00bc31a578fcff
BLAKE2b-256 36fe50069285dc58b915f8caf7b584999ea88f2254ca992731395d1856d540e2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.78.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cc537a5a17d0645f44bc24568bc4e0e6274894b9915aa68f314d9ebff29273c9
MD5 4faf3581b37e1d5d4c9f67d68d8a5ba6
BLAKE2b-256 9fdb92dcbd3bb8fdf413901894eeb27b9b51a6fe77025bfe09459caee9e8444d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.78.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.78.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d35553e034b0046e6beffed9403799d47ddb94851479f134a3ca2ab84a948b9b
MD5 7db269c1e65b51f99780793278f68034
BLAKE2b-256 7f733cd1cb24ef5611962d6a6c4bfd4ec2dfa3f2b60e3463d04fe43141e90b92

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.78.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.78.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.78.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ad90272cb0e96797f261a43504e4f3352fa31bf27a66c922e0d495b2cd035816
MD5 3282191b81f42d2537f9edeb75e100f2
BLAKE2b-256 fc21d5d8a42fec76e9bdc9f4afc5da20f777658a449fbd9e5025769984e08bde

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.78.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e7e06734063bef889673612c4fe0c10b8e63167b3b55952712984be103ad4efa
MD5 4589b6b765607614d364e59100c8799b
BLAKE2b-256 eda2f441b580490b4e889f44f1f08fe308d44fb7358bdaade8db49c13ccc1caf

See more details on using hashes here.

Provenance

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