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

Uploaded CPython 3.13Windows x86-64

openbricks-1.40.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.40.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.40.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.40.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.40.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.40.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.40.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.40.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.40.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.40.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.40.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.40.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.40.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.40.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.40.0.tar.gz.

File metadata

  • Download URL: openbricks-1.40.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.40.0.tar.gz
Algorithm Hash digest
SHA256 6ef298f0e8df6f3155e04454cf627a50df465082d5a5dd537c4435f39505412b
MD5 7887f0d60eaa9f4aea18bfc19877225a
BLAKE2b-256 8d90b1a83c6e7692ebf919b8dc80a2581fc476cdb37e0381d692abbd32e254f1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ebaa38ca59df77236460476bf8fecfdf362b7712f201e4bf459ab62d8a956418
MD5 f3b2ae2bf1cc58c1bb4ff372614c06cf
BLAKE2b-256 64e06ef2af385c3718c925af8e90f2d778327e7861fe87ae67bdc1b1b1d4b393

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.40.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.40.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.40.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3a35e5f7d0478827947ab18ff1259543531d1c071abcfd3999eeb3fc6ff7f15f
MD5 dae8b7615067fed887177b2034b50f5e
BLAKE2b-256 ef250d8681d361458e2c7911332c65e06d1ed9c7f7f560e7dd3e9f189df740e7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 104fe9eae2b2a95b22f1311558f94864c4dd2982903bd52ba750d3272dcd0bfb
MD5 b198c677f55ad97fe8db33e63012c0ff
BLAKE2b-256 fc084a9f85efd69a25ca5eeb57dfcc3c3a5f8c00d68328365235e3f0447550e8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 32172eca820818fa46231113140acdfba51aae0b87597a5487d85c60d8ff1605
MD5 7959e854d70fdbeffcb275a449729fba
BLAKE2b-256 8425ac7b356036be13e7c19bd7aff22cfc2d6502cba637a3b63b6c538cf3e7a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.40.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.40.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.40.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c8afa83bbb2e017b7e95cfdef446886cfc79b1008f2b2181a40a52eee375f8d3
MD5 1485127fb27093ce00b648c0fc428aa8
BLAKE2b-256 96ae7206d9db4a9dbabe6e525f7c577f6d06ac04aeeecb602d18484f79c6bc85

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 15c095f3696a40ba4f303fca805abbb0b13e9612c2ac4afebe08129ef33e714f
MD5 08ffc8cf0ea0d8ee1b3ba7032585ed6a
BLAKE2b-256 77b311425946c8feb2b9169a64323f311ff818a4e03612f8f923ca84b5c6fdd3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b31f574f7b9b2b983cf7e46316eb1356fb98e4ef2a21e0a713fab4f37e422335
MD5 d9c5f61439f167e46ac85ce0f6682a7e
BLAKE2b-256 6c034b5ef02dc7150bf7f0f4ff583739022b6206d59c3b3c483d11ef0e73d62a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.40.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.40.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.40.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 090d0c6acd0b5a42e65ad533f02154bc282e0719b2838b411dc3fd44b9945952
MD5 9923c36d8abaaf2f95bbe06b1c172c06
BLAKE2b-256 f52b4bb77a09350e202503dcf9f2e2b8572df70e38012fca3793cef52874b12c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3456aa58e9b124add3dd374fa6f01895724835a58352372a88233928c55b1084
MD5 bfa14f7aa6c9f5d493281960401322e1
BLAKE2b-256 68f1d515b351a5e4b68df38f2ece96d39ff1c8d03c37e8a22a294027ea3d75b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 adfd8acca7fd283de8b375e1901ccfc5c3f4e1bab157ef0e49e5f75977565aff
MD5 f7fef304a8905481ee8f25246b482a7c
BLAKE2b-256 c2af5ba965ea93f283811e2881cfb8a434c1ee166febca5f44a4fb11e00ab1ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.40.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.40.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.40.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8294a1748babad12a5283e6f39a36dc522921d5c6ac205add4d82fbc97ad0489
MD5 65bb19ec79787fb78c3c2b7a03dd044e
BLAKE2b-256 013e7b82434de39997c37d4c740de9d6843709325d2f7bbaea8007629ca8886a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 34e7d26f3bf561027ed39f564eacea6dfd2d27563e771849e806d70a21c16b4c
MD5 0641bbf5814bd8f5809b7301695a1bc8
BLAKE2b-256 e919f17d19ef51cb9dbd25f88547772286dfa149d09ae2e3e7b4f767f64ab8f3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.40.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.40.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ef5fc7807c5c38bf9c0b2981d3a6b4155e851e93bea91a768a0dd967e5dd5225
MD5 4a883af274dbcaf1d7e52725de8e6c83
BLAKE2b-256 b8bde8221b5a38caa591239a3560690d1dcd3f08b21a8b5715672d124f492a79

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.40.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.40.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.40.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 79fbcc14f379faecb489e317f524ca296613d30764e085bd697f808cf99b2dc6
MD5 b4764aeb5ccf3c9ca0351476c17c68e6
BLAKE2b-256 9f26b7c8f965f613ef76f4d6d1052a374af4bf57bc67a88525b3ef86a64a09f0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8ab4032ae9ccccd66be61fe81dfeba29788a3d25003f803bc6ca2d9b7f681adb
MD5 9848b574964975bcd591317483091bc6
BLAKE2b-256 be072a7769388595df1037cbc2dc00e2d049d3692c46f0eb0aeaa1947ce1e7f3

See more details on using hashes here.

Provenance

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