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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.64.4-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.64.4-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.64.4.tar.gz.

File metadata

  • Download URL: openbricks-1.64.4.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.64.4.tar.gz
Algorithm Hash digest
SHA256 7b52124d7fdea380082e7285add90d878bd5f35309004bbf75b1984127937815
MD5 e03d7a4b0c46dd7ab057b26f9d16bd2a
BLAKE2b-256 bde477e14da3341505930f1c584f78299ba38d0abb887e9b5c1d51273f1667e4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 786efc9e2ae0dc756a4e37e787326f45e37d059388bd0e346fcbdd532334b927
MD5 f1099731c5838d6936fd91a53834110a
BLAKE2b-256 2e33d1f3d9d08b5d5c3350cdb8753c098c85fa98cf6277721a7216f6aeaa1984

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9b12bdc6d90d84c904f00eb76885e09c1773545551bec0a899fd109f6dcabaec
MD5 edcaafdc0553ee710835a30710ac1344
BLAKE2b-256 05a23e29bfb3baa9ea431e015cc4fc4676a12af82daecb5df71b72c8f0b5c05e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5a41a4de0ecc3d51535f896980a2cf2460aaafa741b0b7acf2fae7c3f27f1a85
MD5 4cbb5b8c11446a4e80344f47bad61e08
BLAKE2b-256 f6d81f74c10120334f8b911ad027120e660a4c293517c39ba86ac7c0e89511b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 617cf883d07ddf489e12a7947c7e463a25eaf14fcd788df6ef462c3a55d88dbc
MD5 67fe6d8d4203c28bcd2bb467d7342319
BLAKE2b-256 8a33b9c8f7102e9a8d71b8c8bb45d87937028e73417b0d7a6b4d4b71419659ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4af947232b4b2d7a97c41d852f806f04adba31a5ec8ffb68742acdc42f28019b
MD5 dcb496f0c3b457dc984e2de293fdbd30
BLAKE2b-256 9dd781b1583ba5eedaef97cb2efc63888975a0accf7eafec8196fc3cc460801a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3c37bf67efdeed883ccd3f294e3e1978f76247c406243e90fceda6777654452d
MD5 377120118d49b1097cdb58e18c402d62
BLAKE2b-256 d4040ccf90754e9191af27838785d6fe2bc4eb6616eb572782382e92fe642abe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9c4bd947d6566546d5daf64a32c8fbecffcb6fc5c4eb61982fd18ecf2f2a7f74
MD5 c18dfdfea6881290b1f6229f6b7d5a60
BLAKE2b-256 5932e85e4ecfc5ea0515734bd4a9c64c059b5230d3a8ea47dc9398b9cb80eecf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 43335ed086d94c0e75954cbd5423ea0b9d585b73a9e381b015b3891494755b06
MD5 440858f87dc78b4c6884011a2f513164
BLAKE2b-256 c8f66df55db32a7ac57803acd7d40a1e2fe6bfd1340c63c5701caa16b9979e77

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 26c9684a6f5e5b6ab2b7fb43ab929903202ed83c18208ca531e3925b57886495
MD5 214f77fe0041a1f7c0e3aa834c9ad91b
BLAKE2b-256 32eacc1d6f60b62436fd4ac2bb3438a538274f90ba96c09c9343e6ae4a500b50

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2d9c963cb17d636197ea16f91ffea5a7e533102cd88b031ed5cac6ba7b0af008
MD5 57db3395560707dbda11c152418148f6
BLAKE2b-256 06bf948038d59a6c88ef68d263a083cf272d0d178e54432fac7774d17c601116

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ffda989cd65b08145099a61fb1c9a0e5e0fd263a251b6793725697a35004b412
MD5 c6a40530e4398deab38c9be7918293ed
BLAKE2b-256 306139fa44441ebc10f08ed1f74abd9a20b2e883540c4b09da8d0889e19d5991

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b380604700c1c4a4e69055678fa753d6ff1d89f4ac21f2f58d69076bb54e99d1
MD5 8ec99ae91e41607fe6c530db4fda4825
BLAKE2b-256 fb114e9b6c69d600d04d3841b1600e09a179ed70880c93c796a3266c0d6d9d3d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.64.4-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.64.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ef383c4abaa1ecb16ffdc08fc773c93e7d623259d2ac70be490675a9e0ab7c6f
MD5 e0acb51a61b0b3d3de0b2e61990fe7ad
BLAKE2b-256 1de8288867f29101c7710796af1920dcdd757936848c2d69e4702336a5c1946e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3d6e1ca73b6c1a26b29061d283ff00729fcab7870b362993576065190e8228b2
MD5 b8236b772bc2c8c7a52ebfab47f1167c
BLAKE2b-256 5ecdf7fdea9041311f7bd1d877949bfd113f9a39a7c580ba51461cb4be3d90ba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.64.4-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 95c74c717bcbb743e9528ec201a30b72da9a3b9ee75b2981731542b57e87d8bd
MD5 8b95ea64881fa44ca029150456e5c492
BLAKE2b-256 7260a816b2170267216748b93d735d28b412fdb3cb308cdde4b6602836cdf2e4

See more details on using hashes here.

Provenance

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