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.66.6.tar.gz (3.7 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.66.6-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.66.6-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.6-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.6-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.66.6-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.6-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.6-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.66.6-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.6-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.6-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.66.6-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.6-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.6-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.66.6-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.6-cp39-cp39-macosx_10_9_universal2.whl (3.5 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-1.66.6.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.66.6.tar.gz
Algorithm Hash digest
SHA256 98209d583a237662799b99594d2a7216c38a16d6175191d8d5fb40f63f90b29b
MD5 588b83cdf638228cc829d00758a2b206
BLAKE2b-256 7eaeb292af280c61129ebb9c870e0e5b2edbdb722294153d8579693a2542e4fb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5e445163312a1dc2400b3aec7bd6aeeee0cad8b14d727521db9518c1289f9b13
MD5 91164f0ad97b55b143143059206e5ffa
BLAKE2b-256 51dbc140034671145f5976c91adb351b1725a7515e1f569cb48838c87f30a6fc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e40863913ed3c2bc2914ae092d1b85b8c71e8a4c2560f65215d01e589b3c81f5
MD5 8d411726670e6a5e12c30c08d446d251
BLAKE2b-256 dc3e1edc08f46cc0cc24902824216f5405bdac1a0e0451d617c0a0c73f10c90c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 588975681c3eec0a01983db7ec935b2baf3870531fcabbe91b4ebfdac22ba079
MD5 d193165604f1b830cca80f9c89ab1e81
BLAKE2b-256 77c42c1de3ea1918c1631fe799ab45b88dce4fa5beee6a3f1fbf90d5c89fbb65

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f987ffa1908c5283043c7d884120594d4b0cb14ea2205e5e9ae3a190c89903c4
MD5 da67852321d419cb6f69afb90e0a8ae9
BLAKE2b-256 00ee131a5d4738c76b870d832fb50f178c1cf43a3fa68ffb0e828a3dac43dcd3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 adc4c96a9bbc92ca1fa73f72d2e4f3d005473c40092528fb1fbf6e7bed748a8b
MD5 63e87cef44bd0352ac8dce0d13114495
BLAKE2b-256 ff4ab9c93532b45ec7fbbde855c8bfc591dde20eac071dde3cb9c7f786f5178c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 18e7da52dacdf4f604803d6b3ab355f8d2a0592b2c48cb1ff29271a660aa32e0
MD5 2ad655ffa31f15e1a3790181e45328ab
BLAKE2b-256 802b433d08d7ec27783fa40f9504b11401a7b5a0e7065de7e6f369c957c212ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 de8399988216947137e502c26e3d473b47ed5c28dcb91c59c872323a6d874d2b
MD5 a2824ae03903b21c3546b71ae1e7aa63
BLAKE2b-256 b5eadd6b3d4814fc675086508c7a30054503b567ccc5b6cb76b1d6bc952c156b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 008cc1156eec5bfb84ee9a2823a4f5d4367823599d3d8659e6b2f119a339cac5
MD5 74029377d868a7fc6e0ce7c0ecfb4d73
BLAKE2b-256 20cf99a18375c91e9df0c40ff35cca6e4085fd060170c218a95791c845106831

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 bd07336307fbf4562e8ebe70a7ec59c2472fe067efc2faf4894448ee93452ca8
MD5 ae2e28b60d350eaef2cdcdaa38b0dc15
BLAKE2b-256 74a0e9d88617a11c8e4f31f6fb76e3f63f0d8e5980387fb1992c0d016b52ed64

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 99021135f3cd96620cb9b998d969d9cf9820315e97fec4f19167699d859d03ec
MD5 196b93d04d9efcb164c4b4cfe89becf0
BLAKE2b-256 82a372135ac7cf4061bfc4c88475cfa1188563d0a5d3e2e9cf502e74d159566e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 91770d3d8fbdb866e058dfc5408e953229ab22978333806c45806999247f411c
MD5 d0300bd163f8c99a7e572c3791662126
BLAKE2b-256 04d81c635af4bc774afafb0295ca8e5d159998037a1ff564f8dc01d7a8bb2ccb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 919c72317247dd97f6e1a1bbf0b730b92d48e8821d57a7f3852672c7f3bc79a3
MD5 d3282614f1367b8818559c4121668f61
BLAKE2b-256 3e507af1029f3ba56100d0c8ec5d53c9675e92d4bfcdffa98c3cf4d2c2a9826a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.66.6-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.66.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0f30539f33f94bbf4715f03f80d6de190afc48a470177a59f7e099af759cb686
MD5 3fb59338fd91f5d00f54555a6b0e4ade
BLAKE2b-256 2c128548e22fccf48ea335aa53d65ae9599d09b97e88690fb9aefb710058421b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bf95a8c3e03b7ac3bc486dbaa8389b6f42580bea22945e5ed475c7d2ed1ed4da
MD5 59997c7b58b858f1bd0682595074afe8
BLAKE2b-256 20c5445742e9965e51b3939e69cf1651684d2e5c1a5a5527cd125d0ce8b7dc26

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.6-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a54e08d64572000911b9e101bdbaf27e1947ead258012db245d538494780ab94
MD5 f9d6cfdfe285a519fbf01a44b6f5828b
BLAKE2b-256 198536b22eb6773217663d21d74e57f6cab8593b1a2e4d68121fe9c7c82b016d

See more details on using hashes here.

Provenance

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