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

Uploaded CPython 3.13Windows x86-64

openbricks-1.23.2-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.23.2-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.23.2-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.23.2-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.23.2-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.23.2-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.23.2-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.23.2-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.23.2-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.23.2-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.23.2-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.23.2-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.23.2-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.23.2-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.23.2.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.23.2.tar.gz
Algorithm Hash digest
SHA256 caac99feaaf19d1047bee6e8c680960940e2395ee79637b96884058ad06e83c6
MD5 4409bb42ea6ab4690894c6699d5c2d0b
BLAKE2b-256 2dfcf09abacbb60684a458fd9476118de6916205042d5ef29ae9c45457098b4a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7eb74b79849a80e2b0fcf52be9e4d4aed4f28cdf0c15fd5ad71b25a8f9c7b6de
MD5 28d6a400b2b14bcb93d3f6aabe07d382
BLAKE2b-256 ac519e5f9a0c46b5bc93fcfed6e5d7c0a53757eb9a6a8182280eb6009df97c7e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d95cba9249d33f8044960caaf8b264db2531157346853a4004823143e5dece77
MD5 2a8c1deaec4dcbf9e902b30fe13669fb
BLAKE2b-256 72e00abb4045baa0a1ca2240ab3dbc92250eabde0cbff5735323ea3ca636212d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7db48aa66f15e7212684285b8a9b63aa10f6eb67b58d2a94365c968ac539cd4a
MD5 6c1110a53c34943823ea94ef3e33d6ea
BLAKE2b-256 26a7c7e581ad6e27865999cd2ffc8e9526764cbc373d2757ae1fccdd309b0fd1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 710681d56cd4faa0d8c145b210ecb607188526d629d677e6ac6cf8a6e5457cf7
MD5 b937c205a06187ddb58a9fe4d2b5b6af
BLAKE2b-256 ac9365607d89113abfd0e0d52d63fb848e638f2e6c3755230d732eebc1e18dbd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5d7b4aa6638f0e919e4347fe83abf8178034c26c2f5a82ae7ea96e7bdd4768a3
MD5 c757dbd79602b933a2942f89017c78e9
BLAKE2b-256 4459fdad52bc9594d7d0abe7df797771fb77e843ec1cc2fabb4c7237bbcf146f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 44001856376e4d0d98fbee7e1c5ed272608e00ba0c890d2bd104f4fd09c3fd02
MD5 97e338d4f2c48b97854974dd87cd6c44
BLAKE2b-256 59a43c57111ad3ae28758b4f1e708d9d1bb3f366f54ee294ad16761ba8be424f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 81293834b349e1f2a77be1aa4738dac8ecbd8aefcec4a7c947caed0ee75faf09
MD5 225b7a89cb1ee8716cf5538c9885550a
BLAKE2b-256 3d2ca98ced54cd63ae2f3c68395244aa354e5d77b49c22742353d74550ac9573

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 cfcc2fa1fe4c9ac068ca21836c9c38b2cbc887e50dd1326eed7a1fcfc5fc6baa
MD5 a89d59f80d010a98855b857f9fc25972
BLAKE2b-256 db8a931938c1e86392054b3cf093f9c1f25003218a1591916685d8fcb2509932

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e87dba1885b307442e64f91e18d873ddcbba5beb217d3efa84d3239e59d16b04
MD5 bc8bb6e551fe7d7e0ff79de88ae2c468
BLAKE2b-256 3cbea3a83d9570c20a9aeb9f4cdd8728d948e776c78e2bad0b849deb21efab61

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c9fcee6631bea5f09318ac904d48b943fecdf5443e7a5456572cfd9d4453b2dd
MD5 6676e6e02122c439f5ac14340f155921
BLAKE2b-256 64ab86fc3dc17b17e2510109feccd275fbbf4760303754f450d29a03fbd67fa1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ec38a48c8c1f03406cda40e86abd787f4c80e0e69e7b9b416ef5a7300edeb7d1
MD5 b4006f40ef9829f0fc7def73a08717f0
BLAKE2b-256 efc609e22bd9ae119efad5bc3f18a09ca1b0a61f100258f802eb6e3f7f520039

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ec0a18c3206377fb6ebfb21778bc915433022e848d477bacb80db96d7d26253f
MD5 6ee9d81b327691d685cd2a8d744b65c2
BLAKE2b-256 0b526517be4aa02dbc96b52ded6a51cad90c7b651b91f87bfa8bea13d5b8ec24

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.23.2-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/6.1.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.23.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 339ee4af37df62bfd5b95692feb9f7624172498748d918e82b2bc9f958700f4b
MD5 c6856e2c268206b92439d95bcfe5c19d
BLAKE2b-256 9da8bbe7b5949b8d05e0f244aff9046f68ad56c6fc9910d1ff40280dcbb1f9aa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 500f58c3be267c8f4338381cdbc4692231359251d828e9fc1c9a07a913d5f477
MD5 dca7601d06481092589d88455d2bb802
BLAKE2b-256 05a17104a9e315de02c3c4c425b142644c20baf6cc1f00b56966977448a73d6f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.23.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0a06f9b089449b1b76c2def86ae60b66d3ccc3d084384d8c7d66303d875bc696
MD5 98f56246270b56fa63e715c7c0b90fdd
BLAKE2b-256 e8fa938e0969d215c7db8e788be0e0e3875a0526b51eb8a11c734423a17cc7c3

See more details on using hashes here.

Provenance

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