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.61.1.tar.gz (3.4 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.61.1-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.61.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.61.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.61.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.61.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.61.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.61.1-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.61.1.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.61.1.tar.gz
Algorithm Hash digest
SHA256 895d818cceb2ed581598294f6de63ff57501d4ed56e61ceb08345300859f7c0a
MD5 0693ef6032e7de3e8aca928c3a52c7d9
BLAKE2b-256 caa5142ac98ea5abfbc89f33e797894f101b1d59c84efd2fe6ba318235888e07

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 35f295ea25e0f0953ff5690034044a20c926ede01070767b08bb26503e66f4bd
MD5 efd4191037e50cc35c8ec7c980222140
BLAKE2b-256 31dbf01b4230acfea3b06e3cf7ce62bf20be879150fe59d1767c6a9ad9e448ce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d33ec3da351ef6b4537e6dbb75ac082d796ee11fae3ae124a8d5bc53d640452c
MD5 6d5695568325d9e3a29c8b99b1977ee2
BLAKE2b-256 9a932370b04c2f112609e08e615ecc6e294f1233e44fe8bb5343df6c876ee57e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e13bff998e9a11ae93b13592d77482b7679f6e66d48a8e1864b06de57b98645b
MD5 0554e575c4ddb2d9bedfb95d850c94c4
BLAKE2b-256 9b71122b61f547ed4f222e60a44d4f0b2a3be9140d4f36fd2dbdae08612caddb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 593990681d16c03c62779340ab1d6e17aa08804cb19e6c4925803e19b4764a63
MD5 2cbfdc2d5dafa98a9867b3819fe4d2bc
BLAKE2b-256 fd5cfb06d91a8ed6e0fa785055aa20deed62a129419715eddb7897647ccc0289

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4e1513723678b22878d8353e5b9e866dc0571af52e46cd86bab462f5277dede8
MD5 c8f9b6354bb2da7bfb6755b2d3e8853e
BLAKE2b-256 3f9472cfeab70f7460874642de9a42c69c65c8aebe39322d88ae368024e6bf44

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7161d04e836d7298c9450fc5a9ed847c26f5a0f556c81057fa4013e6eac1f8bd
MD5 9650e39044ebcd2c6f4ed13946e349c1
BLAKE2b-256 667dbeb276fa5c143e906da27050894657228e7c55ff3ef24d398acac28b2ae3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 357b089d8a57e1850e07e3aeea8eb3ad4483812e3e0c7e1a1b1f69d702e571a1
MD5 e8ead6d80de93a4d33a9d9faaf177124
BLAKE2b-256 56ac43ae7ac1edfe675cba6900077fe76bfc62f48f925fe4ad705733e4aceafc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9f5ef61314861f5fd7815e674c87412eb58773296c3d3c6b367d0f98f7d8529d
MD5 004ba3bd691667bd248e26c29e0068ea
BLAKE2b-256 bf3bfc3e24d3a293a472056c4fb92dcba63528f1e7647832597188f4720184b4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4fe134470fd09de332617c4a5cd6cf759c724640e9c9b4458d5ecef03795ab9a
MD5 450831409a8fb1ad1f1f52c79ec88b8b
BLAKE2b-256 91c775d01fdad113c42e3ecd47e39df8da28d7ed30c0e1d25d8e0675ecc3b9b7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 eeba78026aea634b17ffadede527aa5f0ac4b36fd73f44fb5ed9ea774e6ed2a3
MD5 e4d55f9e3d8784a0b4ab9c807479214f
BLAKE2b-256 29271f7fce26218306fb7e93da634de139639c005cccd7efb5acefaf8ce4939b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 dc2c9aafdd28e313ddba379fe6868865ad196338195c10c412567a4aac808720
MD5 a00070b99782a9452ef86de4da6fd945
BLAKE2b-256 41b6dd5ceca6b9c8ef84ccf4bafc2f7d033fb6a056cbb424a35057a904c658b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b471ae8ef51ce79b155afce945eb1e502adcceecef6c5d9fa7c0e54d1b580315
MD5 38e8a1de8c11a91ffcbf7b4bde5c6b1f
BLAKE2b-256 a477b4476ce5610832fdbbe57dc3cb4eabf624f4cb8f787cd1fe22f330aeaf64

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.61.1-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.61.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fe8200599becd27454d38885f00e776702ef5de972966a7f9bd0706e6c124cbc
MD5 25bd2015f7651b5bcf8f75587a73c807
BLAKE2b-256 bbae1dbe137a0acc1cdc925c36c2d0d2dc32516d7fc95865dedf864fc5dd4493

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a606c92814ee0db94999ce659f93dddd4753c3501254f38215d0b0e465b3c0e2
MD5 42d06d4150d70ac986f56448a06f4211
BLAKE2b-256 f4fd2c053dd63afc3e5d871da072b17f901a4dfa59f212036093bee9c6052ce9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.61.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a9bad3f6bd6115745c9f188ee363b2234fae0cb64ab580ba9fc2c217a62aeadd
MD5 5dff2725efaa948f5c23345aa4b60474
BLAKE2b-256 c131207c0d7c711021f2457364dc6a41858b253d0347540cbc2b731e438bc69f

See more details on using hashes here.

Provenance

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