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

Uploaded CPython 3.13Windows x86-64

openbricks-1.85.3-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.85.3-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.85.3-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.85.3-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.85.3-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

openbricks-1.85.3-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.85.3-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.85.3-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.85.3-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.85.3-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.85.3-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

openbricks-1.85.3-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.85.3-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.85.3-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.85.3.tar.gz.

File metadata

  • Download URL: openbricks-1.85.3.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.85.3.tar.gz
Algorithm Hash digest
SHA256 0a1173c548dae9771dffb2bd3e39892646bac0a11772398023fdbc5078f386e1
MD5 3d14371f41ca40b90d4e2e18bc8a23f6
BLAKE2b-256 884de671fb7cbb8824f6349787f8b78cc2d4ba2e002384fde3650721e6aaeee6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6f6e821360b01e74f90440a90214f5daa7991b5a9f008edb9d428ee73c42c69e
MD5 5ae963c2ce76b77b69ad2c5fb8cfdb04
BLAKE2b-256 fa02cfc4e7f944a33368d864fc1ec15dfdfbfe240212b9d4b676d7ddf783b8a5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e577fdbf8d0635c43187e6c1d677961be438be0ca5e0012ac11cc60ddd42128c
MD5 48cd3c6fd27522a1e7f1c19a6df317bb
BLAKE2b-256 d6bb0cf629d770ea8cab95deef69dbecd65c9b77d289754db4bdf7fa5d293cd4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 083dc2946cc797ca31f2f23e0ae96ed64a83ff0624239cee2e07b207fbf925eb
MD5 b4e47dbfb3f0ad9e539d8c2c416eae44
BLAKE2b-256 faab6715d5899aa2f71f0ddd59d1e7b96e5f5e004f5567117c887b6e9a322e69

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d5afb1c673bd4bf417086408f183f48e2bf92010d54dd1e6aac3d3d19411a5c4
MD5 fd23970b71c91fd939d1f2c0bc6d659c
BLAKE2b-256 9369386a2f46e970ba5f85d8f5599b95d9d227e16b0f889e0b8b5b57b5e919a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4117ecf10b68698db926f152adacf5ae201c937865af09a83a9b9d73b1d4a622
MD5 8ef7584355ec06ada7b5d8b8e7577836
BLAKE2b-256 db0f7816f51be66c45f2b7e528089e8edbae6f26592ec9de223de0109c1d3252

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 41b016e48eca39f11e798ecf132ecbcf35dd0176cfda02726199282ade441c81
MD5 ef6d554e237d85e54250fbf3fe30e7fc
BLAKE2b-256 7c81fc16c6708fd01deae36d6257883e43a12b9785c7311757f249df1d8cc54f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 762b603eb654afa981c9471c154f0d83e22c0b60de78c3cbf1be4e75eeef85ba
MD5 e86bd77f1ed3ed1257039c220e2bba1d
BLAKE2b-256 08aa68ad553d63575126933b3bdd750896ab8cd1dccba0d146ec27d161553678

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5186e59d2cec78c005cc803b1e553db9f08b0c6f8fab34c7976d2051f4d17578
MD5 cc440b53fe59e5064d882a8c29163c42
BLAKE2b-256 08dae922c2f44bc9b65582ed7043be633ea2f3e1e121e3895f1866ace1092560

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3a04654625bfbb78f63e3650217519aba21b9dbc6d0acebde3ac032dadc21123
MD5 2f0278625f850e0d0f97efb504ad279c
BLAKE2b-256 e04456b0be756ca9c0487cbf904af175ba2c77b5cef28812c87fc5864468fdde

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3fb1199aadf319893cbdd543993b26d5c9ed3fb3277978e2c197d5bb8072b231
MD5 52ca84611e53f13235482b816c7152c5
BLAKE2b-256 cdd4986bc6550dfaa1f9c4882a65ed0ce43817de5e20e470e2f5b1942d90dc9d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d14b1897b87f71609203ed1fed7eccf50cbae9e49bf8325c9c2883d51b2d3088
MD5 2a7ff530ae9bd88a8e0b33d8b4ae94a4
BLAKE2b-256 1e4ddbf1bf095b3ddf620757094d5e952f258c1b1270bb81728ed79da7c990d3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 eaf88c57921b0b314ffa562988ea4f89dc46634a3c00978e3aa655956b066980
MD5 a9c68eea194e18d8db3cff9aa13579b2
BLAKE2b-256 326cf1ad154d4d29b117d010dc5560ee5ce8447b129fc7a4bc4be48abe5a1bf4

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.85.3-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.85.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b09a811f1b7b66444225505b3b41f6adbebbb1565329632151dd5bd1d8a5b499
MD5 2ff3237857410fb52fe97be593198521
BLAKE2b-256 b2f85a4191995283d86720e76871663f77d1575ab2bcf2d26d57bc8b47c94ff7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 172b18acb65726e0570026b6e3819bcd224417012963600490758f43ead2c752
MD5 a8d2a0f16630c9184d2f8c05c7eee9fa
BLAKE2b-256 1feb815c84d68945cea797aeb5d20bb66fa790badec6a97ca8707a158b273da0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.85.3-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fc3ab6c59d786aee07df602f736bb5a7eee59730d7976bd45dd37de0d86120cd
MD5 f6a41dd5e422552bc9f9cea0c9c87875
BLAKE2b-256 36ce6b56cce3de9a49462cd40ecc60220c70b395aa145a19c8c73bcb5c113ef5

See more details on using hashes here.

Provenance

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