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

Uploaded CPython 3.13Windows x86-64

openbricks-2.7.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.7.1-cp313-cp313-macosx_10_13_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-2.7.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.7.1-cp312-cp312-macosx_10_13_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-2.7.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.7.1-cp311-cp311-macosx_10_9_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-2.7.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.7.1-cp310-cp310-macosx_10_9_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-2.7.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.7.1-cp39-cp39-macosx_10_9_universal2.whl (3.7 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-2.7.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.7.1.tar.gz
Algorithm Hash digest
SHA256 8ddb4989a21f3b72ce5aa18c2577ad6604c6f5b0fe8dbfec51659d5c19e63885
MD5 6e57b50c90d93580bb0aed2f0f732e88
BLAKE2b-256 41897c2511d27aa6c8d1b7a76014d003dd7998097f3a45ef31c8316213c61bdf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.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.7.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9fe8df7c36ba86257f6ce00736369902fa971899f330d919a8b7937254995e4f
MD5 4586761027521d7cb948ec04d80569fa
BLAKE2b-256 fdd4e96a75ffa3400a4ccfdb4b4a408630853fc3ef49ba425ed73a451810113e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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.7.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.7.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 51f005b11eac269b0606a867093547cda20214686226dd0e102b4df1c69cbdfe
MD5 d8c5230dcba37a35d6edea3a028fda02
BLAKE2b-256 7fb1af4f924857d38532c78d87b1183ca88e730261c09155d5ac44c84d1d97db

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5e9c0a23b68be56d8d3a1116917c1ff57bbe70cf1679b81541db862a52565898
MD5 b605891152c800190d738939e66fb7f3
BLAKE2b-256 3207f894e07d1140da2e2495b0e334816c4db85913da901b6540220cb8bb68be

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.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.7.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d7bc468edd9cf6f76d816cd428248d9de8399fdd6fd07e58399c34c5c140b721
MD5 79d1592ac13337b18ad52f1cb3da4500
BLAKE2b-256 fb2867f50639636ca3ca112ed10bfff9df65e1f8284e7e81265ac7cff69be99b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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.7.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.7.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7f99373bd604299d379575106b25401ad6ea088912666a8df3d827d768cac08c
MD5 4d88c3b12114fe389f5e474b4b14135e
BLAKE2b-256 57c55f26bf75f6aedb3450492eb6c6115855287812a18a8dee9755b601ed378c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f36b0eacc1cfd6558030fa07e12426c4c303ea3ec9a24d888dd015558b5e0fa9
MD5 0b4e3a3e973c395f0ed797072ee02ecd
BLAKE2b-256 0b14b78831df25f73f329818eb27d9a236a1d703b3e0964be11a932ce39ec6c7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.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.7.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a3d87e0c59c002845a9232f15405271388a825d305ccceb5eccc99a3988d7b8d
MD5 d3a0d95f3d5858d3382f7592dea103ca
BLAKE2b-256 82ddc7f6dbc63ebabccdfe7fde8d035f5db5d844d2381318d48dc443235b008d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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.7.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.7.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fa255ef6df67f40670cc13a033806387cdec8f8c2946fdbf17c1a07300287720
MD5 3aed21d665fe98b18f8eadbe02f6eb7f
BLAKE2b-256 214ba1aa3c08e5238ef8950620aa9744a9ceb945c909e302b93b78f50c954225

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b40a6c0af13b15c582210c690eb366fc356dd03dbae9eef5a8affb96431e2ed6
MD5 53acc8968e0322679167e0a1a06970a4
BLAKE2b-256 95a050b21236130bdb2af1b2d7d9ceee2a619b5906c71925500cbb7915894b6c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.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.7.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1f504b448f2111be26e5f902569854e5cccf11e81874c2681cbc32edc87a27d0
MD5 2f769aacc0c6a856654b18e40cb58e25
BLAKE2b-256 e7d53ec4af5aadb9b426949efb9f2a8a6822e7dfc98f02cf40ac52567a1f57e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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.7.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.7.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 770d1e7252f6c31a803c83ce7804d8a35b56e8c352d84f0bee976ebf723d6a7b
MD5 e96059d324ee1b53927c522f06ac3b87
BLAKE2b-256 9306950bb4b0998504f6dd3242d7ec41f5df399f1e5f90ab816af2282f221f18

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 223d8b6605a6b0dc18c8b698f2e49f5bbcdb89cdfc512791b75aa5ecfae671a6
MD5 e4f356d122bafd14df9ad0126dd42773
BLAKE2b-256 87121f789c5cac8156b81cac986df9e5d3cc837610331ad8035c7c945b50092d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.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.7.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4127bd9610120c19b2cf4e20b7e836161a843dc7da5ba50b8b545e4d8e7f60ad
MD5 793378351491b4c7f62f68e48d377445
BLAKE2b-256 2194a019482a20f0182f85835e111a178ca9d10e590da5651a2a3240833e3cc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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.7.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.7.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e8c500b22dff2c04273f38453623bf2e2b276afca8c45f636d1f85e9244c38fe
MD5 5de8d0e82f5176f7016e77f02407bc7b
BLAKE2b-256 6b244534468f9d9efab7a39e52ad6b62befc23f5d7f801c6bdcb89b10d60d8e4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 be00ed6cbf52c54088e907b0cfd5c9a13360178131928cffd245b172cbf1357d
MD5 2225f6b3a23b08f6d1369ce3728fa54b
BLAKE2b-256 79404d864dab6db0e5f90357cc23715ad7368895614fe0817cf3465902e94f2f

See more details on using hashes here.

Provenance

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