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.38.0.tar.gz (3.3 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.38.0-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.38.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.38.0-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.38.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.38.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.38.0-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.38.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.38.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.38.0-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.38.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.38.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.38.0-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.38.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.38.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.38.0-cp39-cp39-macosx_10_9_universal2.whl (3.2 MB view details)

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

File details

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

File metadata

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

File hashes

Hashes for openbricks-1.38.0.tar.gz
Algorithm Hash digest
SHA256 8654189c0e93a43d2ecb66907785df6d511f03ce22198d8cb0fdd9f3297e7407
MD5 6f5b7e537d6e3a403d6506d53f323d5f
BLAKE2b-256 51090b8add9b20e397a0f446425bc48a4584fd812017e50689b65bd0d55ca7c9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.38.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6e2353160a8a7c2797b1d6d8d96b531e45dcb2787d20c12136600168df79515d
MD5 35c064e6150b2663b0d169fc008a47ee
BLAKE2b-256 d02780fc3dc32e3c0fc6f1600371cbb540c050ccdc888dace7498118f39ac4c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.38.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.38.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.38.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 078185a4806244299418f9a16156f08c9bd7a5d00192137fe978b4f81ada59dd
MD5 685349338fb6bd5335cc39a1864f3766
BLAKE2b-256 529e38e34dc44d78370e2aabe1fe6767a89d91854b10ec3f05546d0aba0a49f3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.38.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3f811cbf3ee005338122276a603262708c24d2099ac888e92794b77dc152ed6d
MD5 fee2896caa1e6ed02d55363766baae94
BLAKE2b-256 28d36ef6c5886198b900150d29e9b685cdc2072adc91a67a7c615680f7b7c647

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.38.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e9109eb4c6776e93e1bfad2ba6eec936738674e8e1446ddc52489f46a1115619
MD5 efae3f07086d87369b288a79d520baa3
BLAKE2b-256 09ccabb6f63200c011f104b379cdac83571f0232c5e40a5112c156dac2c26fc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.38.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.38.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.38.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d5ee93573462bd62347e83506f01e99e236da096d2547f85799df01cb48a98e1
MD5 4ac0fd18a7fb0dd20ab346f355fda2dd
BLAKE2b-256 ea4d8538195f2edceb72c3b1e9ff3cb40a13f57c2bcc5fd07a584003da422984

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.38.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2fc8e61157408e12ee2d6bd99cace72b920912d300a60df404e8bc84b10405b6
MD5 5e82cd8d57e121172964d94ee4483c3c
BLAKE2b-256 ccafac08df3587743d767e5a7e42c9c57ece2d4bca3905ca114c783e50ec166a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.38.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bcc1d58adaf8fb667f36a454edb10852d5795ba6207da30e8ad394fc48fc7fa4
MD5 333e8216148379f5a40fac32a3d01ac6
BLAKE2b-256 5494a6949383d7db6d2a8476985aeef47aaa132335ba59459d0b697b730e9422

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.38.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.38.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.38.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b46b2b1581168aad1ef440ab0658607e8c3a3cc81f60ae75af27333be723f83b
MD5 cb72ba9443a037f30bb890c7c9e57b5f
BLAKE2b-256 35796ebcd9b52ebcd8047db1ae0c0407c4a826bd38888a63f6af09602c470c48

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.38.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f5e70ff0c292e4e9e03cd11f51f63d795cd902dc9d76cea43376924a53ef2605
MD5 3bf55a57010b4686208de2d7d1151a1d
BLAKE2b-256 9524804e9e83074005fe165af057d2b9de27dab48df67138cd12c1dbb2fd03ba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.38.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a9d74c67b626db44a4d6fc827bf4d3ec327068df2386b9bd26a32ba54e8292f4
MD5 bc4a244639d6ca986ac73ef33c8d594d
BLAKE2b-256 aea083c2b5182de3b325512ca2d65364687b1db2c2df13946c481daaebc79f8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.38.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.38.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.38.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 59c48caeb6dc6c93563799f1eb4b920b3531cafa802e42fbf0f480a9ec534939
MD5 fc7608df84ed49ac22277d00a849fd3b
BLAKE2b-256 6bea1ef74bdb05ef8e7c2aea63610c2aaf7dd2ec493510e740eac870369f47c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.38.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 21eb30fda592c7e5f553d43dd127cd6099acff03b905de28c80d5223171ecfd4
MD5 81c53a30c640969a048d4eebc7d6dbca
BLAKE2b-256 78624bcf15a63074507fcf61fb66641eb1ec83aba0bc875046e4dffeaa49c86d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.38.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.2 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.38.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fd2e3376e64670126a3b86f5150ddebde3fe46c14424ed9c9e5c78646210f44e
MD5 042326ddcea76ae234c13528004b7a75
BLAKE2b-256 a9f7c318eb50b9bc457346a289a11e9ec2363ed3a905d966862e3ce86f2cfd90

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.38.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.38.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.38.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ea12431f17c1d4f39ca6dce5f6705f21a7d34214851c272d0d6588b0a1d7e13f
MD5 0555ef1c65847f4989c2c843e93c9401
BLAKE2b-256 b56ec4b74cd432afaf133dace9257f9420765e7432b3c999d5fe7eed9e4744a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.38.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9603d01afcdb809947474b6df2f3262ec6990b4875845acfb7408dd30687fc9d
MD5 48861c307a5bd4cb0b1b9189c385cd78
BLAKE2b-256 79c169803429e4403309fdf5a4018e0511064fe92432088ca7a52acb39fcc159

See more details on using hashes here.

Provenance

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