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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.68.0-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.68.0-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.68.0.tar.gz.

File metadata

  • Download URL: openbricks-1.68.0.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.68.0.tar.gz
Algorithm Hash digest
SHA256 520c3e47663210036750d871d2ffdf9116e8ac8ff2a3ae72ff51bc9abf8cef01
MD5 383895c288faaa2621254f7dd647e4eb
BLAKE2b-256 3744810a28da95e59912b5c96d55fff9a7e22914647bf82037ed5a9e1a2d485a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.68.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 85cd6688e8255bba33e6cd9beaec58821c0cd9de69841f0d6f7f718be5eb0b42
MD5 745c42654210bd868bcabe1224eef111
BLAKE2b-256 428de776dd76f48ad491037e4fdee276fc65e1d56c7d0b78cd7465a33efb0399

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.68.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.68.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.68.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d92f658728eb8103bf1adcad0173b34992867e9d5a3c8b8f0f1962f167e64936
MD5 9e57d2e7439e388bf824b6245583add0
BLAKE2b-256 2f7e7a68c6b2bb6b22b24c9f464ce2a53d3da14239fb10b1588c0305a4ea4f4e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.68.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 3bb58d577ddb3854b5e472bad072239823547b9e55a5dc7cc1834258686ca13b
MD5 29532ef4596f41b4d18adf4016d7f6ee
BLAKE2b-256 337f84cf89a7182136e3dd11d2bc0db56e60cda9a440d00a44403d797c4781e6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.68.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b6ff2836d78d9e8a72cb19112056248893894c1335ed7e61fa42cecccec3f992
MD5 686dea151340778930b13f05aff5b606
BLAKE2b-256 bccf7093c5bdf03b9da47eca65c586694f134372efe7535598b56fb1cd90fe09

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.68.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.68.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.68.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e45e12ef87a77f6ef1fae0df2b0b1c528c22013235872ae5598c29f464dba0ea
MD5 03045a8a53ca64fc49b91e9452599b34
BLAKE2b-256 5fbdc8693d702bd434cfe3f9464e5d267b65dec724d8eb3194f2dccdf6a2d43c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.68.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 fe19ac984ef3ba8a5ef7e4ced98ea80d23dc3900e1de4301c76d805b5104a7cd
MD5 b734df6cd032e0533cab8b5c352b4c33
BLAKE2b-256 d2ff34cb9b14eca60d28478d053111ee7a3dfe6d440d1406a0a7eba2c4802fc6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.68.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fedc9e2d4ebdb409e4799674e2e1cc932bbbd37e6361671419329a2c58df095d
MD5 056062eb078e0e89fb44985aa529cd15
BLAKE2b-256 834aab3f1c6d1619d793ab960fe2b231a902179dcb09b6ceb494083850665c3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.68.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.68.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.68.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 f9ae8317f20cfeebbec9c78f3b219f019d6433eb655400c967fd37c1a90b0bab
MD5 541842a7d5fe2bad0ac5fd46f3035649
BLAKE2b-256 f687f3065d0b6414f9cfd68a750dcd1385c92a85b32076a5e40e3f230971f17e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.68.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 01726bd934c0f22db33a2e3360d9d8ff41d0c7b05d38b4577f521d462c11c191
MD5 9c402419a1d6e42465981ea8652f0e77
BLAKE2b-256 b79db8d4abee8324c83247a41975bfc3ee5e0d11b81f3650609ab347c11a433f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.68.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b259497758c3a8ed07ec31cb55e64547dc8236fd91cb84cdfce9c007c2b5f6c1
MD5 4923fe4ec26f658492660250d322f858
BLAKE2b-256 4d65ce251ec2b0fb678a2a899e9bf5750c4a1577da10df68a4b783f5d13f2f25

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.68.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.68.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.68.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 664fac7c5e3404596e61ae8300dbe4277bd2584bce0acd26359b5baa68cabe7a
MD5 a391d0367c0a3285171b8de86605db9b
BLAKE2b-256 4bf888ff58e528599e7ba477157b01a166742dedafa220fa12c9c0c3ce4423fe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.68.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 780e1cf13374fbe187b97b8453a2e26f3062d4e132fbf51698170e9125eaeec1
MD5 b8f6b5efc7383bfa5933e644d58c4aa6
BLAKE2b-256 621fdcc902da0840e31d651764f957ef645dc346252bc8de3486e89ef10c38e0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.68.0-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.68.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cc0bfff8cc99cc2fcb4cdc69dcad089102d3796a181ac88d1354c68dbd5b353a
MD5 cef34d8ad841bc8e84fc0fd9ed4fba13
BLAKE2b-256 6b02885f51aec680a3fb87986c4ec96b621d72e724de72efc06bb54f650c42fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.68.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.68.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.68.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c79babd9913298e69ca06175bf459ce861c78dd67ad33d5622214ebff5730704
MD5 c02cf76bde58046435d0f88aa3c7a047
BLAKE2b-256 ad84d7aced8b9e43444da2e9fcf3ca180a68678bd61941f6fd99b00b511ed561

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.68.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 259038448ce4f7321a52afac908187b15a16bbbbfe23f7cf3dcf79401a31f9cc
MD5 bf1295270fed63facc024d9be1bb611a
BLAKE2b-256 67db77cf803eecaf5fa431add92f2588caf4ac891403ebac0c05902bd71c2e25

See more details on using hashes here.

Provenance

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