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

Uploaded CPython 3.13Windows x86-64

openbricks-1.87.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.87.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.87.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.87.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.87.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.87.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.87.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.87.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.87.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.87.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.87.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.87.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.87.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.7 MB view details)

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

openbricks-1.87.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.87.0.tar.gz.

File metadata

  • Download URL: openbricks-1.87.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.87.0.tar.gz
Algorithm Hash digest
SHA256 732b32457171e71f92d2c6364d8721dc3bc1419cdd3e06982b971c6ae598a87e
MD5 968a4c36cb215723e427d6a7f30ce85b
BLAKE2b-256 9dc53be1e134939f0ffd38832bb443da0855a5867adecfa7712973eb31caf6c9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.87.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 94a4921a08e555c100a97c3cef3ae963b7a53b3c9d28e2e58fd1b8e4e28a73d9
MD5 36f834ef3e07125608384a4056d99b4e
BLAKE2b-256 61c0c1dbc27a824b87d74ad552c3544373dff53ee0dccf97ba49b43a0b5ca87a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.87.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.87.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.87.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a5fc43eeb657daa36a10d853ee7be3fcb619c14f6ec6d011606c9e2261652330
MD5 906af40c8052f4888571bc9b947d4538
BLAKE2b-256 e76933164f7b49b264a46dc9a9ff8f7e51888da2cac59a36fdfffe6419bbe972

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.87.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0bfb29dc183a4b7a293cad3dbd91388e81b4f9d552e45324bb95479d4d4794bc
MD5 434d81493b81b44a7f920018493682c0
BLAKE2b-256 f099f7270a07636c000ec96094b755c4e01d466df6221013c5d371cb714b9820

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.87.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8dc87666da448592b446b6ab7e2c242a19feea30e9c46afeabf0bc09dd5c4739
MD5 ee030bcb5a86757c7a8d0f5a6b5ea6f2
BLAKE2b-256 e55f62d8e8d0a71626c5126f9872c6ab2df06c187ff169bdfef1d8e977fe37f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.87.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.87.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.87.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3259718c2f44567c72ef501f5aed0f03ae55682e44a63a5f23e3c706c44989b5
MD5 77d287620773727272e2dc6c9badea88
BLAKE2b-256 01d0f9b0a601a85adefff878e8b91c2e757d164505368004527df646676ca08e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.87.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 49fe04c1f3b8fb0989a956f9b615710699a8578d8c2ef2e167cfbe0ad2172049
MD5 10d441e589a81cd4e23040f7e0ac9245
BLAKE2b-256 fe1b10c3582292ce2d794a7516ea1990702707cfcaae49f3256b7aa619ffea17

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.87.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cbe851a60759a3bfbe251b0d02e618c1f98ca4d92e8a673fc4a5289e06c735a2
MD5 ac726bf1de21d70ad4c6aa8300e254d8
BLAKE2b-256 aff045d51e07816e7fe6c6da49fbd826c340d2dde31cefee0d9d94000fa193a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.87.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.87.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.87.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 dcbf6c7cf8c8fa77f83a3d506d1dde0e5695da04a7a92778047f7ffacea379c9
MD5 c548470123721e44aafc689f03f0c87e
BLAKE2b-256 0c14855ea69403a10a041d25eb4ad29b2a349010e050c324fb3ec05c901debff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.87.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1782d7c5ed656acd1735170c8122ee516e7d2cfbc9d21b67931ae3e29cf17cef
MD5 d37207571a8c4c4a466dfc2c4dbe81e2
BLAKE2b-256 7412684c9e1b74195020ec5779f5d27512182534250458561db2e3b2a7dab7ba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.87.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2c395fc3a0d706135954c615dae4726875f4aed6dacb585843d7232e8cc9e438
MD5 d33ebc013b4842de6baaa4f97741a890
BLAKE2b-256 8e837890d1c038dbce3f6afceff74ab5a359863a517f5463d78fbe2e6a3211c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.87.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.87.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.87.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 84d0efbdc4401a712c8a0a2f7702bee51238f1448163c183b07325bd63831a49
MD5 918247fb272ca12ac551628821898fee
BLAKE2b-256 2301c3754cc65440dfe5450237ec51111e55d3b6e6dd131cbb5795b5c81ce6d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.87.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 521b89e577ec4f42809800e523a0bb2878c2294cd62a7fd9acb6d722c0d92322
MD5 d1f7e9e7c64626526534c36933ce8321
BLAKE2b-256 5b768f18dff48707f96252b393cace2e8dd38904fd6a8d7f731541ef58c2333d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.87.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.87.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1c017ced2dd51f0d516e4125ea7525310629ed9ad437a9d1a86ffe33712b5e23
MD5 c48a5197c0c13063242de7421bc389e0
BLAKE2b-256 245d407c7a471db589c39ef90a04cd1403935ad54e9ef77b346f7dcf33bcd2bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.87.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.87.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.87.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c6634d10f69156fde59c2650b8932191fd44eec6cd824f32ffcfcb117f27f6fa
MD5 c13b1df570a785d0edcee0240409d87e
BLAKE2b-256 b234d8d5b29dd659a31885b9f0c48cfb70fd77ae5bee505d5ac289227e29f0b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.87.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 952820fd0efdef968510fe3098323cb89722afc0406672cde9c9cad1e8a6026b
MD5 672c73aab5a71bb2d0c2bca5ea45ea61
BLAKE2b-256 404f81068e00d5d188c0933307f6c8d47f5abcdb3e6f15ee33ce385ae5057141

See more details on using hashes here.

Provenance

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