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

Uploaded CPython 3.13Windows x86-64

openbricks-1.89.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.89.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.89.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.89.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.89.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.89.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.89.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.89.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.89.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.89.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.89.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.89.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.89.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.89.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.89.0.tar.gz.

File metadata

  • Download URL: openbricks-1.89.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.89.0.tar.gz
Algorithm Hash digest
SHA256 cfad4d519858c131ed52a4bfbf2d6d6d338af0119c3361a10a8c02beef365017
MD5 a83825e910edd4c000ebb0cdd80a4e88
BLAKE2b-256 0bd8a777bd6d4f2f4ad6fb6af875f514d1282b307322ec7b79bec8eae768fd0c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.89.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 adbfc09a04fb214b376b696a6833272ecbf6499a0d191c105371f2df6ed847b4
MD5 e918b73a4c483d2e3a384e8c20348370
BLAKE2b-256 ad94ed07b7caadeb051dad115e5ff5995c32c0530fd59d681b316b3f45c74193

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.89.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.89.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.89.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fb1a0a4e508a18e247936c1ad2c0f731b5af5c2fb27252265d6d02220f836b98
MD5 4a2e5cdb31dff9094b5d9c33ca05e7ab
BLAKE2b-256 d0ce1ad19f10258a889514ef14d641aa44de2bd28da1cf8a257dcca4582b86b8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.89.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 1cd179184675077c8f4f95670f1174b2317e3fcc6ab57a2ed4d4ec3d72b38dec
MD5 d4b3bb0f54e0ba4dae6b15343f03142b
BLAKE2b-256 09e88a6781cebdc278b90786e13cced5c5c736ed874fb5b23218242f1f77f19f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.89.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d2f89f99211305a14ec131ac97ce9dd32b9e6cce17a244bce3de3e1b37062070
MD5 f4443174a37cffb90516e5471e442ddf
BLAKE2b-256 8250372036dc6d48a3f225de1b09b3dd0fba6ee37d37117e0c4a4d724e945a7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.89.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.89.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.89.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 db314e1882b1b1bab122d48cc75367a145673ff08b6c5a159fc06b576ac33b32
MD5 48645edeceaed381c91a63fe8027d0ee
BLAKE2b-256 266f9055973dd6aa6eec2c2e77622f42ecd4d7a19878d95a54ca20fcc533648c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.89.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 c77cd43ac3a5f73ca82863f64002b64881aa030c88a839772092e44d6f54cb43
MD5 b10a6ee17a76d9e27eccc9cf7226f4d2
BLAKE2b-256 adc4719d8bf0346283d5e7d14bab0b7ab01b4a4a4687d10e186ccb793d58fb69

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.89.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dc78200fafc84124709e73742de08d17510daed3c547a639779b8d575bbb2153
MD5 f64be4e7027ea859d588d3f29aabcf28
BLAKE2b-256 098587a086eaf85ce4a3d2eb65f2a74425b5b75eb4c405f65bb1141b68c7cd27

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.89.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.89.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.89.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 324edffd3e179168de4b39f6221639316ba20d179902e864cb6f2c9d8ed105e3
MD5 6dc5e9b7907262d4833ebbd476b76953
BLAKE2b-256 9cd77b5859b8c1145e61f818ee104fbec82d863950231c979168e4309f2e4952

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.89.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1ab490b7ca1de3f6a7e7377c273e1cef1eb77305a98328d9f5e46e133640f916
MD5 e018e7a742712aa801bbccac73de6cba
BLAKE2b-256 28a1c03c7542721c76d47cc30ca2d3fe413b6ff642765f6e7b976ac7a5ae97b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.89.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0ec8cb91f9063a85dab10fa914f964784babdc0b363a92fc5020f0bc261a8668
MD5 5d3cb2e0bdab36bd4ef97a65594eeafa
BLAKE2b-256 d3a26a465264401bbd59c9fccac06806df4e8c5fad2d10893e4c1b3a0c5d81d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.89.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.89.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.89.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fcf7b15e6986a26c8088b80f4c4d62bef05e16080547ef33133e7638e07ac62f
MD5 8dbdab45c2a29a9a48fd27acc38d486d
BLAKE2b-256 6a1814f34743fda65404738a6cb55cb56ef7399cb3de21e8eab370924922b74c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.89.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1f8e708fbdfc1d7c926f682703384261e29d056661a8589aad29f5d9e85fb5b9
MD5 b6d2dbfa5c7d39921cb05a2bf951131f
BLAKE2b-256 fd2ee2aa9be16caef6a669dd263ac93b27cdae5cbbbb19e4c769fc70e0338f22

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.89.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.89.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3ee7635442d6b09f6bd8da98dbe1cf672c2217cf83c03c66d4ac99a3096ca61d
MD5 78102031633f023fb534e30fac8b6a43
BLAKE2b-256 e887058f25eed1938da433392872561faf8d2fae7f64634711e9fbc017af78a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.89.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.89.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.89.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 cb6e979bc5e86301e92c271ab95189425c0613421866e7db2eedeec894b50d7b
MD5 32a9d0ccfd36611ab0ce2b19c0a935ec
BLAKE2b-256 bbe28164f273882bd39606052f7ba1eb57ad87f7040c5f793df7cedb02b7e440

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.89.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 328204e20a3852c8ee071ddfd54a9de38e3ff497e1d3326333ed9861de6134a7
MD5 6c7c67eeef68541ec2620f7af54f461b
BLAKE2b-256 eae07fc9dd40c375fc5611e88372cef3a8a61a7ea2ec0a0b544cad4d710819b4

See more details on using hashes here.

Provenance

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