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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-2.0.1.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-2.0.1.tar.gz
Algorithm Hash digest
SHA256 375a778f6e5b6febdd8b48819ba7fe2b903d5d7b37a8ed0c2efa3847d79871ce
MD5 8a68f90ea7deee132a54d792163def1d
BLAKE2b-256 00c659b1dfc784627b2081fbf3de3236b51fddc7a3c5e769e2f76e873fdbb22e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.0.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 811343abd173fc20cbb13244b15a3b61ca3b444e7da744ae32ba9fd8d3c378d9
MD5 bc28ef089a8f79b27b021face2e2fde0
BLAKE2b-256 c2be2feb2583e74edc4239e990ac296636e92bbb68c73321f023647180c869c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 af36e55034d96bc16342d31ce3e668e5fccc10bcd384d7641ba476ea6298e865
MD5 146f4ee1d78e10122ec1a6811d8958ef
BLAKE2b-256 345a63f6a673ca0b50472e2fec597af00633cfc7713f5195f41a5c99ba51a296

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3a4ca667add40e6e953657e168a57492ad351f90e5834d58170065b00c68cf77
MD5 e7a55e1f912a79f43d887de71b567fe6
BLAKE2b-256 e524110eec593055715f93647ad140b617e760208a8139ecd0c12e4f03520b73

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.0.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d4cd12751c8b91213aeb0e0493eedf7e3f315537560f0c356bce2da4112835eb
MD5 87414bffd509a79f03b8480d1f59bde2
BLAKE2b-256 e00a43bb8d07ceec0c34eb076a5669b4815870c58b8b1df985f786bdb57220d9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5ddde7430bd338882d73065b4deedbec0c7d807092a4eacc880d7c5a66929ff4
MD5 473e8e96143133c917ba5bc180380bdf
BLAKE2b-256 e846beb85dd4ee656fd857293bc8ec6f2f336ecb59433ebd63ca9b08aadc54d5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7fa1d16fd601210bc5cf750664a2dd9f046b37a9c744cd9a475b7ab1bbca0e9c
MD5 e6166a4c2fe99c2745362140d35343fe
BLAKE2b-256 d8214f5de3b3bf8c80511cc7a8720f7a7bcad50d983f3753f6ec75b3db4a9dc2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5f83c6bf73622b43f8c0371e915fe51d615f0eed7a06379414c10670e6d03d9b
MD5 97c1f5ebf3625d402943443d3fc14246
BLAKE2b-256 abe53a8bf6fe0d65c22826b3fec5572e9f719d2ea20facf356e5fd314da00085

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 941a86cb18e9286eeb5d89a7a4d414331aa2a2e60cc30837e5969f2df36c6e43
MD5 d8175843d475499023382ec412790f4f
BLAKE2b-256 72da9a3f58afc890931ce2fad768e1e275e407a7df4c2c76cb15f22f9cb019b5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4666290b8012badd5230c0786b1239890ab0660429263ac019f5c79a2698d2ef
MD5 64f7ef174c43d1e766087116f10eb10f
BLAKE2b-256 d94c7f1eb491bb6d27adbec8cf75c677d2748a9afcc6148e4edfe64204799792

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.0.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e5354ad67772c4ee1659927b5d2c92b7c45e83557732d0518fd8894e44c6e576
MD5 f5b56cb6b85c558b6afc7ab5363f5125
BLAKE2b-256 6dc1056438d3c4ab937883cb90fec66a1f64995376702d6a69cc91837c02245b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 27d3748b0d0bcf0caebf1f808261a130677a605600fe406db6f5bf0a42e86f0d
MD5 e7e5e471d6ba154194c2c6c207c95c14
BLAKE2b-256 135220024e57aad8e28affc43ca29c649057950410dcbf04132e1179c26da0a4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c56ca9a550bea5d2aa4bc53ae07f32e0152feacbcfd7b35ff1ec17fe4531fa28
MD5 53db68066c61c1d9dfcc09697d6fc361
BLAKE2b-256 7a1fae67184a82941266d60cd5a90cd552eb5e17204d7581b614e2482cd96a62

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.0.1-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-2.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a5eeeab7a13c1f6105669f68623cf32ac21840e7953173e8e2d4dd7b3e485e3b
MD5 b16cb38a539d4401080546db3c078805
BLAKE2b-256 4ee2c79f7eb60f1fef074d5f415d9e5efff7f1cfe4c7ea2f775c55d372561f7f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e649dc15c5ddbfc2e3ae9ebe8662b45edb0257fb3a4d1c4da02d455ee351a49c
MD5 52c6a50836aee20eb55cd924aae5d75e
BLAKE2b-256 2b59f621924dff203ffe3a42ff19d99b5d47e19dd63cdc0fae2cec42ab34ed4a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.0.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8d4402ae08f89117538e8715f84c8d1104302ba73d7c79401b4bb11fcc7d6528
MD5 c7f81fe082f80dfcee98a4b3b577b0cf
BLAKE2b-256 f68d6f99a0f685def9bd72ad443068226cb60a154e4e4af1f2047b33a8033b36

See more details on using hashes here.

Provenance

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