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

Uploaded CPython 3.13Windows x86-64

openbricks-2.7.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-2.7.0-cp313-cp313-macosx_10_13_universal2.whl (3.7 MB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

openbricks-2.7.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-2.7.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-2.7.0-cp312-cp312-macosx_10_13_universal2.whl (3.7 MB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

openbricks-2.7.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-2.7.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-2.7.0-cp311-cp311-macosx_10_9_universal2.whl (3.7 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

openbricks-2.7.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-2.7.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-2.7.0-cp310-cp310-macosx_10_9_universal2.whl (3.7 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

openbricks-2.7.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-2.7.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-2.7.0-cp39-cp39-macosx_10_9_universal2.whl (3.7 MB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file openbricks-2.7.0.tar.gz.

File metadata

  • Download URL: openbricks-2.7.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-2.7.0.tar.gz
Algorithm Hash digest
SHA256 3b968cafddda03a3c7d9b1b234dc23288201611452f2f4b541793b944159e449
MD5 dbae5a25b0befc49113f10ecd9e1868c
BLAKE2b-256 b3aa2ff5e9eb0999814a7b4867a5ece8828eba40d2de2ae74c3603ec12d5bef2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.7.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7a6b4c1f86b345b95c86beed9656cf4d62a12f424559c7ac9be517e7dedd8e38
MD5 78cefe49a3380545287823d4b4f9bcc4
BLAKE2b-256 eaa1932b13d8cdec4ecd8b366c3117de02890b6d4fba6a0488a1e74a1b3f3300

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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-2.7.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-2.7.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6016ff84f2c651a6850f296d944cb8db27985183b584263bb5dba4aa9421761c
MD5 10eb21b926964d46761db800f3e5994e
BLAKE2b-256 9d9cc2b1dd0cae1e73285b3bec9c8055259ae71e4e03eb80d51eb0de34c48e3e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d786fcd52490f51e148c81f227ceea522d239b140d7d69e4e2ef737231f8ddb2
MD5 59110a930203b45b457ece073927f22d
BLAKE2b-256 edb775491b00bb58e0e63a103b4054c0f399c5019485203b5f8fcc957b81d57e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.7.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 07274122e59644fcacabaf96ffacb7ed58ae733def84dced99f31b01cee53a76
MD5 99d01934857d053a36f4251a69e39956
BLAKE2b-256 593e21566911fd39e1226dff239eafb018faab6ad1f3c94ecd71ff55e5587dda

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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-2.7.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-2.7.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4fa7a36daef490ef5a53d9c9bdbb534bf3f52b52a66eefaf42e870e3418c28c9
MD5 7e3424ee2204b1c7db03d80a2c98830c
BLAKE2b-256 2573c1a7ef868fbc4bad95e792bb034014b3cb6b20994700e3f997c9195f1b2f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8163e30a3d8fcced2fd86c76caa12b738a1d48461c65a810fefc8231d2c04c51
MD5 2e743089b48eff20514fc24a59e1a69d
BLAKE2b-256 5fab8263410b882c11b10dc67058a0ab4fec9bb63cb2633fc19d317eecc88ade

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.7.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 826130e86c3bfd6534533cd152157a4471bc7c18a8fbadbe6bcbf44ede9caedf
MD5 33bd575028501cb06866cfac5238745d
BLAKE2b-256 8de72cd5b9f82fbb779720a853e671ea55c2d625b281211b34a0ba699a0e0fe1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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-2.7.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-2.7.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 331d363770e3f915f4aa5395a811b78d7cad5bb5d03181faf649b86de924d82c
MD5 fe7af4ddf0c458eecf885c38d949d81d
BLAKE2b-256 514f131759ca5443d660abbcc09e9266eae1ffcb1c3047ff955fb5014eb8a843

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9f642223faeffb99cebcfc55248852322edffdc73c896e67775ee0c85b9b3589
MD5 8ff6c1619f5987e045ecbac62b5dda11
BLAKE2b-256 53dcdaa284deb2a05a71805c48e9685e5005a5893da350bece33869d3af00eb7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a23dd8363f376591705b5f328cd374be90edc503b3cb7f24389b920796cee208
MD5 1dbb989de22edeb7f014eb5993461d1b
BLAKE2b-256 5b5facbbe047c89ab0cc9de3bc21b5cf3d043a2844961884356d0174776028c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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-2.7.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-2.7.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ff837c3d199d26e7cdf52bf7ee80316bc5a8dea834a9c87672116f6d9162a59f
MD5 e2124fd6405b16d011432bdc0addebfa
BLAKE2b-256 78a3cb4d14e53a095c3cf46f8f2544f934fb50169703bb20856f6f8b414d83ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 06596d2f402eba7d6e9ef3b00c6f63699a10456b7bd99bcf85a1fb19cdc09b67
MD5 47cd13f4fb09efdfae4f942465aa5b37
BLAKE2b-256 b5d7c7f75d1dd260dc55f966b0d382a57d69703318c3ab20643a30b684970d96

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.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-2.7.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c679e5b64137d2d319f4683c18e7af5ffa521665fe3e0e85238fae7ecab69d88
MD5 a892ae63aa3857762298ab7c9c35ba47
BLAKE2b-256 80bd38caacf44c7b1356537c00dee3811a5bd615768b2569c90183e1145eefa2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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-2.7.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-2.7.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 66c1ebf1e425ed1c8a8be976f3f76ccdb9a6a42cce0ea4359990d584ae7156b5
MD5 dd15919f6a5b3a7bb6c587df93259fb6
BLAKE2b-256 60f6c47f8ec4049a3d652af10de38991bbea670cc1ea6034bee3134af983a43c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5bddfacb2805d8d05e26556327e8f67e55675b1ec316ac47f53196bcbd57b754
MD5 e22bc209e906a05094ebb0e637be8bc9
BLAKE2b-256 24a41087b273de7a9c57d0145cf06d89c4dd0b8f44ac29f8cd5af6fc4b86dab6

See more details on using hashes here.

Provenance

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