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

Uploaded CPython 3.13Windows x86-64

openbricks-1.36.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.36.3-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.36.3-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.36.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.36.3-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.36.3-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.36.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.36.3-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.36.3-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.36.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.36.3-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.36.3-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.36.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.36.3-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.36.3.tar.gz.

File metadata

  • Download URL: openbricks-1.36.3.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.36.3.tar.gz
Algorithm Hash digest
SHA256 8ab596e7e02c1179f8cb18e0efcfc0f3ae8957fc597ebe07fa2764b4467f57a5
MD5 16d8453553987531390bb9434ed09a1e
BLAKE2b-256 58f1a10cdbe1705da7cf5d26fab3bb8134ac4c96b6a342bbb953e2807fce4766

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 69f99071b68543af59957bc76f73ad783bd6211af9567c284d7aa2f2bc17854c
MD5 6548558c2663c9e1d81703269cfa83fc
BLAKE2b-256 99eb9f63b99b278287c6085eea248d0cf5f8559759a1d285190c6c7aee6c8d11

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c422f7eac53fbb867a9e8171c8e672a75ddff0e6b5fa1d9f8316a181674f0539
MD5 19fed8f355c5d34e928ca65286093985
BLAKE2b-256 d93cc98d591c8a73a94d6f2d0a122ef79f0f3a7213cb656e63d099e6a7d3091c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f245c794b292ef572aa6962821f83961eecdcbddbe9e337685a98886813111c6
MD5 4bb04a488a8029108ea6d04c175f1bed
BLAKE2b-256 28a24f38a57106627b3db2b30f28499f1da454983093c0f0f762aba36ef758b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 50dca96de7619869a8ceb14cef039da33172f08f18c0e43e86b53678f3891a35
MD5 b733533aebfadfbd099e8051cdb00049
BLAKE2b-256 8890d82c5bfd0d370375d74dccde7599a96fa996df54317fda7628614a5930c3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 41c079d2bf7b630912f73190c245a47b9a20b529f9111e8db2af86c4d72b3bea
MD5 a26567cedfcdcc5b42728e0de6b9c280
BLAKE2b-256 54b056b4a2188611fd4dc314b9e11c5e50a74675a5d0efa66bf42200a8fb65dc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5080c6f680c1ea0d7f09a53861d3067a9a0a63b946e151584da82e2ade83b7ff
MD5 9ae2ef2acb3cb7e5f8655b8f512b5e60
BLAKE2b-256 b292e1ab49da9961d053dfc35e2b6ecac114da3a2db6d8d213b56f1ea94ca23b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 694bdcc422ef28f173ff48960bf25bc382d5eac727281cede93c11197a1e4a29
MD5 c084f6ed404e8e7a69ef5de8da67484b
BLAKE2b-256 c2c15921f72dc491445f46fd322b0934f66961c06712bb15692fab655b41c0df

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f11ddfc12c6db833c493c69c4ce7d4a4e219f580f9fbcf17589672d20f39f5ef
MD5 4157bd0eb60e18b11f0d7cf474d47f59
BLAKE2b-256 5e1f62d35d6e83c28aa0cfd15ac715562648f7efda35cfdabefead559156c637

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a414c7d98c4ae2ba4442ae10d33e86dee0ec23ddac2de0c422ed677a96ccef50
MD5 ea0b0912713dfe33944778b13a2b3f86
BLAKE2b-256 f4f98a57aa689bd782136d4ad00d97b227ae1f79c7178200707ef16f1768c0a2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 525cdbb32ecd658c7a034a097745732071edb7c269c3c17ae4b4d596255adc28
MD5 154ba50c5bfeb2929e025891d216424c
BLAKE2b-256 a1fcee469f308c98ac1cb3e659247c022bd1b204df17193e77da320993681710

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bacf11de5525fb8b05330d626941957c411a22bfaa3685a2d151877dc98da9f3
MD5 ead01e3ac2d9ca7f7a1d47de65a06c33
BLAKE2b-256 10f95fb518d4ff71b357eb3285d3f57f05e06a840cac964f88e2509f65db0688

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7d8e8eb71f6219233a9e1ea04dd5931379acbd9a088eba7459ab5b426c78e652
MD5 312697ce9a953d68689c8a3207406242
BLAKE2b-256 f4c6c7b625bca753bcf56ac8657e4731a2de1f2f78a2db159c8f0b1420a2f5ba

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.36.3-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.36.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 489ad2f40c29eba9dadeda4716488800e151e246be781e1917bd7b5a51225688
MD5 26cc1ce13bac19ec635d134518c8c1a3
BLAKE2b-256 6b9ac789b298ccc2bbeb777f2412df7dc079913f6d621a590cd594bf3283bb52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9d523d42005585893691b5f15ab2217f7aa49ebf86bf55f2c1745fbd7aad00f0
MD5 c36ded0958b3ccebfe2396f4d1426275
BLAKE2b-256 da5b98ccf3a043725f3c6514431e3987db65b9d33ebf940f3c695d15956bdd26

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.36.3-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f178c8d459fbdd29fd0cad1117f30f69ae332ddf2f4d5be0c82c16250895d432
MD5 1a2ea604e333239e3917014091ec28e1
BLAKE2b-256 7d19ba7752ad6e8d2e3990f592efdcaafc4d6cbdfc880567ac1f7847418221dd

See more details on using hashes here.

Provenance

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