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.65.2.tar.gz (3.7 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.65.2-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.65.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.65.2-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.65.2-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.65.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.65.2-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.65.2-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.65.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.65.2-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.65.2-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.65.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.65.2-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.65.2-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.65.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.65.2-cp39-cp39-macosx_10_9_universal2.whl (3.5 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-1.65.2.tar.gz
Algorithm Hash digest
SHA256 e4c6bb7554b477477f8e7bde9d4bf4e0b0f393c96bca1eae9f384f96a4834591
MD5 0838ec0a6e4f6eef0e2c9e4d0b5910a8
BLAKE2b-256 02f321e77e29103ab5e1a14726c3f0aa773838308da6ea9dcdc1bce8f97085d9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ad6c4d2daee89bc7f959a602735071d461fc8fd770105b70cd1b05167cde79fc
MD5 687b5467d54c98e31d328cbac1ba83d0
BLAKE2b-256 c2a776a1979eb0d124d314b4b49e0d0ea631fe1d864833b0ca18ea7f6d3d2170

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.65.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.65.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.65.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 18eaa275f275be79cffb7cfbec7d551a90d01b0eefb125ca2cf013cd9f797ca7
MD5 75473e79f9598d8d4db9f5f18277f403
BLAKE2b-256 a1365df3d7a7c17a3931121ff6fedeae8749cec237ba10fab8c90dad9c9fcf30

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 1b43436d9ce4e921c265a62b86d5db3fbcb5c0c762873afa8d1c3b0166831a0a
MD5 1f1cdae6bc24784e6e8c58efb674aa67
BLAKE2b-256 47fd905b20a8f451230545c6be07c4de990c525fd7d9090901662d508016068e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b6d16dba6d312b5483a9f5f9b413959019ac03169cef8881178af9cc39c0f4f5
MD5 70cbaad9746ad272d9bc0fe94ce8ec19
BLAKE2b-256 67766f2b410fe8082d2705eddc804bc1b55a56f53b70d6a551b190502d4fb62c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.65.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.65.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.65.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 14206896af5a9e1a6b9e46b08f0f92a9b9acdd9ab2823ea7dc1c22ff98cdcd46
MD5 6cbba0c24397613447c98255a6cb5fd9
BLAKE2b-256 ca2391908b06d79d91fb89df8862cb2017199d3d4660353d6ea87a83722f3199

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a9eb26accc766ece5b02613001d958780909584c673a532cf39859ff8464ab81
MD5 9a8137921dffb963e4b3205cc8776c0d
BLAKE2b-256 415c3704d22cc4c5ea1ff160628799db7128c07bf75d43293410038b20f394e2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 20f6e5380ca7469a7aa2e1bcb3a5c9ea703bfbc33ff4559e82a28a01d08bcee6
MD5 f848165a38edcf9405b788866e78ee71
BLAKE2b-256 c5c333375b4e9f3b67491b57b8df585ff1eea05b535be09e6a0a6f0f02f1c6f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.65.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.65.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.65.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7aa5419a7f124e6014e25406748ad8b6e9f46bb2bb7bcd1502c443a714bec0c1
MD5 99f02200523cf1a0afacd8723bc2fe1a
BLAKE2b-256 96e7830957f6729caf9811846b9c71c624a5eb0053fad2654abc850664ae0364

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0800c6b9de7c6a42e334f8d4b0daa82b72321ad4ef86b62ecb5c7b7c03af4475
MD5 751243324d9f751489f2a4c72a1a711a
BLAKE2b-256 1d5a6a31e64f997074d0017d2c009b5f3771f62ab8defa0b49152ef893186c5d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 979ec25f17eb2c8ff8892a7a715f10cb88507bf82b6a01371c92e8cbffa92cbb
MD5 e6812387a14119a7c3bac11f6da24c8a
BLAKE2b-256 1e2deda90732daa64025d0535420a3ad0f66545624bce415c2e623bc997a7230

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.65.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.65.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.65.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 44455b72769829a70d0365409a3547d9762c3386088def5725fee8fe874aa112
MD5 f3eb05690a57c04c42ca2c148dc2b2ba
BLAKE2b-256 3448fcf1bcce724275702b079640acc46b2e580aa80b5df658da952f36a7e00e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ae171b125721762d71267448b91aa2930911760f6e4a2005e9ac1191741263e9
MD5 a5b43fb001f83dfeb7c721f2a3d99bcc
BLAKE2b-256 d3538ecb1fee93ae6a267ed0b700628dcca85f6018f15ff7819d80c04cff4a2b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.65.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.65.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 df5bf8193ecce1df2fd3a3fb2631720af164038d6fdfb776d6e87fffd3a518ae
MD5 92a60c1f3026496fd799f3bc2450be6a
BLAKE2b-256 0a7c1adcfe5e223058f47c0721510437ac39447ca9a706c55603096250f6c102

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.65.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.65.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.65.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e7d66db6abc7c1787345dd45bbde018cdd91a704771c3d87cfaaf7d15840498d
MD5 96d09fb3e713f588865dba5ac23a29c7
BLAKE2b-256 1d735d9fc482d6e90c67ea3627fe01243b0b6fa6ea0590554b1d996a0ffbf1d3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6709e26689ece5883871ace355aa600af5b57137fb12a850865bc6f920707a01
MD5 cc6ca6f74e68692427fc9ae2ef86f86a
BLAKE2b-256 ebf0383399860eabbf86d7a707395cad33f2e50aaff3bde4e197c2eb00e4e750

See more details on using hashes here.

Provenance

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