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

Uploaded CPython 3.13Windows x86-64

openbricks-1.48.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.48.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.48.2-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.48.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.48.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.48.2-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.48.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.48.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.48.2-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.48.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.48.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.48.2-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.48.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.48.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.48.2.tar.gz.

File metadata

  • Download URL: openbricks-1.48.2.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.48.2.tar.gz
Algorithm Hash digest
SHA256 4de5f834a555110f4f95e460ececbe90664f2f28664e23e37233dbd4fb6513af
MD5 7c6e3902d88cc9ebbbf0af21e2022b23
BLAKE2b-256 a602fc339a1d40281ff13c9a02d652f25487bbe015e874007b87dd9982fdb0ca

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 19aacd749be308b6e1ae74ecb73585778e37a4d93ba45ee0763b38a798468ba2
MD5 0d708d7f9a5f395e9f100d103dd14ee1
BLAKE2b-256 fcd553e1333856df9c47519f09a66accdd5428a276cfc7ba2ff0adc950b597e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5c9a9cd2070c7f86319d1a81e7b1565bd29219040c806481f6c1b2647aa3273d
MD5 34ee667d2882522892079a28a1732054
BLAKE2b-256 d9cdaee2f2d2f920831b4a1440387e2e129086509d6243d26a8b53ea6ede20ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f7763a7e7989df8f02c07747f9476b6d309820b1f9773e390cb856e5f9808e6e
MD5 63cca2e996551c25d292e0591be13eac
BLAKE2b-256 db8e64bcf03261792eab4548d4caa3b7545654723d4896e86d8ffe7a53da0877

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5dc4ac01c9fd73eddda34707a9aefa89b5af74434dd160f3efe82b8c4066a8fd
MD5 07f752969789c74187a635d2e678eac3
BLAKE2b-256 6148d804f6b0734aa06fe2ec31c5a951728d9c246f17642d92086d66eaba4ac6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 005f1e9814b0bb1c1f28fdf479fdb55d040ec1dda6f304230af8ae14d75d4b8f
MD5 fb575cd5b41819d97cbd7d3c368d20ed
BLAKE2b-256 c555ebacd662992ec1c62ab2d7a130fec76d3fcb864921d30a6942618ac7a5a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2d9aa0b3d72c0cdef1caef24825b376aa73c2c416b16630e32d7e5951c52f2c1
MD5 e6a2049fa413a990ad5efbc74531b1c9
BLAKE2b-256 27b9336e77656cd83a5e308391715ff1fbbd46e31112d17ed5a5dec52796c8a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 81330610b7a09ac66f99986194b254a68a1ab6ab4a8e04d0150b5a2e0a79fed4
MD5 62779a59dacd7d99a8e22bf9ed07ca24
BLAKE2b-256 01493865ddcb583280a9ec764bd770faa740639163be6ebdfb572db299cadddf

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6fcae06c381dc48a9d03474e694ed721b001e37591237357b9d54c09fc104e88
MD5 2de1efc2f971ce96e10938545497f9f9
BLAKE2b-256 ad9a5c2d5e62691b5c0accf6398ad50a1907a65661f2fab87698da40030e59bd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 334ac5f06e3993ffb037c6725c54db96363274b6aa57f19d12dcbfe631e4df27
MD5 ece2864749890bff295d13a043e22b4e
BLAKE2b-256 5ac7eb5f3646e0b1e4513a31454d4d38ee6c45c41fc26654dee3fc5fac7b25b0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cdce315a6e9daf7625f7250397cfdef5f88f0f86f149ff8f5c191d533fb560fa
MD5 8e0cf6b6697244cc6784aa18a8b4d1c4
BLAKE2b-256 dabcc1709219d884322a408f2ef818effa7d6fe490d21eb63c584837b79b9d16

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4f177ddb243d1bbe08cacb1f7061c691d64a39297afb5646839e35c63e1ca093
MD5 7199b29ab08acdf7ef9471320b51e0c2
BLAKE2b-256 f5a771a785d9e82c11559fe06986362d51d258382d37c3332d08ab04ddba99d3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4db15469822d15e193b91c00f090d111d392c9817e428ca56cab3e5e792324d9
MD5 30d54f88c725f1da814ac0b6187c01be
BLAKE2b-256 84e0205d814726a784fd050c77f6df3a3c14a2b481f2be09a926427a076e13ce

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.48.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/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.48.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d8f537af53fb6adbbad2ad700ab8a4b8951bd141224b21d88ff2dbc0f516c06e
MD5 189f87c7fdc64f2e1d8c118125f6fa80
BLAKE2b-256 ed4c8a13a0dae4f6f02f4a57d6eee64d6a2f656ccab63f7827e44564bcc029a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.48.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.48.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.48.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1db929abd06c1e6d394f3036b5ac57fc940acc84209631e1a98a4ecda7bfe137
MD5 4ad46806b8f8eb80a8500c5b28c8f23e
BLAKE2b-256 af4d4cfe23328cf3a47ff3560197d5148bb5afcf277c7495bd1ffbb7f030b338

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.48.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 bcf003b214736707e87babbf7f8c0903671164208eeaf32663e8d36c10bab6ba
MD5 1606c0b9f4a83305b9326f4a7e7a0505
BLAKE2b-256 65ccbf903310511d8b064c727de6d60e841fa291478713ee7a2a50543fd7d427

See more details on using hashes here.

Provenance

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

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