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

Uploaded CPython 3.13Windows x86-64

openbricks-1.95.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.95.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.95.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.95.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.95.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.95.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.95.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.95.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.95.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.95.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.95.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.95.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.95.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.95.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.95.0.tar.gz.

File metadata

  • Download URL: openbricks-1.95.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.95.0.tar.gz
Algorithm Hash digest
SHA256 58ae5acfb9ad19da0133f95462135df425f64f08959e04c2aa6f7cfe536e9573
MD5 52518b903e9f135a67eb90283dc15f48
BLAKE2b-256 8718f6a76ce08aaf1ae409b9e5db7ed61df167e7c98d4470bd69b9c6cc477134

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.95.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c1a1f074de14eadba021739135428e61e46e6cbcf816fe589fd3bd5e5a1b6f65
MD5 5193869e2b454711604e864e8273c410
BLAKE2b-256 2ad0caf0b64d55b1fbd2a4ca932434e33f0aa24b91e5bd5a15534ca39dcd269f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.95.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.95.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.95.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8e6e8e283f25b004120daf82ec9723054f9ecacf608cfe8d38e2d5dfa3f47afb
MD5 33aa621cfe043853146c01ae934c2c64
BLAKE2b-256 6bd514f140efc22af98535ea72a28e8c0a427bcbbd77fb57582c6e2974dd562d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.95.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 9ded38aa3e3cea1ec57abbe38c4a32205ae49c94aadd3521e87c094c9bbfe4f1
MD5 ab9397eeb1bc38d8c5737b6089f708f7
BLAKE2b-256 c06a6ead4ef3bddae36ae6332932353da5fe3895faa71d3d126b1b04ad4a1aea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.95.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ca5bad938a18f0cf0b3effc125fcff8d37367761fb78e06670dc0dfa356eb498
MD5 833b9a63c292efb46a3b03ab4241f19a
BLAKE2b-256 87c412bdd89847d4e6068105c2c44f93e1fb6dc8e154b46c1d3c3bc5adcb1111

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.95.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.95.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.95.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fc2ea32bf57876fda0477d6b33134ba6e7ab9ec85f22ea9bcbe8a48227356101
MD5 81cffe864fd626d13376aaa9c88eeb65
BLAKE2b-256 2b4682dbdf1ab2bb7117df089fefc799cfa172b010112d6c558f10c8ac5697b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.95.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 78278cb548b91fd97f345a2704991257eea2ae6cbe3dc4faa837cc1403450864
MD5 3a15888cf2074a402bb401273488ecd2
BLAKE2b-256 d0fa930daff2e0460f8198b52ea35d9961ea82e2caa07204b807258c1288344d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.95.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b8a8a4289fb24c4ce3e5746c288b103232554cc70acde3a8b842bc05bb7c7840
MD5 34c6a0861acb349236827289bf42fe4f
BLAKE2b-256 f71c08e311bc6ff887ef0dace7b5419e4caae3e13210224b1eabfb98edc0ceb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.95.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.95.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.95.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6ee7e87c00058871fc880416cacb6dfa77ee0dc8c55a9fcd5e494340c99fd3f6
MD5 dcbaa4b4e6ae8b35e0109916150c9244
BLAKE2b-256 dc4fd9690949b0a54219113bfd83aa3d93d3d1f47d32499b3c53c51f51d83a8c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.95.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1942d7ae0c4b209ca1fabc403d017a0b67d2bdd2c796cbafc0a548751f7dde70
MD5 b4bbfc32dd4a2f506225c70523b6fa86
BLAKE2b-256 1d0cf31d0beea7e08156a4a93e92554dc531b34c702d86ee9369d44525cdc0fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.95.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7ce91e1f794f8196c0ac08717cb48c22306b840ee1994186e17821da471a5792
MD5 175c04fcfa32526cedf64ab5aa500b26
BLAKE2b-256 e3cc2fccfb6d26172301c32ec346403d9fb19f5c1dfe8032dbe933e30329c1b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.95.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.95.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.95.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9561eb316d065625d020cc80a3c48c6f74c87d68155a2b7de373e33ea91c95e7
MD5 e083e5ae2da8902296246ef090584ba3
BLAKE2b-256 dfcad7816344744a52a7864cf92166886797960363ec18300f3fb21ee29e2800

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.95.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4913616b893a7d735b19ec13038b8602e9d05978c87f0d67f350419f4d6952d1
MD5 ebdf6d49b5d25f6923b8ebcdebe30729
BLAKE2b-256 15f3b8ac518098754bc17330b072740fea7d49d8e3d8177a26df81209d269046

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.95.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.95.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fb28628e7c210861023b9916808090f28cd6b491daa0eafd179834e65fd2862d
MD5 846f20a810fde90a2e18978e2ec3fc94
BLAKE2b-256 73ae9d6af8debd266886cd4124b2d2f9ff1120e39f6fec78ea8215ca21b5c61f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.95.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.95.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.95.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 88fdd119b683d812f4436952c34017f729c0c615e901f830b02054ca6e46970c
MD5 02fa7b6d424b1dd9d96d00687d7cf126
BLAKE2b-256 1b15a46ad7826c4c9c58d43d09fef83f69c485aaad5047cfa3c533c33108cb77

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.95.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e452bfacbf108b7ca84d72bef3e47e1c906d7df6e506d9751dbc5219ad55b95b
MD5 9fe399dd64a9ce9b4a02df990baa2c2d
BLAKE2b-256 9fc06af2788ff9942e896c525ecd44df664cec4333deb2df15da66ce78627a67

See more details on using hashes here.

Provenance

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