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.50.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.50.0-cp313-cp313-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.50.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.50.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.50.0-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.50.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.50.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.50.0-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.50.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.50.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.50.0-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.50.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.50.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.50.0-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.50.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.50.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.50.0.tar.gz.

File metadata

  • Download URL: openbricks-1.50.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.50.0.tar.gz
Algorithm Hash digest
SHA256 7bf8f8b94df08dcfcaaff0867128ba52c1855cb5b6771c2b41f41d5902910ed5
MD5 d12fe0cf8000b6d8b1d2bf2ec21e9106
BLAKE2b-256 d3a9029c7a74299db26b024d70f93c7775a6210fa28043993e25941b90ab58ff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 264d18fb74d332c0023846758c369d3b659dc8127df36cf9b6c40263494bbfd7
MD5 c4ccea7ed03076007ae069b08d1f7b89
BLAKE2b-256 c8916aec498e2e8412d83cfdf824ea4e0b4cef2cefe022d57b9b82cb068701ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.50.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.50.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.50.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bac9df1d6f8680be943955a069e69bcfb41355c2e861fe050a4331909b645d4f
MD5 e5eb5b13eb3a6fed0c2c1e67a75661f9
BLAKE2b-256 58d92afc1ee14e4cbc3611ec58f0ae7ed1c2cedfc1093b743316037b74f79022

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2e712747a72da3821a0661f96442bd3bcd417c666b869491fa23a38463fa402d
MD5 4d35db55ebf7945b9b481122902328ff
BLAKE2b-256 76aaff1a176b703919b6b9fb33cb345ac377c768c624ac9bcd10d337501bfc2f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 69ec8a0ab2e4be50612a01911a8ddd3840b687048293427964aed4104add1f86
MD5 489995f17f7d968131093993a5617d07
BLAKE2b-256 a257d4ca056c1eed7ba0799b1c0653cfd1b316deffff4373ecc9326c26f417a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.50.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.50.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.50.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d82fd2bf5d084ccb702bea6f970f21b27eab5c2adb85b929a5622d19e216beb4
MD5 b2b1aff05cc1d82e4b3abcfd17809b1c
BLAKE2b-256 1d23fb9c9402f90afe00cb817119923fba2fa5890756c1dff1f48d0be2dcacd7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 581217d46a81888c7f125d3a47ba34eb0885b2b1a8b9e14c27cd1ff09083319f
MD5 af63964bc38696ca28bc1f3331345857
BLAKE2b-256 4acd2e8405269cfc07571d557364828118cccc99e2c1d1d4b67c06f617aef068

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b81088509d0a23d79d43745e6c854f0f4944cb19d526e990ca81b81206770542
MD5 b17b7a90e20d85c7ab177b327755d124
BLAKE2b-256 cff196d24bc59d99ec7685e10d9341ddc45e7ab321836b3a3d3eb991831f043e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.50.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.50.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.50.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bb226e72d52471cdbabebfbd69da6d1b3c5aba32465998d25f0c5939e84d72b1
MD5 fb3f2d21dee85e2c7353a76b3201d797
BLAKE2b-256 54894c254085e2ac2931e193828da47b45a345a2ea7efc651d1d94a11359365e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 35fb4a881fa85deef2dc5050e2ce9276e642ac205f637d9ad5469bb160ffc350
MD5 cfd1f63547f543f219ab81ca6d2cb3a7
BLAKE2b-256 7da593b5a6fb05e9b09c49c915b16014a84629e256e9bc310e8030c89596f638

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0ada5bd92575e8b8e6e03806425a3173bc85db256827bd25d46e972fec1ad4d0
MD5 05487eff57b37d0a78f2ab4e66afb6f5
BLAKE2b-256 21af1dea444b725746fd0002ae59b20b65048f698324be17740b57aa0eb5295c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.50.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.50.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.50.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 da27b6061369edac39c61250e7e74121c9e1ba5766881e42e8c82825a25626ca
MD5 ea4bd68c26878b9b7f6adcbf6d8d91f4
BLAKE2b-256 7e293ddc79d00730a2f4aaf68abe1d2f39e6552f96c7b618f0a0433104a288d5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 5ad5576ca65b0dcbcf2bcddf23d5333a01e79c3987c03d214f710ba028a3377c
MD5 40000c90672654cf62cb2eb3b76b73b0
BLAKE2b-256 26c1cb659ce44813d688ca0832246e45192d5e48b4563e97248f1fdb451671a0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.50.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.50.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ab7aae34c08cd3cece8aea30112be8c31b81d99e2738425a427b92a2496fefb2
MD5 5b53d84b6521e3dc7b2807b609945b85
BLAKE2b-256 4f4c01602a92df5106384a371c37e082072a024473668969e24d22fd52d9f61e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.50.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.50.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.50.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f9b6ed6abe954c5bc6524586e8570c4ac9de9b4486ed5d0443bd897d979a735e
MD5 565c4126fcb8933c3662aa830f50f19b
BLAKE2b-256 f7746869daad868a24ffb39c2b1b95f2aeb6632f22763d1bd5597783d79655dd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.50.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c4c893a7dd41f1c7cd2062aa74dd1cff97e457da26903c103222fbee3e558f30
MD5 1d98f237bd0660c8f21c247f9c79658b
BLAKE2b-256 990226f888ba9a3ad518331486bd7f26f765cb449e9ce539bb77f1a0038567b5

See more details on using hashes here.

Provenance

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