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

Uploaded CPython 3.13Windows x86-64

openbricks-1.31.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.31.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.31.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.31.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.31.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.31.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.31.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.31.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.31.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.31.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.31.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.31.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.31.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.31.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.31.0.tar.gz.

File metadata

  • Download URL: openbricks-1.31.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.31.0.tar.gz
Algorithm Hash digest
SHA256 ac015d0e0c48aae796f494ef2dc27fae33dcd637ba13377c1cebf3cecf088bbc
MD5 32def5a5b7e42f4c0d293dffdb76167b
BLAKE2b-256 2b86cbfe42bb4646dacdda484a9806b228b54df14bd02f4dca40ecf4bcf6be9e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.31.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f0f3c336d63b1b9d4a9dbaacd86d8a0931207a888eace6a00831e6e97fe1dee0
MD5 f9ef110290a962b84186225d0a2642d7
BLAKE2b-256 7f2147e1e873e872e854e0c54b2a6de85e739b684fcf49a901b4dbe1d30b8fac

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.31.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.31.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.31.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a616f5436b570d3522d74076388bcefa18e140beb8359ebb458846f33372849c
MD5 62883b8bf2c59d0e359a2a6e80d9ca0b
BLAKE2b-256 98c6ebe82ea7a5f6e85b02071dec051dce95451386fe6dba07edd2adea3a45ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.31.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b3b3781d5a08f859bcbdb6d823dcd8ef568113efe827c0381168d8b68df1d847
MD5 6171923bffb7e0a63415d6217747027c
BLAKE2b-256 40087bc8ca6e4f01c3f66fc4be8b07d2a3ebcc4fced2503e4b52ac083b2d0261

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.31.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cbf871864d9e2d90275720bca0c52cb8cab4148d28e8cd256e1cf535b25602d7
MD5 17626a30ee04a818bbbf3dd571a8d603
BLAKE2b-256 77d0f6d0a5bcffbd209ea8ff3abeeaab9dd597c3f28ce2abc0ac8cf43631943a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.31.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.31.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.31.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1cb4f5176f8e1321e351307e64aede04c11ab98e26abeedd8023ea05e6ba2443
MD5 d509dbbee2d7c4ad08a24363d9d9ca2e
BLAKE2b-256 f662ea0aa674b020873a72f0029049d063a26bd453543138e5a34ad2c4012d70

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.31.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8b6c7d81feb5858e0e4fe1ead045b3f81429f8eb7e0fd5c4360fd117c5bcec53
MD5 7efeabb73d7d7e223d2f0ff73c2d43b0
BLAKE2b-256 3917ecd351b49686b3a62cd39c247af77bebb7f8c108e59c580612806f6edcb3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.31.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a03e60bf69ba8d217a25d8d799d6c6ce4474401ab61d9d8d9c71ad12087369f7
MD5 2cd4418c41637c8a3d21e6ea0f6df0b5
BLAKE2b-256 fa31c88a079ed58118f94f1860ef058a8be5bd5e3b540600bafd9d34f0c14f29

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.31.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.31.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.31.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a943226d901085e04c882b8e1ffdba24b0826e31e0292e1a3c138897f5e28012
MD5 446126b45b7331a1d176fea39d471d81
BLAKE2b-256 7255b684b68b7cec009b6af42619e183dfdafd169e115bfc8d7f46e733e887d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.31.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b4d312466dc593eef1ec5888827f0811fdcff0e76f3eebcb490c1b5f3f28d79e
MD5 70bf2489fd160fb4a340f50c4aef7c44
BLAKE2b-256 a54eed7c6d118cd7840519ef2b78a8b5c09544c4617a1b28b42fe5b21f2fb970

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.31.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9a6b65fb19cb13ff08c89fc6d57d5621097b5fd3b88af4073398bb1e7ba0176e
MD5 ec5aef93e90b768b02669d29a13d4427
BLAKE2b-256 3384433def376c167a06f7493ec490d1fad6053b2a10a9aec95df6a97d55248d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.31.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.31.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.31.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 48554814df6b8d433dcd774613fe7eb679171dffd44d769832bff881d45947a4
MD5 4323bafd667452106cd4d50997d37a23
BLAKE2b-256 62a924dc9d65b9dafe7de64fe33afdb75ef3fb65f797a1d494bce1c3002a2231

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.31.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ae93a706df3864f3eca735df30ef7cf4a1a3653a9813728fa5bb04db0b936032
MD5 ccef55e42f140f1177deea7061880774
BLAKE2b-256 4137da439f17644281e2b642e77d717efdfcd54d50e49ddbe3cbfda0b443ea27

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.31.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.31.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8798825202db3a39772343e1769914cd82dfa9a44d5947e61260a5d47504cc2f
MD5 669fb642fc89f66dd09fed3ac8188383
BLAKE2b-256 92481e345852cec68fedda23a867c3346b485489f968c01dd5669671daa12489

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.31.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.31.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.31.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4614c2b757a24c2ce1b2e01c8ee49735186481b23b6e821a0ad0d87d823ee01a
MD5 49a2a3f377bacc14b2fd9794e006deea
BLAKE2b-256 acbf696e07f91981ae75fc8a780c1fbb02429c681e8a2e1e4fa3598ca5c2907e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.31.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7ef5120a0a693bbe9a19b1ac966b45f5dafdca98657ea14fc91f25aa6aaa20c4
MD5 78bc426bfc8822000f3625a16cc6f500
BLAKE2b-256 033dec806333edc492b04165a0376d2d980746334de81331fc43efc3b976516c

See more details on using hashes here.

Provenance

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