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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.74.0-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.74.0-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.74.0.tar.gz.

File metadata

  • Download URL: openbricks-1.74.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-1.74.0.tar.gz
Algorithm Hash digest
SHA256 2012caea328932a781b7bfb811c85ed41abe4b7720c7187ec6e5dd584fc3c6bd
MD5 16062f3635a5d8b5c89b9488e6c7d788
BLAKE2b-256 b31c986e68e02cc26b3f1ff9fb7d5d4c9ed748512e1b3ffcd5f39b8a35db8806

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.74.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 785b97bc4d4d125576d89cee2fe5f0439dead6363a8c88f378a41251cd927c4c
MD5 2b7debefc02bf93cdb81f16a4c1bae09
BLAKE2b-256 1735597ec49c859c3e65d2b38e99ac5318cd636cab846901d988f1f653a30cdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.74.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.74.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.74.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ac4690149c09ad71782317b85a992a2da63becef2d2014a14e8f5be11e0b9086
MD5 c963dc44a4601cf28422bc8e6eea5286
BLAKE2b-256 9b8586afd4ccb57126e36db8365e00e600652fb51f6d7485503ee03c2861f718

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.74.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b2e9347462f7b7bb09217a534d95a241ad7bc26abb8a533b6e32f1ffbf00ed0e
MD5 c0ddba6e927ede045c738d2e540f46ba
BLAKE2b-256 d87511aee65180b54bcd0d52b79c43002dc3bf13e614f52846a4b5b70d39d5fc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.74.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1da8efd5f27917945e9ccd716650e4dd7b9c85ecd79137ed1b8eb73f1687b98a
MD5 a0ac2be667a5f6d395a335e7331629c5
BLAKE2b-256 a530c2f65c675987a9735c1171080cd9909abaacd574bbd58a058b44e11a4f9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.74.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.74.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.74.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6f409e20c70593f7a3d6a82cd1c36d31bd5cf702e976d96a1b62a992d7c88676
MD5 c2194c389c9d2ab2804af6a95fc25506
BLAKE2b-256 524bc6ba845bc79fefffcd57fd0f33f14142fbebdc955f2d99aca28707ea992f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.74.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5029469a3929cc0a77348861b7fb3d3ed298b218cd9982b6ddcd1cee4881cbed
MD5 5de979d4b7257ce0a58007c32c9bb870
BLAKE2b-256 f0c5eb3736d033dad5882d87a0aea281ef065ee1ee295e970532fa40cbd90ead

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.74.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c90b4ade00c0d8346240f0ab789a128406f318774e00fe892bb4e0859d6795f7
MD5 b510b62bf3cfd1eaf8a6cbdc98eb32bf
BLAKE2b-256 e9b9d5076d3b22eb738a4d2b3f28b974dcc54cc6cae6913d68e5a628dbb3bccd

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.74.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.74.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.74.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f6182811cb27fc91319688d0d8e959470ea63f346700a5ae8fad472bf58815a6
MD5 fdfcc6c5211819f96609f06a4cff1f5b
BLAKE2b-256 2e93d1f402b99c8677def1e7a019849eb75cf3228fb499bcdd364ec55be93716

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.74.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f8e02bd73135df07bc0c3911284ba427673b87919976196036d3c8923b6bf8c5
MD5 956350d2df865e215d6657c743240bcb
BLAKE2b-256 88cfadf33db9ea5f00de68d84673e963059f40c98e84a73d708f04dda67579c1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.74.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7b9e912e71ff5b7d27d8e62b9d831575e70fd5cb4d8925f362737a0878c1f6b7
MD5 8bc15a04f9bb54b4c185fca8490305ee
BLAKE2b-256 2357bd8a47f75c5e6fc9064c38794c0934c806dd7fd8686dc9f53192604a1c84

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.74.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.74.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.74.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e28c91536f78d73a73c11b1f736125eba2e6130b3c8e485890b3dfba6e01272d
MD5 ec4b6bd755882dea26f6a6c28c65fafc
BLAKE2b-256 a3faf3a1e4bdb7b41218e5d023c352f8daacc2d80889df89b60258c3f24ae3bf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.74.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 25da474615968703d0091197ea57c7ecf763833da237020eb9f69619462dc685
MD5 80c039b806d8e29689a41246c7654d76
BLAKE2b-256 61129a6085e50ff61c3dc47212f5271968b46858654231e450c0a16b29d462d8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.74.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-1.74.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cac857ce29eb7e1f7c515b5057787879a76f8a8e0dc887879b73472f71d0205d
MD5 2e2ee820f37b6e69ed9e195d4b303452
BLAKE2b-256 717022ad6d0a1d068a857138f4fbe2d0a5f7eea4df2bbcb57381aafba5470f07

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.74.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.74.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.74.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e4619bbe37e4cbe90ef70b67e3d5b48cc14ec43572b79d31b54a96a0400622fa
MD5 bb64b7808070c72a3507564297a31192
BLAKE2b-256 4927a9a6ec541f0fbcd40fe346f50b81d02c6d8ea1882b5db75d56c413734e9b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.74.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 765495020b97480af846645e46941e5e9f80f3421b0159bb5909e43381387874
MD5 e464372da945c3b98f6e71388a7ffce9
BLAKE2b-256 7a548e561788b9e83a7bc7010d757330d5d08d7a0d73d8d2ae713bcc25fcdf6f

See more details on using hashes here.

Provenance

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