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

Uploaded CPython 3.13Windows x86-64

openbricks-1.39.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.39.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.39.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.39.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.39.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.39.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.39.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.39.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.39.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.39.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.39.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.39.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.39.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.39.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.39.0.tar.gz.

File metadata

  • Download URL: openbricks-1.39.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.39.0.tar.gz
Algorithm Hash digest
SHA256 781b25d1d346877d041fa08f695878926e857e4ab947637d65f656ac11db4fe9
MD5 b3989e2b05614f5ecfe2a0a8d5475f18
BLAKE2b-256 0b3ed101bcf04549f316ef97bb216654e6c1a434e121f6711e82ff20ccdf6e10

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.39.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fb39f1e75654be07f479ae0d825e6cf7e9afe39b0bf7af65ea82159930a2ceda
MD5 6e76f795afc428c4092bff101c0b4537
BLAKE2b-256 c6f647a4d39058d1b09d8dc5091ab38d3b146a48abb778a2cec19b55d96e57e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.39.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.39.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.39.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7c9b7dafffcb36d922d88a5d620aa525aff37b6977549ae1c5652eed90174228
MD5 28d07aab86849e4bdb9a74750896fb90
BLAKE2b-256 33fcf30c2e2f30cba836e3dddca8e1c3d144134514611ada4eb69428dcb3e90f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.39.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5decd9f634307dd1175fa4005b7b69a03eacb6fba10f0de642c44534b9d75d31
MD5 951ad89f5db7362dd92d64dce2dbf483
BLAKE2b-256 7067cac8eeaf18ae97527bc85b28bb8a2de013c6062dc09718ab5368cea4fb3a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.39.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 47d076b22b3644e19c183054a9a65a52e19f42bec2c3a8abed480a89aed5c430
MD5 1881b18fe17f047fc34594300f109ce6
BLAKE2b-256 a7e33e6c9ce6dbdd4678db4a22004430072c171a8e72cee262204804bca7701b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.39.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.39.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.39.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5bea4137871d21ba9cd6e68d6508d81a301b99245104c52bf1f730aae984d225
MD5 1b09f45e9859d8e3c526a156ce5975f8
BLAKE2b-256 3186ab489790c1f495d9e1c68be62a4cc68eabfa0815964d086b1985716df3b0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.39.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 738377f4be2f378bc2b7017105d74e5acfd4f972e7a8e40aac6bc6ac478ba612
MD5 672c3b8d53595f787d78852b6a929fb9
BLAKE2b-256 a7a2c5f478556e3700d53e99f0955c98ebd65cba6a374cc8d253ff8cb8ef98e3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.39.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b7c87e9542b23045a05900d22e967670279214a687674ea4e02c2a1e0ca061fc
MD5 94566bb26be120e902bcaac37f4a02a3
BLAKE2b-256 79df2101db33bdde97cab5c938e77c5554b5dd66def68a6600b7765843c7c48c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.39.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.39.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.39.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8c5e4388426f1d7e4bde62f9fdfd9c9b8383f55223a59a94fdbe43fe233fca0c
MD5 f811a98e9b0c4abc95dbc54d7cf6f279
BLAKE2b-256 b44704e0528067345f16fb56e6164f0c242e393be9a582c3c43858aac9f42177

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.39.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8d3b395d263c2d145e75a5cd4651156c3f441827027f5a31005dd693f85c0ded
MD5 de708c7d89854a8af825c4685deb32f2
BLAKE2b-256 8692853d9637053e701d29a493f9e21be43fb5d7d13510ab12455892ae70d44c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.39.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2afbff8c4844e9e73d026f1509a73a1d49b833621d59274bfa3fa9e1c3f8f18c
MD5 6de12bdc1a5b4f36d0aaece866fe089b
BLAKE2b-256 163390cdcdb3fe1dffb7853d00c7aa3c7a84d8330d67ab9a76efbac3970bf59c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.39.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.39.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.39.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e8f19802e3fac6ae2fecc8de958511d9fab7baa0a8ed17d428eaafa9d93a2bde
MD5 bb6d5ba219a757d6ceb06d27f0883b96
BLAKE2b-256 21493f76d4b3043957a3219e84bb3f401d338ddc28889297902e66b795c92c41

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.39.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2b7334a7eaac6aa0d285944d1e4867d85cd7bfedf939ee093aac0c96b5fabfd8
MD5 e1375dab2275cdc94105deb6185294d7
BLAKE2b-256 9d6bfaedc2055486efb823f46bd24b05a8d1347e3439695f0d7db58f24e435b0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.39.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.39.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a1a907aaa79e4573703a87ea6e1932ad6897b9e963ff26c921620c6c617f423f
MD5 dcf7ef661b3406b67f03110c4137bf8d
BLAKE2b-256 95619a9224201a065dd30716a72f1138243847245e6b77e55bb7581b75b37690

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.39.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.39.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.39.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e0f2e628e463ed7ac698f179ff4e615cfaeca4ccd67a573b99a91a334133c732
MD5 321aea47958493bc4eb379b39ef82434
BLAKE2b-256 00b3306e4e6cd2c07d9defd0b98f9401bd6da34b5ef58c92e1905e2c6b10d019

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.39.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d2d813b9d3447f817a505ef584c39e529d8ccf52d85be55fe06aaf6d55f9c314
MD5 9a7abc440f98afd709a46855027fb15a
BLAKE2b-256 e7c71ff3a9bdb19f765089da607a0553a6cb297ec5db2b891de90e950d67adb2

See more details on using hashes here.

Provenance

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