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.56.0.tar.gz (3.4 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.56.0-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.56.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.56.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.56.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.56.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.56.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.56.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.56.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.56.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.56.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.56.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.56.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.56.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.56.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

openbricks-1.56.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.56.0.tar.gz.

File metadata

  • Download URL: openbricks-1.56.0.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.56.0.tar.gz
Algorithm Hash digest
SHA256 7d8e6a74fddfbf6657b4e81ab39b27f327edb576641bae11956a1d08e9eb573d
MD5 949f7f73af35fc757fc5b3d9b68dc5fc
BLAKE2b-256 0e175ab03ed41b06d1942a0d91f25e5f032946d91e85b5734b05a076138ebdbb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d180697dee1259d1a0c7c1c6f9cf9c559bcf91afebdda4ee4e59a41d112d768b
MD5 fa388316931f828514a4c7f8415b19a7
BLAKE2b-256 9c894f23449ca9b22fcfa1d622e878f24c8d6737601ba3805d533190fcb6867b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.56.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.56.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.56.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5a1cd75d2be003ac143a9e942012f2c35bfc9b51d391a856c311a5183529c361
MD5 a935a8d5270070cac97a16afc2575a3c
BLAKE2b-256 f30c5da78a2844751ca42371234ded7f106829d99d7865e4c8b8912839477743

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f4d95f8f87f1c4787307cec3b59d895b272a799f783c9e63ce4e296d4c91dcdc
MD5 2b3039f56c1448b3ffc89ab4d4a8c68a
BLAKE2b-256 1066de0eb7dd338df0d05143c34a144a1ed828aff892557b9e81ee55d3bfb760

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1f6704c7667d652984c0520e24c12d908c49e47370bd96dfe393f5ebc3045fe5
MD5 9e731ef03a6a4acf519d2192aafd94f5
BLAKE2b-256 965dffb57e67e543625b17b06a19e24d7f8b743611626f83bf4c4333079622bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.56.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.56.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.56.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 da47d1bde94cd0d9f99699d20c623940f3c4c54241ac8d8007d8e379092ee3d8
MD5 b7c8968e06bca68fe11b4d4b49081dab
BLAKE2b-256 ae697d638e78ec1a6f0b23dbed8fe45d49350054dfe4fdaf69da74b4cabfbc39

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3190061c326b5f6ab31e47fbbbb5301c47dbdc4d6f305b04ef118d5dd09fabae
MD5 1cc26842507b7bc7f1bca0f9a6337860
BLAKE2b-256 17a2fc42113517cab9b461e44a614a4507db508d90f6a8800a2c85f289624706

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c9545e83560cbdfc5170de5341d80caca9b44139309f0f0b37b1a615411d7661
MD5 f6ee77ffee9a2ac42421c5afacff9ae3
BLAKE2b-256 329c8bc8fb1d2c4e38cfe0548ad54fe4b979d252bf09b3289e144c53de711a8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.56.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.56.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.56.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 234025062f19d54597e17b75f3c9c45e132d313a27a62c411fad0811133fddd4
MD5 2f3f3d8899a9d490f110e80bf5a3380f
BLAKE2b-256 1f2e157e792431c3d337474babeb09e641a1d8175ad19f1f3b4bf2a9076d8842

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f82b4e130df89fcf131bb848401affe761ad5584f91e42c90e3adc6799b9591e
MD5 9be557d8866b17219d36e7403a2321f2
BLAKE2b-256 21826cee71bdeef2e9957f89394504cf7012a952c722c8636ef5ec6baf2e0564

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 65fa01a575510d8b1bd60296467737ee10190ec93b86663ac3498c84fd840d0f
MD5 968345ec45645fed39a4b4048a7abe8c
BLAKE2b-256 24df5a6b58db80ad88670ff5ad3f36349f5615e1cdd4c7c8da03acd68a188f2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.56.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.56.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.56.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4c420d8afed936480031eb64bcf29ab531366a76a59cf4d5c2c80a588be33152
MD5 deca91f51d0810051d7e0c62401115a1
BLAKE2b-256 de29a77bf309ab1e696c1b36f24e9eb0412c216b159ead183bb0eba875b34f48

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a4e434e32b52577d22d2cfd5a0fde117af5d8a70de94066c9948980b2552cd0a
MD5 939feafa03d59458dbee9944b9296fbb
BLAKE2b-256 b92f56bd6199aa3275cc3ef73fc54fa2d7ca993b2b7d05b800a7d30010b6466d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.56.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.56.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 664376c5b7e2e9e49b9de2cc8af8afcd79eeda825b4d9988fdb654df697047a6
MD5 1481e5e15c85cfbe62f5235e2392a68b
BLAKE2b-256 fe4b39482ac7910db88fbdfb09df44d3b28f1be5a355e25d9f360b97f01be5b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.56.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.56.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.56.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 28ba31b184e613851218a6d6df5d7b39e5d3f6020f69056a0fc80e97fae16c08
MD5 789c8649297df829d0abad23085e7702
BLAKE2b-256 213598b53ade9e4752c5fcc493c934bb132759a5bbb67e031f43bd84a75f1906

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.56.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a0bb153fd385b521872619080c7f0a462e15cc118f806ddaf6fba5baa77daf4b
MD5 21098a3d312cc10a2e3d63c301102a76
BLAKE2b-256 754d3e5b59c39d591c5ca9039dbe44fe7a1cdfbec3962bb9b6793dfb536bd892

See more details on using hashes here.

Provenance

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