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

Uploaded CPython 3.13Windows x86-64

openbricks-1.76.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

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

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.76.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

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

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.76.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

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

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.76.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.76.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.76.0-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.76.0.tar.gz.

File metadata

  • Download URL: openbricks-1.76.0.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.76.0.tar.gz
Algorithm Hash digest
SHA256 5782f928d9ae7426d94ef516c48333e4944073dc8dcd949897ae69de468ae823
MD5 89c7396d73165a837d303d23e00a6da1
BLAKE2b-256 dfc41bbd2750d358be01ccbea2a2fe8cf6f37d4c32bcd83b786584fd989a48ca

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8287c57a7a21c6fc42024d98961dce61314ba419c4f85225ee12d0e7cab7a030
MD5 6580f5d5ecdc374a1f0ee24374a652fe
BLAKE2b-256 abfcfcdfc87978202f5dfefcd9a1a7a21c4d6f385f99d513ffbcc1a06fb390d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.76.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.76.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.76.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4976c89c67df7e85494f7af40611b4f03197e48f65ac964f99411e2b5b415c0a
MD5 e0825ce3c78c8ec666ece9097de8ca71
BLAKE2b-256 7cb9a26c0cb5f60e20a83507f39ac23635ac573477001cce9cbb7c0c80e22aad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 009fdb6c5871a094a57834c0d8827bc5ab89aa178521081ae33b46e04717cd22
MD5 ccbf8ce8a0bb5a258dce107f5f75ba70
BLAKE2b-256 d0ec2898f2fa07517eaf8e1c41c77972446ab325dc301bcbf86e66bb0b9602a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5f4c64457c6d6587dd18cff820491b9399322fe5267df02eef63faaa439c0487
MD5 00e45e7618577227fe18b590fc361a92
BLAKE2b-256 4786a6dfbd8bf825d63f171a0febf30211af5d60ac93e553e819a37d1400b9a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.76.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.76.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.76.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 080743eb7a7e69e0717699e81922c48bb24fadbe5bfe8fb3296985bed186887f
MD5 481418fe660dc71db5054d2117cbdb29
BLAKE2b-256 712d40215f5214cdf7853e7f7e726b81b5ebc074abb94ae1980481ab7b911bba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 fb2369c1e373eb868f511d2bdfbbd195a6d6e198606ac4218f6a1e775675de32
MD5 3ccadb8a92b43a57beba46a03c49337d
BLAKE2b-256 307cd021bac090b8febc37e0e5750d6b8af761ef07a7661af920f4395fd6a11c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 78f5cff6446168b151074e9075d6e4d2ca515804ded8710b7f0d09b77b59aa33
MD5 59f91b865197cc971522ce40a5ecf482
BLAKE2b-256 5be1a0b3c1e345badf402f36f46cca02551ce6ae0ce7fd27b5315da8768f7f77

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.76.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.76.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.76.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b5f93b094d97325c7cde824230110b852df5e2d1a11aa58cb4e43cbf5514474c
MD5 93a68a8eede2f15015e2b76a7ea37dff
BLAKE2b-256 76d0b1a085bdbc90d2c0cde2966734698f4b2a32349a7d332ad7649468a42e13

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2af919a203b8f6a7dbccbf98859650714340bfd26e17ae20815772876c11ec24
MD5 ef6531bfd91730a08d6e73ac64372ed0
BLAKE2b-256 f90cca3929c4e58220f0cab1344d1d78d339a2715bf801123dde5b06d06781b0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 285c970428f970f0004a2038eb858872e83dae259ba4f0d6c7622ae3987f09a8
MD5 f29831e0fd4efbe28e4b18657fadae0c
BLAKE2b-256 32e2598a480b772366eec2e345c27fa263100ad96d7b8678f1dbc9f8b2815ee6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.76.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.76.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.76.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 03159d745a3f6164bab55f501413d85f6e1030c7176444ce990bb040eb21a739
MD5 ece024c53e3762ec75441ace46d78314
BLAKE2b-256 8076c3ac8bf297dfdb3d759fc172b86d2daca85ac563d74069401ddd085c3c44

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 589b6ce3df66edd87035155907f530cd23017825acbd72aa372bd3d3735f1391
MD5 55bee32d0d339c2c5e983bdcb935ab35
BLAKE2b-256 66ed3d46233fda28db27a6b93a6b8cfc89fd727b728c57d00d17ca59e6e104ec

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.76.0-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.76.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3676c39f445ac5087fca778d86d1b686c29cfc2f4ac767ba82acb01a79cf4e8f
MD5 09e4936e3fe9180436b7da45ddd32d29
BLAKE2b-256 071a6fa93a93942262da48958d5b2107dd91b92a407fcc6a94f5adcc1c5367b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.76.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.76.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.76.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 266f84460f76097a368b3f6c16c7427e7a3ada27618cc464f6f55612302187b6
MD5 13c4819226849a3eb262b87a39ba36b6
BLAKE2b-256 83f70bb6f09393f92c8ce32051e99d6f6e5464078cbdca3be9374f1148a25c99

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.76.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9bb8cd09bacbc33c613b57b199d32938891b44764e87a6e8076a2c9c9d2d94fa
MD5 44293e28659dd43396907cdd2d5659d8
BLAKE2b-256 41a949c4e2fc1eb51224221f8e3951a82882747e646a4e498a644f880adea39c

See more details on using hashes here.

Provenance

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