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

Uploaded CPython 3.13Windows x86-64

openbricks-1.96.2-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.96.2-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.96.2-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.96.2-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.96.2-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.96.2-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.96.2-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.96.2-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.96.2-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.96.2-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.96.2.tar.gz.

File metadata

  • Download URL: openbricks-1.96.2.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.96.2.tar.gz
Algorithm Hash digest
SHA256 d0f201f836b612807c8750c325f106f33b53dece07c524f0c6f37c07ee297a84
MD5 7f1b96541a97c4a70578b2ce5a964082
BLAKE2b-256 b22484e0deed67b94d00d9c03a00933808ac7bc9ca0cdba1e066088e36256170

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 7108970de6a3e6812ae0eac1dce102b38a7adeabfd5eccdb471ccd7485170eb7
MD5 1c3b31acb82db723ee796fc8373e3402
BLAKE2b-256 55b0a0d26d219e6d8574357eb922171bec1abfcb27912234abf7f18766505f36

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8248db0b0fc70230d4974552890a7bc1ac760a189a64e2a146eafdb3b2ff511f
MD5 19d4f88d3d26c83f3e24d68fc99b3dab
BLAKE2b-256 6557ed0f9f6c55e24522d8d52672b34ef8d16576fc0d70966179d16dd93570f3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 fb5c95bd9c4a8283afec9e9f437f1016d7300ed3f7aa3748636fa4fef62f1438
MD5 d16b09122937569a99920bad7a13229c
BLAKE2b-256 3c5864ab24a2e2f66c21d09bae2cf1aef30228bc4c469357ec3d0de9dba51341

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 23f60badfad966dea92f5efb26aa8c573bbeee32dd495196ebeff97d48d1f509
MD5 cae469b3621dd5dd7360f357ac0a3ea2
BLAKE2b-256 342336c62b9d28256bb4f2bfce2e9325762a5fbbb5a148c717526b307a91244e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 202bb46178f9aa6476c0b53541adb5a7e4a7d938c6723e4849444ad51b9384af
MD5 ab5058cd306d6b3fbcbaab2c8fc7620c
BLAKE2b-256 81c7889777303328b8a13f0908bbaaa8483274dcc850a9736684d100427a6104

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2e647df42c608993211dd8d16250ad0eecbd30ff3b2d1ef9a6d71bf90778877f
MD5 eccf8e6eb3a3f573fac319985c1338d0
BLAKE2b-256 022a26c304b0ab26dea88b03e9e79baacc256c7762f0cc7664d4fd2f5f9ccfe9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 98ee88b28fd8cc6bc4a297344a744655801f7a120c377e180a8d247605597682
MD5 137b90a010e46c1fe71104a1eab03d13
BLAKE2b-256 c5f6245be19232526d91e984b7e12cbdac2f187d9543f24e8af21f2d8e3e2baf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0970bad26c40925aa379b4dff7f22ae318acfa2856e6a68eed73851f2713a98d
MD5 42f109629458c2c700a7634bf23323c9
BLAKE2b-256 06b8f3775c5865d5d877ba775c3b3aafca724a76881a48a08dd95236e209dff3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4042963ce16c82a0e46616f8d7e72e9a6407471580b74a57c1a83a369a3a24b7
MD5 849cad701017a3fcfea9e0c4a6672c4c
BLAKE2b-256 d4d84140bdf349a4ec315fab1a4e698cca99cf2f49cbf0e213e1dc8a708f9cb3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 20bdc812aede3483d69ecfe4373df240bed61f92ad1c913e046f4bd358dec44e
MD5 49cac8d7fab7935a2ed95d0eb273a05d
BLAKE2b-256 fd36e225978fd3d59783798d27dafe24309864f3da61396ab2f53bde86ead8a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a811457580f021f45ab043b420c6a155dd37a777873ecbcf71de5cf8f06f8af8
MD5 574770abc2a6eb36ac7b1bff82daed18
BLAKE2b-256 5392d030847c68274e15778b82369c2a431ee95c58394d2516ab84a916c2fd13

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 70b15e23d55436f76f0e36f8898dc3d9254b381227c48c10785baf589e1152c3
MD5 6ec4a8e07fd14366b56b051a32958310
BLAKE2b-256 84dfc36fa2a987843a93a08ee18b72f44268832001ce69ec3227c3b3a76e19b3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.96.2-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.96.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 815dbd56cf565664743149e0ffd3678db432a9280b2778df1babd9605564337c
MD5 31651f7a946af6d7c78c31d28a51008b
BLAKE2b-256 7b899a4565ea5cf542ec1331cd581f9546854204dff074233a8784b9759d9b8e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bf4dea356c916cd72cee6d0c55f17976dbf2530aeb0bc0780ba587916f0f2953
MD5 555c5774251308f0533883dd729b7097
BLAKE2b-256 7a8e455ec4e68290882a246f6c912037a95fe62a06d1fda05f6b12372ef0145f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.96.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 29ea6526d5efe19aca293e9728419b13bc43d761b885ad0f34ca6bc6f08eb04d
MD5 f6ef78d1e05b26cce5cb266608ccb133
BLAKE2b-256 4cfee43c4497a16969a659b9d9b7645d331f5319dfa793f5b808caf582f17673

See more details on using hashes here.

Provenance

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