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

Uploaded CPython 3.13Windows x86-64

openbricks-1.33.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.33.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.33.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.33.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.33.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.33.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.33.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.33.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.33.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.33.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.33.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.33.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.33.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.33.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.33.0.tar.gz.

File metadata

  • Download URL: openbricks-1.33.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.33.0.tar.gz
Algorithm Hash digest
SHA256 435f43a042e1f9dfd13bed9387b96f4e3878206ca217d6ba208e70459ef8e311
MD5 5accbd4fb7c673d7483521d7d0d93b5c
BLAKE2b-256 7eb085131476adf6402b113873440e3120332ebae362ef6062f6f2c6d9bbdd74

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e926985858fc973037edec00375162ac8300198a5581e53c9d0b203f7b31f252
MD5 cd33701ad7de19c19fb047031e87fd01
BLAKE2b-256 543fdd612ee2266bbfd1f3a12faae8568bb74ba288b2062cc772ce3af2286c3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.33.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.33.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.33.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 43e4c6a6bae92760e341124a1decef8f12c895cce2b8fa73ca3a3eb7e1192e77
MD5 0a9a3958caef526e2a9eadf7ef4d10cc
BLAKE2b-256 3776dc3cf01a6d749a24702d4e783462f8e1f81747122c40ccbcac6035ea2beb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 643e43857f14e63d4a68968112b6e5346159286e7914c4e97c44414a086b9902
MD5 eda3a511a9bd40812a7d3af353d85829
BLAKE2b-256 e790d1bd5c97e6fa1e3cbad0bf9c2e20b84db61acd3c21fc151a7f7b2bc7b1a8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fe3236e1804eb7f6e6dad0e29f1a945a1ff6586a23e937b5fe5e4d00ffb007fd
MD5 1c38557829efd8fdddd0235e6f2e447f
BLAKE2b-256 3291b3104670b0b6e794aa76b02ca2913a294a9dd8712bc6e6d99744b48b8036

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.33.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.33.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.33.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a602ccb4feaf010e2549eaa5bd507fe964b8b6ac24479d4138e516dfa1f0ca13
MD5 b747f6c30c56f570fff8f69cd06ef465
BLAKE2b-256 e26f139ee42153bbbb778e2b69b7b1b35c67b844704792fddb0db3d3713f500c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3cc4fa89253779a2f3f2a1ce84d2ce8b1c210ff4529e83d1ac60a0e4902b5342
MD5 b60744774ac4f71095a272773c5d91e7
BLAKE2b-256 904d35454d8906437c843df5c0d8a979ef7dcecacda86a459326d598d05c1e6a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9b82a0d386d4eac9339b451b880621a7755a9ce2b6dcdebc920294701643dfa6
MD5 3cc2e4a2d76610f0074e7a9e0a8df23d
BLAKE2b-256 0e9a25dc9a4ac9148134df81d2d176f9d8b1ad3ab48af10f7badfae018068302

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.33.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.33.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.33.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 90eaa3d425a6554ba95dee1418215d3fa78dd2f921bcd45916653c47f9b0ebf4
MD5 daf3384758eb35c0e3df8b1b76725b2c
BLAKE2b-256 3e1d48a88dc42de4d875a4417c0a9464b141e67ada472b8b0907e090cab3fbe1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 40b34d9a939869f36e0330a5dff579f81409b01548244bdf8708c3c312a6fdbb
MD5 0bebcdcf014ffe144d0825d166332a2b
BLAKE2b-256 731397b7222cc71cfb418512792ecd537b492035f423a2ec74e04e58eba48fb5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d72e2acde70d4f333f089435ffffaa938f7ac5ef2847b5bb586e44c3c087226e
MD5 48131e209fcd4a9b34c5d9b56ccf7f58
BLAKE2b-256 d129f18e0417e4eef8191927b2cd9f50059acbb339b4c5923be90090e13cdf57

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.33.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.33.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.33.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 02360d4d571af6e1b17b1b580b1cc9e3184b15832a09f9e8aa480f12cf126c2c
MD5 e43c46c9e3e567e98a41e5ed42e8e36b
BLAKE2b-256 3fdb0eddd33be193162dc6e1f80e72afec6875b18146b5206291b5438e606c54

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ed6c1704b5d9c44ad5fc3d3756cef8209a2171e2a2fc874799f0819b8423d69d
MD5 d2a4efcf52a97a73bcb49ec47ce23449
BLAKE2b-256 37bb7f97382a8ba10a74563013ee1a0fc44581fdeabbce97e2bb193aceeab58f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.33.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.33.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 61eec9652b9769f25d2cb7580c5d5fb59dbe2b445f92a726a26504724f71f692
MD5 8dbe00209c6a79a570e3b59d86228f6e
BLAKE2b-256 e3b526ae48ab805b579958ae2caa30d640acf4f545739e91ef101dc27ca7b021

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.33.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.33.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.33.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 64bfdf4bb13e5cefbd0565593567e90ca60e1db68ee1c4b4f1099d745fec6a41
MD5 834ac4221bb1ee0a86cb6c97c4c07b3e
BLAKE2b-256 4b2b40337d098e62e14db9935fa4e00a335612e10bd48a4a77acadc3f9bdfea9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.33.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2fa2e03d0f42e7bc0a6a2642620eaf3fc966726e0af4c57d525e53a3523e80f1
MD5 d9a85b6cb4a516b4349732fa3eb6a248
BLAKE2b-256 861eb24432f14b40e7338ceabf80c8456e34d24a234e0bba57aac893e00b96ef

See more details on using hashes here.

Provenance

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