Skip to main content

openbricks — host-side CLI + MuJoCo-backed simulator for the openbricks MicroPython firmware. Flash, list, run, upload, log; ``openbricks sim`` for the physics simulator.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openbricks-0.14.0.tar.gz (17.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-0.14.0-cp313-cp313-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.14.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.14.0-cp313-cp313-macosx_10_13_universal2.whl (17.3 MB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

openbricks-0.14.0-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.14.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.14.0-cp312-cp312-macosx_10_13_universal2.whl (17.3 MB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

openbricks-0.14.0-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.14.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.14.0-cp311-cp311-macosx_10_9_universal2.whl (17.3 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

openbricks-0.14.0-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.14.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.14.0-cp310-cp310-macosx_10_9_universal2.whl (17.3 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

openbricks-0.14.0-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.14.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.14.0-cp39-cp39-macosx_10_9_universal2.whl (17.3 MB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file openbricks-0.14.0.tar.gz.

File metadata

  • Download URL: openbricks-0.14.0.tar.gz
  • Upload date:
  • Size: 17.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.14.0.tar.gz
Algorithm Hash digest
SHA256 19ff154a793b5b2a3b634b9f5000c889a6fd49fbbb527133554c55d531055f83
MD5 56e54e18ffa03a687e9c35a5f8d2f017
BLAKE2b-256 d9b12770310d7ab79082db201d5d12828586bbe8a3a59fd99be279e3f1b53a57

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.14.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.14.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 96cdc4028b87310330a8568a8b81cd1eb9305f46995817f68a67a836da9ce233
MD5 595d6a836e9be90de3093f6cea075f2d
BLAKE2b-256 2ad7985c1ab2d9d8cfd8472e5c1d8af5bdf3f278059986eb1f7b3a82b09d5a98

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.14.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-0.14.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.14.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f26cbca9aa18597d0a879a5332e9a5395a41b8eee6fc9a51ec6d655bc7f4975d
MD5 e18be7aa6d79e1c81933fc02ab382791
BLAKE2b-256 50c0e399829f40a8bc43baff8d67f3a8ab58efc735a32e6daafe0d122aa39074

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.14.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e4ff09384263dc163727150566f57ff63ece4988c2999f8d99c94b4650957b69
MD5 c78c1b2aa2028920b14a4684cfe1fd3c
BLAKE2b-256 46b2e3be73ef5d22fbd8eb8f7ce49eee7b31554ee872cb258ff6e1ca8ecd3fd0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.14.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.14.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 34729ecf4eb86c6313f3e0aa0345b644cc7aadad923d7dd2c6e12f554dc443d3
MD5 17f4aeacd40800e1934ed26cefe8a3c9
BLAKE2b-256 048e41d0a69968d849d9f567054c0b1291ab92e76a17b97d7cdd95928a9ec477

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.14.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-0.14.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.14.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d6fc03568dbdb65f39527c3fff73ebeb45695ecf783f0ccfd4f1f769d40be214
MD5 c62b4037df704797deb26b10fe1bc796
BLAKE2b-256 a8160225d7d7fb7bbdc7b3829653aae1d99bdd3d1e7f175d83684a2362e3bd25

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.14.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 43ad303f1efb87a72b1b90b6c270232e713785835c66e6b18ae48f75159f1756
MD5 91b77a14160889a651977c6707ba3e96
BLAKE2b-256 f02c5db0b4330ae8b736e4a5e86697f004c4ba7e0e8e38dd07d3a927ae4858a4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.14.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.14.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6753eb04682aeb5d94ff34a86b5c15084d17cfe9181f6d7bedeb7010290a2e43
MD5 797dc8549c184f114f4d4fc5223366ac
BLAKE2b-256 e18c164234a3e2df38814c77c0d4bb4fd1b7ab4982daba5337bc8ba561d9e9ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.14.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-0.14.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.14.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9720cb72247e21158bc7100e5656a137f5a4a71ef95d78d18a7cba3c4701bbc2
MD5 44db147a698435bd73e0eeb63e508ff6
BLAKE2b-256 059c89fdd7856ae4b4bc8b6febbcdb2f7a1502ac7a5c249fc5504d519edbee28

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.14.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d73719fc47409c52ee0955021b7809179beab1f3f12876b5383ee2ffcc44bdf6
MD5 10cecace7fa2deb0f7d678686ec70c14
BLAKE2b-256 79139c0907b3ca0425b27f582b07be9f28699abd98d244e0338eb9077fb023b7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.14.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.14.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c784b054de575a24ae630bfadc54226f57cb48a603804cb73532a50668c9731d
MD5 2ace921eb0f1a632abbc794aed6d0be0
BLAKE2b-256 978396f11f5e70985fed5a7006d92386c9b3d2ab7889edf2f310c32cd7394985

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.14.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-0.14.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.14.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7d08675711a90fc5f53d7b76a2e1123c264c001f1ede93c159509fe282b31e99
MD5 e3c58e86eca478a64989f3660876b4d3
BLAKE2b-256 eda2dbd880de37298dc2d6adcd3a1aef6d5832e249eeebd89ca5ed8db1811183

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.14.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c38f38d563c96032518c06e5e3a38006f1bc1aab35dbec250127eae1ff66be5c
MD5 e1909098a949635299d85fefd534a764
BLAKE2b-256 d6a62003e2658c635080caa17cab187779db8d6861835d80a0766fd311891dd5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.14.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.14.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d76f115565fb870c54c98801b511fafd466a78d29f93faeb235fe2095653dff4
MD5 230ba7bc55c23e219198cde14162e2b3
BLAKE2b-256 8ea1d4041cd3ce8b9f34472f10b28b17c3fce5adb6f623e7669374c5041236d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.14.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-0.14.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for openbricks-0.14.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f4a7d6959c781b1cd44fa306d4f6b8a1994e0ec36c796dfc6c660a5abd6f074d
MD5 ecc01e41ef67ea8c0f924e58f8866496
BLAKE2b-256 c4801fe52f0455e0a3df69183f07315121ecd6b045bd5011e6b0cfa776d14e00

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.14.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d8202fe67e96a175ce7621de4e26df12a347957462833a1b17bb75b7749949b2
MD5 a1c81e9aea28a300a861f9e5c0d076c4
BLAKE2b-256 346adbc44ca1461e280389e71e3103e39308c639e18a2f6c593062ba6f87fd7f

See more details on using hashes here.

Provenance

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page