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

Uploaded CPython 3.13Windows x86-64

openbricks-1.69.2-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.69.2-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.69.2-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.69.2-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.69.2-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.69.2-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.69.2-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.69.2-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-1.69.2.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.69.2.tar.gz
Algorithm Hash digest
SHA256 be07141ff41868355da5e140c41459d1c0ad84c560723e9056505dff618eb5af
MD5 fff45f52a2484e25912803964742da60
BLAKE2b-256 4b13bc01e6649989cb30c2e5ccae7dbe39a18da66ce16f006437462279fe2ef6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0e64b669fb59be4c24b18febf99b034c2b7984907e89496018d499c5a876ca3e
MD5 4b36da126ca365e6de41eb9c3831a8c0
BLAKE2b-256 3927db846dcb0a24814f52fec679ae22f27ce8fb649b8c9bfeb990f8a84f358d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5fe14e496c05d518cc4f2b752445a1b3e45739ae1a5e4a42acb20f7c8b38aa53
MD5 8ffc2107ee9275b8d51992f8649a1d20
BLAKE2b-256 cefcd75052b4222dd296cc76a25d8fe9b0569cbed2545fdd9ad521ba185e41d0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 119d1715942d6e5918295d73708bdf954717262b99ddde5090380321f58dcb07
MD5 2b5c20afe26dc29f167b22713f57388a
BLAKE2b-256 eaa2c9f8d30c5d8905ce65f492d11576a9b4f166d2475c0a1f714bbe3f863172

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 42de237617c3caaaed37fac67609161eba03c8a0f9071b194c4da7d4966edbb5
MD5 52575a7fee733c5d6f3fbb0c09c8b223
BLAKE2b-256 9ac97fa24054123c59bedaf6a779cc54f69f35a231ceeff24974bb056782fe2b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9176f3860722d236e74ef2d91288cb8e8ccba9e385a419b2a6cb95d9f367b07d
MD5 fc213382f9262f4baf95a1f5bda1dd00
BLAKE2b-256 3d422dc37c6434cbf8688ecf2ed52d71aa66fced3aa8511172239d0369c38751

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b8a37f068b0311c2e6e7470fa486107e38875e98d19198a3c1b2f8630ac63a0d
MD5 a6b0c9c54e101a857a4722879532cf6a
BLAKE2b-256 5d153db7a6bc1b679cdfe0784972411f9dd721957447f76c77dc24e2b3eb6899

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 342d97a87d23153708a894207462808ef9b6003f9233d7b956610cd61741ba8d
MD5 4a7d7f573a9074ddbbcb424d26417649
BLAKE2b-256 438ab7c48c69a5ff6469837a6b9823aabc8d14bb15da8ddac98dd63ba447bbfd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ca0f497449b77f670d5fc1cb2834942f6d9ca13c607ca5e2be139147937a6b73
MD5 2ec6d51f0c21c9b6da64b3309b9d210e
BLAKE2b-256 2c754e3ad24fb8d6c7123b8eb0c0b8a33ff61521187ea6ab9f2857da98acc630

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9ac67f55cb64c4fc0347cb4ec9c46b7221ee47f04d82dac05a3332917d1fee0b
MD5 26cef66cfe30c71d29215243f40a0533
BLAKE2b-256 3386c54ea917b74eef58f04d336d8c212e411de18bd785a3408c860521766435

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7af9b2463eabd01fd97a365229489bb6122e140b8cdfb984749af581301d5e15
MD5 2c2159d2f5fff3c3dfa00f6e348efdc0
BLAKE2b-256 66bcc41b5dd3a53479fefceccd2443c7d255f5642c428ce2b15427a6d2a0a813

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d9fd82c922b2030fa08811c1f1cbcfd3d20b2c0d7026054d87280f15159ba183
MD5 59c4ebc86a134ac4ee42c3c321253525
BLAKE2b-256 a99e486a9f36ca8eefdda49f4129ccece23593ecbef5e3f855844545a0810f69

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d935cea9ba47c9d8851b24c5b0d521d838bcfcb3cd2344b48f9e078d16c54cc5
MD5 50684f827b712e14642ccde271d0be89
BLAKE2b-256 e14e9d671be18b5b1df89d4b22e46baffabf716478380450ebb602fdcc9ab128

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.69.2-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.69.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 349ca5efd0045b6883230027e0e1da5c064662739e9be00a78f5953650975dba
MD5 03857ffa73282e88578d65caecb43835
BLAKE2b-256 3f779b2cd5c2c84b8fa9130220f8b40a073c183269ef43bb7a74b0a34596d811

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5bf951939f611762e9f37cc320908da8e4fcc0800fcfb9aab3bb5fa06be72678
MD5 3db110d2f83a92e0fd98dc3e7de9fc06
BLAKE2b-256 1ca8af03226afee98618f590dafdf9642c912e27dca1d2f0db1fdd8f020aab52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.69.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 83b6f82348e397bac038b511797d3bcb7c28f344809a95b0ff047a16067088bd
MD5 2910235ffcc573ee180da670f305dde0
BLAKE2b-256 3340275bd7af3e31c35fa29c5e266b1c352c3234969a64cf2d395f269396ec10

See more details on using hashes here.

Provenance

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