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.91.1.tar.gz (3.8 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.91.1-cp313-cp313-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.91.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.91.1-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.91.1-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.91.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.91.1-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.91.1-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.91.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.91.1-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.91.1-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.91.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.91.1-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.91.1-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.91.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.91.1-cp39-cp39-macosx_10_9_universal2.whl (3.6 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-1.91.1.tar.gz
Algorithm Hash digest
SHA256 f42e268b4c9fce107c093fa1b4c0485597cb97027ef5d049c418df73502410a3
MD5 968cb062f887f08e188bd1fd4ccb22db
BLAKE2b-256 d97dd418cf941b1b08d2bf0f60e1f97582c3810487eb8a534ccb1a7d6d79850f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3f7128f0f577735e299489dd6454d0aedb80adc280987eb0a2b151259963ce05
MD5 1f1f595c74efbd2bfae4f3e69d5e6efa
BLAKE2b-256 41e57bee83f069028c93790bd222f4892707717f6d0af2012bada9d13b05a6b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 45fdea8d78a4db2871685ad89ba75f6c4e439cd0909b32c492e105159e7f2473
MD5 eea66ab7127374899a55c645f93d09e0
BLAKE2b-256 31c1db689aa4bdb1220f169a1224174a6b3358a2b2d847debe8e56a0ff2b65db

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 43a3d0407b2128673b65d88d283ea47f1ee7f3e208bfb359b8cb3c477152dd97
MD5 7318576a740f5e1c0bc4c1425aa08a8c
BLAKE2b-256 a8ddbf09399f76cf5977dd9f22f7e4e0c14e4e12885934188dbec16d605a2720

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a7a6f2687f951f59086171ffe323d356695cb6d2409b51c5b6a6a76214bce5bb
MD5 ff873376aa6969a4b2251013e8bd2f9d
BLAKE2b-256 55d85de888eaf8469e426125b4181ecd6d642d3b85a5ecc8805dc49d894570f5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d9c3a6532a1fa3b2db116412ce56fc3b2e657ef86c08ef968af107c892a249ac
MD5 bc0b44b8166363779daced337ef0bfa8
BLAKE2b-256 9b9e31f0324ee8a8c6fe45d21fb2b67a95d639d53b712950d3aaaea0eda81b5f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 28d920e9a4c4a0b589f65a18dd45b22011c58f0584e8dc84e8315e4427cf1910
MD5 f5bdc7a96dda66d044c4237af93cc5af
BLAKE2b-256 c9a31905b4260df7b46a981638efd02041afd7b62ed996054a3d719a06079445

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dbc59089e12df1fa4564caf55a7efcd34129010348e37c1774569998d029951d
MD5 e7fcb165e456364e93e3765a072ed036
BLAKE2b-256 ad91c785d1b790436a09214cb3538118b57fe59c60a6e6bf713a576b7d09d325

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 04b3cca82842507df04013f1e71622df003c2ea928fc55a8a705d603e2323c63
MD5 d7d6e5eecfcf00a43709f4ea7d73d36c
BLAKE2b-256 ec7ce6497963db987aad1065ee14120455973a701c1cd75cf89c893679cc8b7e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3fe4220cf3110c22d147b35ae1f4d71e30092de9c889eb35057f5e47b099d473
MD5 38dee5f6df293ed67c616243cea7fade
BLAKE2b-256 76310e36b43d464e6ef1f226f082ac3372584793d0ccd5b301d8bb2c4f962994

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d2ddebb74d405fafeb3a7a64da02fc327b26ba075ec281a4dc7b86445af301f7
MD5 efd2eeded74bda909ec2b642c60e6c2c
BLAKE2b-256 3b8e43683d91a9b07e3cb36c1d27538c5c3c8e8c358d6e902cacf70860aa843a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 72c6564002296766224f6e004e5c7fb16b672e3aef627cc16a428301ea5249d2
MD5 20174d21cb030e3ed81882270ab7225d
BLAKE2b-256 aee3a11eca7ddebbcc79a43769bb3e3c6b35aec72d4523a2ceed0a3c87352d04

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a63b5799e9e1e4b44416cf01a4bc24e2ed950fbc473bdb94d51752cdfdc29f3d
MD5 aa462d72abd58e5998aaef473200d2af
BLAKE2b-256 7f161b9b198b9d054f15fb735edefa47eaaf39c3efd2e2e624b4c3b83bdc4cde

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.91.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.6 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.91.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f2c71c9c9ac689a4d984cfb47c699842aed839014217966b6d5b74e6bf4ed16e
MD5 09247af68c8727407ccca7c8767dc04c
BLAKE2b-256 80db0b91206d0dec3087574b1eee167b4758dea33da07005fcd5f8fd84829cfe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 762224d70cca05effe93ad53e2045cfcd7e133c5b399cc771bc953f29c52caeb
MD5 f36afb0b93c94d56f82badb811a3cd36
BLAKE2b-256 dfe1268c6fe06b9ce53e4e1ee31d6c4184b0cec2e37b3eb9076264f46b966887

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.91.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 42d7838702b3724cf09cfb5ec90982e0e5108054c839a70733ec08d54e0c7204
MD5 ce187bba9ce925505ee43bbad8a4d2f9
BLAKE2b-256 503a036290a7a6d9b073b8ec722ccf4db14398ff1bbcdacfbaedb3d5b13bf93e

See more details on using hashes here.

Provenance

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