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

Uploaded CPython 3.13Windows x86-64

openbricks-1.32.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.32.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.32.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.32.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.32.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.32.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.32.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.32.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.32.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.32.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.32.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.32.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.32.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.32.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.32.0.tar.gz.

File metadata

  • Download URL: openbricks-1.32.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.32.0.tar.gz
Algorithm Hash digest
SHA256 52b523d6d82f6a710f5c4766f86c06e2a7a5121305bb79ffab2319ebaf0fe453
MD5 37da7caae8e4e97b953b6baf50201029
BLAKE2b-256 aa07e7a70e3513b71d05a2d8beae7bb201d9edcf24e5f326e4fd99979837f124

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 05c8f5462fad82179bba6dae41db420eca38cc0ee02f535e13a3d8c14c0fab5f
MD5 ade546695c475c351b738ee7d296fcbe
BLAKE2b-256 bb200a8484b3008406eb027b5a831901de4793873d7d09e0f53b040183211256

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.32.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.32.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.32.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ff1ae11a5be485284a9c0bdbbcf154ee1847f45c22e17befa345b7810064ac57
MD5 91d3a714e3cf3a15ceda5917ef40a79d
BLAKE2b-256 86e008de269007083f130675100a6a9ab73a2f588535e6de31b158c849b5388f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f4ab7e35fa5c5e0499136d28897176a0df76a3c80704a16be44df39ca2cbea64
MD5 51c0bf59be59c98548d3f13c7e58f335
BLAKE2b-256 af337f4b960cb628e76a2bc277fe2f13899f7d2feea4d799ff337f96e48905c4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e53d965ce34c785e889b3f30cd396ad19f53bda4a04b8bb6afc132ea64cc5556
MD5 020b3933a3d8135461b5bf4b25e751d4
BLAKE2b-256 a23c50d7c546362a43c4362ebaad4ba03dd35ee4a046d0d954fbfc5a1f260b52

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.32.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.32.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.32.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 aeddc37b00047b112a291c41e3f75eede712ea61d78485ea05f51088fac6e2c4
MD5 5f291b665db9e68e479a057a79d36bfd
BLAKE2b-256 5380c729d8080439bff4297965267009e4c383010d3cd2af5ae6f61a44853f1a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 88c6d24fc5b9c43364d933a2c9698aeb5fe757c9c39f87cece461ef80cff8d7a
MD5 ef13ba6309d25d52c4a1b2f170e6923e
BLAKE2b-256 12561e1e04f459d7268bad6dc777d1c52412c6cebbc2749580b9480e2357c125

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e88fb22a7d5c86adae4d3b18e2b8fc670da42cfe5ad4fb5b7845a8acef412b28
MD5 45229150545cd919e94ab641d1f4965b
BLAKE2b-256 9d408fe186627512b6430ec4adb0361b787ba85ed10b0dff2f89d77447d43a55

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.32.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.32.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.32.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a9d4a8cbb04cfd4750e44cea2107dc212b3b9cb6411d85c909c135c6d742c194
MD5 45274411d5d21220a1302ca9fc29a7e9
BLAKE2b-256 66f8a10657b9baf9d2502bc9b63f558656681998c6894142c27c348f551f0528

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0a0a640a323fbb046b4df4a6ab8969dda039819147c027b807551ec1762b678f
MD5 f9756ad7b7e5b62c011b11f2254f7132
BLAKE2b-256 13498f0bfd5f1787b896a0d6fde498c6d2fb008e0ffe42bf9040dab96a5aed18

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 846b4599660a7952adfbf9ca65673e136b7d5ea60fd780e280ff579df6c80726
MD5 b20f4c613e1922706af70ba9e5083b5c
BLAKE2b-256 a645199a84ddc7e12b53778b31758d61f5d61219f8bd774a678606ddc3dbaf58

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.32.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.32.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.32.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d5562a003dc813193f2b016df7022174cb121922ccf3635a8aa99b6f67f6d00f
MD5 1b364d7b6694ddbf0b2076d67bc1ec06
BLAKE2b-256 5c8e5715c91be18f6f2baa9fa0b90185eaa13fe579514ee7c4f0b028b703fd12

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2d5a4c9b091296bc8b97675851fff3344e5382a04263b9f627c4c9115f087588
MD5 aefa318ba21c21cbe2d875ad3dc7f93e
BLAKE2b-256 2613066f6ad188680e26bc46d1af131fe0230883f87617667fafc7c0435710a6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.32.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.32.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 808f46ea43b8a4f28170cb9d73d23ec671b677e98e0ac4e0fc99217831cfbb55
MD5 640a2789d59a2696e2d4e0e4ee6818b0
BLAKE2b-256 f5e48fd10ecc2944cedd42a8504dcbfb840880072fc90811307bd9fbaf534ea3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.32.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.32.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.32.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 75dc6e60e4e48fbd2860145d89dd55199fd38a1943c71334c1adcc76746ff589
MD5 c8017f9bd7f1c5eeb2c9decf2c8f3b54
BLAKE2b-256 4c68e22045f31bbd9800d4cc7b28f6cf373d0258dfb63874e58d68c59f8059a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.32.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c7dfd53fcd60b5d8ba9dc0fec845805f5453961c9a18cdc8bbe3d90d372071ea
MD5 5c33b956eb0c2746c9be0a16354f326d
BLAKE2b-256 b1983f66a2c51d1f6287ea41c9a3d80f2a0b7977127d1a8a4ce79d40723e4724

See more details on using hashes here.

Provenance

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