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

Uploaded CPython 3.13Windows x86-64

openbricks-1.73.1-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.73.1-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.73.1-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.73.1-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.73.1-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.73.1-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.73.1-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.73.1-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.73.1-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.73.1-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.73.1.tar.gz.

File metadata

  • Download URL: openbricks-1.73.1.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.73.1.tar.gz
Algorithm Hash digest
SHA256 a87dcb0473d3a6f5fbef2c112dbd9d8e0ccd9a1155c495558f25a3db11f18e0c
MD5 73d32f5865a4bed4b7a532e107cfe7f2
BLAKE2b-256 da326e314efbf94923a101bf1e9f2f91ebdb8affb8d083c99c81a67e260d8ffe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9c5fa6176f2a1aa0231c6fc89d924e9fd3f9490410d9f70b11bba946d4304f80
MD5 87d1cb87294ec17ebd2d0b561fb7b66f
BLAKE2b-256 07b3349be39fb6c9651d392c2567e4d6923c2791fc6bea7d6bec415dbb54fc36

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7137bb6a630d01ecd9f7393fb06bebeaa7ea6871eac9cf17bd4757af2862ba50
MD5 10b12fba5cdbd3a341fe5789ebf6e99d
BLAKE2b-256 28da50a09b76a61994072ad8e1fe767be7b2a501c445e806488a2eb69f16e8d2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 357077595535e97429c9036b3e59040ed6407fdaeb1e1cc61cd09a3eef4d1e24
MD5 a2cec52286c9387f69cd904f19d9113d
BLAKE2b-256 bd23fda2545e98dc9ae02a98bba19154b76d4ac5bd6dbefcb9a3174ccc9ae2f3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f1c9114c440b3d05aebad02737d91c9c9a311090089698138feb2f7066fcb052
MD5 38d773733f9ab7a37d5fdb95ee5399ad
BLAKE2b-256 73d1b280ff32a6fba5633b426bbacfc189e01f1c747b22778091e553dd358175

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d386313b4e06cca6b1e4b225fa8e54a0de4477559e9266c167b565b1eae14fdf
MD5 583c833af200d023a9d8bf4cdc6093cc
BLAKE2b-256 3fb92d7cc5a45762942a264a8b44d3dba3dff001e3f747e1d4113844f890b365

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 781100a515e03cae7d440a75d2b682a7e224e7079b66ca2f2d1fe6b741eb8b8d
MD5 8b5cc8de97627130b2b9700fd753b12b
BLAKE2b-256 5289b1ca14fd3c8d6092280cef40c1dea37da10092bf254c2a1f46bc4c894e79

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f0c9493b215770d6f003006170d83af4fc807c69c85645c0c409d4de2cbdcbba
MD5 016f27acfa4f4c647f74f6e191c1b4c4
BLAKE2b-256 13514439075de5dbf0b6b3be46104e58ae261b759b5757aab0c6404f3eb9c252

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c79b644ec563f8b14f5edd0b089deb2a7393ba7d010ee307fc9dcdf04deaf99c
MD5 279f14dd5b6a3be28025536ab2b7cc82
BLAKE2b-256 dc5e70c465914076beead8eacbf001342b3846597347892d6a7f7e649b320b40

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3a88cff51055d74c818dfa207e5a1762a09f92ee23fa7ef78eacea80f6d5fd91
MD5 78b008129ca09869004bfdbb4cdd506d
BLAKE2b-256 0ebbb317fa7da13e4926ad5a7c6fcb18369c3ca3ab569045092b1f6be65ed736

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a76d23a4986ed1db9e9711ed78242ea31e469cb23e5a23bee85d4bad686fb750
MD5 e58f5a97f40eaaea35fcc5d37c18eb1a
BLAKE2b-256 bc0604bcb9bfb28d62f48f54851ed88c4e4eafd55d93a3b9be02044bc8ddf59e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 da0e672165dc547cffd11fe3eff02d8a7ef88d8cb1660fee9365385593993fa8
MD5 8ca4eb47eb37d72d2a27572224d687c8
BLAKE2b-256 29592b8fc0726c3eb11790a3e9ee5a67656686c6277c81568449702c7db81225

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2650a26bffc9b5d8530dad066e79d36243fa399292fa3dbec80aef2acdddf91e
MD5 788bb0a788a0fd81a0bd4788861f090a
BLAKE2b-256 5dd77512470820c59af24a04a97086dd1519132fa1ae58d1cf8b9f1453335ace

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.73.1-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.73.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cdc7296711764a6ea3c90429bab5b5bb8a3534a04ffa6eefe25109ba06dab5ac
MD5 4a01543e10c2c66de61a30ad0548c742
BLAKE2b-256 5d879c72c032cec03bfae8521728654aacc7e169f4e8e0dbffc102801d7a9f6a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a7feb2ac1c9fa12aafe7ce474d2b52cf4641d1247b06702fbb2ef09b81a9b33b
MD5 30532fdd63684323ad22b151995b901f
BLAKE2b-256 401650d38643110a07f84c12da484ab30c6abb877d2b57bf0bf0685d6d6afb35

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.73.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2c3bf5be9471996600955894c443cc1f725cda7fdb18fa8aded76261d0147167
MD5 5e6ddaec56d17bea9d7ebd7383972aa2
BLAKE2b-256 1ed0a3052114f0b98e805cb75ec88377d4f7b0fbf9e449de06878fc66e2a9235

See more details on using hashes here.

Provenance

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