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

Uploaded CPython 3.13Windows x86-64

openbricks-1.28.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.28.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.28.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.28.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.28.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.28.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.28.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.28.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.28.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.28.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.28.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.28.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.28.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.28.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.28.0.tar.gz.

File metadata

  • Download URL: openbricks-1.28.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.28.0.tar.gz
Algorithm Hash digest
SHA256 cd45c8ba50742f97bfbc6e4a196ad36eabad3c628666bfae5a390c51e91ae639
MD5 48f732aaf8843e3859a76ce1bb7a15ad
BLAKE2b-256 99c48e83c10df92fa653c7ca48866ebc8112a628635677fa351b1840480efe72

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.28.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 00d3c621bc83d028be4b8df118f9c39c7527b168666b1daba4b4a8469a072341
MD5 ab3116e8346e45408627510a82d66470
BLAKE2b-256 4b75c097059615b0b2ee96b971b4869c39431a0e68f205855549f01fdf4353e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.28.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.28.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.28.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fe391f98ba215275a4d64d996b90552186ab37392eef40deccf8c4f32f9a743a
MD5 bef057394cbc4bbfceabf8e41ab7271a
BLAKE2b-256 3299d45f06432cb85920e37deb5a2c4acbefbd84ed71cf1b5b406118c6e81836

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.28.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2437c1f7124de4e527a5a4554161fcf8fb77c8a8c15da6798de7e930d651f535
MD5 0b13375079dec7df46a8200086d37c3e
BLAKE2b-256 206bd713a1a0f6f3036de2623b8669cbcf35d97272fba3cc30fe841b6b3cb98b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.28.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3ae6da0e165f5fa969485d8dab705b375dda0825a85cea811f79aa6ae151b812
MD5 3f29512badb4fd49269b883a11e2ea1d
BLAKE2b-256 0407a074a6ffccc5a9da2127e2a204b7ab06c6a1903ee2c1bb83a91c1ed318cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.28.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.28.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.28.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fbf89eb08739db216375e6dfb77a6738f6a3934d9a234edad5ae083f95ebc8fc
MD5 3404802f48b1ea7090f2063c0e5a6be4
BLAKE2b-256 0ae10ebe963a0831cf3c9221f944b32e25f478b34d361dd0733eac7880053f15

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.28.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 6319955da7ca7f341ca06ff1a16ca92c72140ef1562eab328d529d5733e1b826
MD5 3b89ad647864eab348f87b517c286782
BLAKE2b-256 deb29c1a5de4961a78d5499c5944245fb72fbe3151ba5a355779fa70ab1245b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.28.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a7f1b3e2f921cf75027950113aa32f91d2dc3c62c887dcb32b66a4a3cf5a7497
MD5 c0154a0eca3e6dbb18af554730bb1755
BLAKE2b-256 b3b83f6fd087692355e42bf596033a7a50bb34241e523996ec30450d5649ad3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.28.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.28.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.28.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0dc78701b6c4742dd8fa9b1531cb785a3d17edc914bfaaadc7cf7ff171f44849
MD5 580cfdee03a464a5d87227dfe1c155c9
BLAKE2b-256 5901574036bc0e809b0767eefcb3c71526007b88a448673b45050a6d45aa9a10

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.28.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8cc04bc169e5d86fd1d5e5678cbdacdaef8dad464ac35ab4c6523e0e63cddd62
MD5 30fd33677edbfe985a9f41ece60d9376
BLAKE2b-256 1604300538ec75a2360ec978e2c837a4595790242ab0814a422db96e1d9d4604

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.28.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0a708515f5fad622fba8ff1f8db09177efbe7c4ba7fc3797a7f7a11725091424
MD5 6a218576660606dc96ac78be4858bf2d
BLAKE2b-256 6a55762a047bdf854874676ed8a7a0abb71a5726250064eca83d21235c532716

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.28.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.28.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.28.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 53b8b0f830120876df8402fe35c4516e3bcd011feec638761073b9b36a6cb269
MD5 67f3ee4c6cd3b22108f8f393e2ae46c8
BLAKE2b-256 be80079e664815ae6e1371a2b55d83d5c9415b58b19f7204dfa385466ca20364

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.28.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a64bac32720bb32d84a9d35b88209b5af6c9913bd7075e2d294cd0ba069ca139
MD5 14b9728578cba79aa54ee004a64cce90
BLAKE2b-256 9c0bb068ea015e1f8685bd7895e2177a47522a3eda08a14eee831c093bde51ee

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.28.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.28.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 76b7aafd9e689bddc53091c241d93548e450c4e53d9d64c5f22e6ae95851735a
MD5 79d3fe44bc332605d4bb4273bed3a839
BLAKE2b-256 0b710d409fa0c438f99ed0e6c51d29722a0a732a7f62193a44a681bc64af7df7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.28.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.28.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.28.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 635bd6af717e38ba5357efa319f90cb56f573b7d9959ca75c6e4ddfe68ac05ea
MD5 165f0286f53b50f8244b68bb3d868fe9
BLAKE2b-256 db78104f7a8ca61ca1612583d3402c94afba7e0493cbd73f9a9e2d0522a5f6fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.28.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9a417d6f3cfb6f3dbb8d2c549767adf85140cc038803fba05c8779d2dba74bb4
MD5 5ef09756417c504af4305f5e40495001
BLAKE2b-256 7ce708e66e5deb170f5d62c3346139666daca57051bad48b9cc79ede921bde39

See more details on using hashes here.

Provenance

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