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.66.1.tar.gz (3.7 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.66.1-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.66.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.1-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.1-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.66.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.1-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.66.1-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.66.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.1-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.1-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.66.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.1-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.66.1-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.66.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.5 MB view details)

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

openbricks-1.66.1-cp39-cp39-macosx_10_9_universal2.whl (3.5 MB view details)

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

File details

Details for the file openbricks-1.66.1.tar.gz.

File metadata

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

File hashes

Hashes for openbricks-1.66.1.tar.gz
Algorithm Hash digest
SHA256 fb6384013a4720100b1b225b87fb7dc8ce8e22eed89eb72caba8212d670f6f2f
MD5 a13e9d4ff6cbe04a60326f81e484aa53
BLAKE2b-256 0c59d7aa6d389bd0af0238fa5cab06ad75c229d888051c09600b3095dcb01df9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f9528abdced229d11aaa4a5422ac06289ce3ff02f712f34372021d14b795cd5a
MD5 72291e0e6100b6dea7995178a65b3032
BLAKE2b-256 2a56ec7f39e2d9b81cc3cc8fdd2cb7a1bad2d37b54c093a22ced34b6ba6699ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.66.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.66.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.66.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 004afb965779f5715f376eeafd498975bb0b313772da5a8946c9283bc725513a
MD5 89b900b22a291d1c9163a4180bbe52cc
BLAKE2b-256 393a689e49f1b81701c9848d52f00d2f2ec53c91beeada7347a086f1a4441b4b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 509d08e81652028dd0a43ffefedc3b159239e6b23f99c46f119665a6d9a76851
MD5 586a9dd45bff6f8acb40418f734f8d89
BLAKE2b-256 ba3eaf8bc7c7f49d9465ca983115a99c99187a910b8977bebee56a4ee005695b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0e4310cf17fea1cd4a9596f77fae8bc37ac068f3cf7287ffb35561f91368a1e0
MD5 45cbbefbc7c6c0a3737c281445ed49d1
BLAKE2b-256 e516fed91a98411a2daaa96394217ba63a8127b6c5823033a5b94cae5a8f2f21

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.66.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.66.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.66.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5df4fc46b69abd96eea36a685b66afc267625f3e44492cebfbee67e1e2118f14
MD5 858bd2e20572df1dbe6f1615bc6c8294
BLAKE2b-256 0398b6b45a89a45fa235821bde7ce5710c8bf6f24dbf70a138dff0340fb2c29b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 96d771ba408f42c3f15727695c395c0045eb5f02b7be21fdf5d34b50e44ea41b
MD5 5615845829e5a7c7d2d7cdc530b8f24b
BLAKE2b-256 62a748d42565d7eaa1420ee29f505048362ccdf0ab61753ea156a109079ec168

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 73b7b748612522cf209fb0860a26205a6f735f3de0ca638838ae408562884464
MD5 be336b13a9f5e15107950a890f4f4a41
BLAKE2b-256 312e47800c6e786aa7d3c76ab0ea62c17ffec648032261e7ae73cd8936563b29

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.66.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.66.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.66.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 92c1e1bd5ff6864e8e8bfadadeeef290ba95511a218c90678b632f7caadebb44
MD5 1ffa9ab009fe92f36d320716438da59a
BLAKE2b-256 01486dee0d8596f27cb1f686dbdb62551590e7ec29cc4eed507f76c068d57ddd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9d552fdc89200428cdca4f8d0df920143bb7343907cfff9279bd75b395eb638f
MD5 b06924125a4603d636c5a24366f9a5f4
BLAKE2b-256 886affab5d8c78bc1a0d1c0014f8f72e14be83960dab7d83ff18289a2f027852

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4dd02743238cc9a3e6d262dc2bc00909ac91daf3069853ae639f3e7c04fc5f6a
MD5 291d62836dcad951c6f2abcdb76af3be
BLAKE2b-256 a15af2fb5145e326f2d87888c00c5702d5f8b3ce45d198e6374aa3571837d7bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.66.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.66.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.66.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 92d1d205ab6165a468da821b541a12436f0e40c2d55b8f4feffa44a205e0c5ed
MD5 fcb51e8d3d40bf98e50115511f26fe77
BLAKE2b-256 93f25f02036303d79b9b0d65004d503e82a32cb5e5cc9c1aa5bf453fdce91525

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 64ea83d3333af9c8daeeb366926933f1ab087420d21893a0f32365dcccde8c4d
MD5 f2054a6f5a3ceb3d426331ba86f5586c
BLAKE2b-256 34f2564011387c65869a1d7f5304246af0fd9f1d8cae76a57307657d6d738b78

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.66.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.66.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f4aec0c6ccc36c7486f6104527499de6b53a0ca2c154ae439a79da184b93b047
MD5 75bc0e2c5968d55d485dc3d1094b88a9
BLAKE2b-256 a1b72ac7b77fa7a1991660e44306a5380222664b7afbd0491959b7b474f9e711

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.66.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.66.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.66.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3a58cab38ff2eae7019695a596700e364d6d2833e7f290c1de11a5674724508b
MD5 0236a7bdc39137b69525b8e87e8bfed3
BLAKE2b-256 616502e20ed2adc51b55c69a78e6ded45ad925b1ee8c8b6abedc6b7a2fef0feb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.66.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 dc90a99e46dfa58c88c1aa1ba7b082b547394f5f95c26fbf4d7c2fcbb7ed565b
MD5 9b9258cceccb92ab121576e41811b647
BLAKE2b-256 32444e321309b5e207b1278f310cdba36df35eddc87b22d90d9946965657255c

See more details on using hashes here.

Provenance

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