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.0.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.0-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.65.0-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.0-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.0-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.65.0-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.0-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.0-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.65.0-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.0-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.0-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.65.0-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.0-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.0-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.65.0-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.0-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.0.tar.gz.

File metadata

  • Download URL: openbricks-1.65.0.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.0.tar.gz
Algorithm Hash digest
SHA256 b587a5e3e662073335ffc3a872b607df0fae61bc5b188717db190de68c6b208f
MD5 d623b1410dac6a0a6fdbf2e41c426518
BLAKE2b-256 8319479bdacacddf3ff6f04f3283a6d72e6058ebf924276b535b8b6d6a5ca31b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 368ea7da3852248db6a058c54593aa7fa46364d4fae5aa820907c17ba73ad348
MD5 e6574305b506676f3fe49af1d2063be1
BLAKE2b-256 9a872d0bc2db4ee333cb561ccf4d71ec7dda413cc318790fcfd68b4600f9f8f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.65.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-1.65.0-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.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 dadf7a73a939e545a0d10ac6584e44ffba63a63876d7bb358f6098d256acc744
MD5 54f2711eed1a56129b1b3a10ff01c11d
BLAKE2b-256 9b6aa7d0fb9daddcb07e8f4ed41ba3ff2e6cda4c4fdc3f0cb31b60390cafb5d1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 4741e29fe839aeb886e6f951015ad55630a1d7e627e814984ddf73377a3c232f
MD5 25e1ddc9516e0d6eca1cd9c2fc4816f4
BLAKE2b-256 6af6ce5bb71ef500fe12dec52d08102424db7464b5d4340078ce44242e7522a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 901ff33ad1227d0f4ac82ae5eef2bbd75a4f97e2006822d0b9d94c9d1a967cdb
MD5 363b44450db58a5b89eda55c5a205a29
BLAKE2b-256 158344b40b6c17d1c5f14cd5d564f4354965c194d813d1f977e77c4e63c3e5cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.65.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-1.65.0-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.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c32d19f1892dd625656cd65fef4529c5d07866dd87aebab4311c33c590c8e382
MD5 509b8ac40a2657213bae3d007f9bf34c
BLAKE2b-256 232c54b51f150692a958540cb68cf5c3dcf4579346127726e52049a6d6968756

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8329bad38b7087c1982937f9a6fc52688e254747b0af9913db66b3928c3d6869
MD5 e4fea566585374837bca4e0882fc051b
BLAKE2b-256 f12f03a40bcc00991a5361f9a982d7887e722a2fac1358b6a1f1b37fc09cc0b4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 54580030a55bd2aeacc8ef2b5f2096e43b7b7cf328f8a763e785cfe2fba60ed4
MD5 329bfa198a94bf8dcc488e4b0712f087
BLAKE2b-256 f48b0c62941b3cb6571ea9a38679b0fd16e9abe66d5abdfa68aad8e489f966a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.65.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-1.65.0-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.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 360f771437489dce7a174452ec8118922bb9855ab61196f82a267256aff86909
MD5 3fa090e4d0ea64b86c815c200307dd3c
BLAKE2b-256 684f3a1d5d58c84b07849405611760d6f9365b3b207f6523cb77a237b016eebb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d981139404f5281afd3c235c8bd41815e00d876c8e70b93c00eb0739f2df70f6
MD5 220d0f0d11e387ce76d2b391d38b9d01
BLAKE2b-256 47f95f30af184a3e8012878beb3e466de09bd7287b5d80f0df7ea27e28cc8a86

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 22a8249994fdc4682be7749d67b8a666d5fe497542f2e4b48b711da4a1cff9ec
MD5 4f17764576f52264431a4eed17c60f57
BLAKE2b-256 c3ce41068398becc693f8b0828fc3cd37724126771a4cb9b22b2cec9683258ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.65.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-1.65.0-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.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c731a296b86eaa0d658b05c5cd47af7cc48907acb56454ae822188ef51c218e3
MD5 66a28fe0a31b1eee242279ae5b939c25
BLAKE2b-256 54495a99f9691436d920f986acbef5295247330d0ecbc411282a1b92e341d3c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7af6841c165576702efe483dd4a8e660a8d11098d1dc4558cb466a4b03e75a89
MD5 572f0c3bedf50dc24732ebfa5e6ea7f2
BLAKE2b-256 bb262401c28cc317634bf500388f61ce0998736ccf519a39693ad8db6efff811

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.65.0-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.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 37b978ed0b9b0b162adab7989f70b8f28b03e049d7f11b50efcbcf8f7ac20225
MD5 b54de6fc4ef21c7bf17b4c67055e20df
BLAKE2b-256 b875d6eeead424d1a7fac4c6a216aede4c7b1e73b9e3e34623d832e325182b90

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.65.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-1.65.0-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.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4d2e79b5a44ee05f689753d71f8c4dc63319d76dae3892b9e8b14018e566dc7a
MD5 b3783d15e2221445550d2189e0205548
BLAKE2b-256 aa490d9394fc22a1254ecd879f743125246d3c650911cdabe9639acbf64c5603

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.65.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3cc5e08c2bdfc07ede51f199e4d768a5861ec5ba4e58c2f13d3adf78493722da
MD5 0e0ff4d07e17063ff15c3fae9dcdde80
BLAKE2b-256 b93fbd870aa30119b8a254f509b18a50e5c51dc54c5738574b9443cf43b02ae3

See more details on using hashes here.

Provenance

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

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