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

Uploaded CPython 3.13Windows x86-64

openbricks-1.90.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.90.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.90.0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.90.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.90.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.90.0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.90.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.90.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.90.0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.90.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.90.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.90.0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.90.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.90.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.90.0.tar.gz.

File metadata

  • Download URL: openbricks-1.90.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.90.0.tar.gz
Algorithm Hash digest
SHA256 2e3cd49c7934c67289d4fd0d6d433b586cac17ac5bcbdd22866a55945383318c
MD5 ee0a271ac79cdf583d3a739a2e51e503
BLAKE2b-256 bd81c5943385f0aeaea4ae408451dc762576995b5b60159b6e97d8048cb0ce66

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.90.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 236e726c65802ec8ff5762ae6174b008f973bbb01fae4b9cf1243c3c7ef64bb2
MD5 83de9849402d2cfd4b49fcd60407c302
BLAKE2b-256 7a0c8a8166a831fd4cd2fb36bc9439c21750f187ef4410e71493d98cfaff3dc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.90.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.90.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.90.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9bd6bdb2901cb4bcf7edab323fa97181f7c110351c39122a71d9ffd898b14930
MD5 826bfeadf26898e25893edff61962380
BLAKE2b-256 ab707f620f9bdbd67735a97960b439841ac1fba60dbcd71954513f830dd4970f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.90.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 b4c3a7803dc9697772e441f47c4710d2cc42c2e54ceefdf75d426dc0683ae5f8
MD5 59f371707e9ba0a98fbb5410577cb698
BLAKE2b-256 143b5b63d573cbcbb67851afa92e69ee0c16e279f12a3bcb312b6224b8c20482

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.90.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 05d4090206a7781265e7013e85b8d6094f2dac50e12153e32cba044348393383
MD5 cbfa3dd9f6f8a88572947d514e0ad518
BLAKE2b-256 3e694d8e53c2c1820f705252683116b2cfe9ce1c676df3b2330a8daee8ed6898

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.90.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.90.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.90.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 065278d5c0219d3d45993834e5527ce983e2f7fedb0f71d1e72b2e2771be0c72
MD5 3151444b8d14bd4f8fb2504c5a80bba1
BLAKE2b-256 4c7115e6a15b4bc865f07ff13e7de03a26866b79375315e8c97b128d8c43cda6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.90.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 a022d3b6f2804de468bf2c6c3f4a9f934367140a0605cc177fe7429ee3641df1
MD5 3f9a69e93efeecf5da75d1e783beee25
BLAKE2b-256 aa78546f057d07ca62c02788bffa4035bf920147035343074bd3ab23ca7dfbc2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.90.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9f7e3b9069fd1f774ae2d1a26376132de55163c165f09d8b0b4448cd9df97bc1
MD5 fa9011129448122f5e814214c06a2965
BLAKE2b-256 81a92eb8caa8b5e723bab41559b532a913e13d1fadb36a94e775a33e7a842fd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.90.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.90.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.90.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 65f8dad91ade5202c104fe0a8082d53cc34280e60aa3bfc75a914bde036579b6
MD5 a27f2e2f72e4ee56712d08d3b8e697f7
BLAKE2b-256 623ab2d36268b0ebc810becbeedb2b2e5b7a4d058a7addb05703faf72a0cc487

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.90.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 19bdc3277c47be708b4fdede09a07d7023a152bf0fdb14575da743bdb94eee04
MD5 1f11b72fa9f2eadea9b02283de6ae7de
BLAKE2b-256 d21124a77cdb76ddd717629985a95f66b231388de66066b24ac94f393219666b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.90.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e446eebd05f24aad7e74f664b47daee89d941fb9295aaa5ff483019b245ab37a
MD5 f9627c8cb64bf55d2f009c90a18c45e1
BLAKE2b-256 86c0f94abcb2c0071eee2215399adf3fe0f02a50f4680eea0d17fcc49eabe6e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.90.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.90.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.90.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e4f1aaa6fcc4942e1f2a182a908e449953d98601ce8e89d14e50a0c5afa6f328
MD5 fc260168b0f1fa8c39cf993d896ca80c
BLAKE2b-256 67796851f68d2bc4f98a1e997a203dcdc6eb35645011c019e148f49d14f0b182

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.90.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 082c1b4a425dfc7f4f113878e1da566fd0a5e23853d048455faa8bbd48fe5c70
MD5 ad3796abab2e224138da082e7d36326c
BLAKE2b-256 dffa69cb45be10d3a95cfe17cd9cd441aff935904f213ce70ab6aebf778d0dd7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.90.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.90.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a473381cf26664ba88a1bb640d05c355b966fd9ff4895878767963e37ecf4c80
MD5 2ff87ae192d3424e26d52c20b6f4b416
BLAKE2b-256 2f0ec89f23389307a00c74b5436e00891b9e11b8efefd995f0b74bd922fe853a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.90.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.90.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.90.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0e5bd855c2f1ccd1a39519f4b515f17d026a1d4fe6cea9f2c984e551992d0a48
MD5 fb129eaab6abd4d729abf574a808ce2a
BLAKE2b-256 f9defd3745f25275d85a93626270dcdf9e68a3bd0f127b2d4da4a7e80f9f45da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.90.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a5a6a1c1b1a82ca4bd4606d7eb1c79b456350c127203065a44cc52309e7b541e
MD5 1753998de816a0fcd89d259d25ac6b28
BLAKE2b-256 75bad025b285a5d26dd0b42d2a9085ba2087d7a5efcda6fc21d3a309006a25e8

See more details on using hashes here.

Provenance

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