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

Uploaded CPython 3.13Windows x86-64

openbricks-2.7.2-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-2.7.2-cp313-cp313-macosx_10_13_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-2.7.2-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-2.7.2-cp312-cp312-macosx_10_13_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-2.7.2-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-2.7.2-cp311-cp311-macosx_10_9_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-2.7.2-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-2.7.2-cp310-cp310-macosx_10_9_universal2.whl (3.7 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-2.7.2-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-2.7.2-cp39-cp39-macosx_10_9_universal2.whl (3.7 MB view details)

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

File details

Details for the file openbricks-2.7.2.tar.gz.

File metadata

  • Download URL: openbricks-2.7.2.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-2.7.2.tar.gz
Algorithm Hash digest
SHA256 68c6196649eeaff2ccdab600a65d131754e317a6e03c534417bcbb037613a00f
MD5 bcec30ed2a4230a28be9c61e930c8dd3
BLAKE2b-256 2ea6002c1d13733682ab54595cb49d330eca84e824b24621d6adec2b96228962

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.7.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5af79cfdeb50d57696a5229f0fa6737070389d9bd4d05ad49bc64313e57425e3
MD5 82968839d418db3784a79404ee649f94
BLAKE2b-256 4f54f4a885ff55d594dd33b96509668f868047d78364d8ad0120fdaee9f880d7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 80f2b22ecbf6391612f7989bbf4aa065e08af068ba3fd31f38f838d3d4ec9ea4
MD5 08da98ea3c4b9aeaedc16e2f63baa33a
BLAKE2b-256 535cd8917fd5126244c609d758030d7cf0b6971195400a461cc73c8cdd15be7c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 9d26640409742ba47760c54231162b149f4cf48cfdd5fc93384f3cdad1975de9
MD5 79a4c5c90e9dca47233ddca594f298cc
BLAKE2b-256 c6192a5bc8b279a373f55c5dfb5f04a8fe5d97a4a9d146f4465f62cfc73f05c7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.7.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e25e2e5451c9a53f945412142912dd13adc635285b1eda0a9391bbd54eca74de
MD5 98603dcbdae5bd3258e5c89aa38e90ed
BLAKE2b-256 adf65536d94684c6ace25b93873ee035b5c3a037e2b1f7475de0e5f236ddb0b4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 967034f0e4c617e6a9b1af9b8bea4ade3c978da1e13314721202ef527edf0dc3
MD5 07447d67922919321eef3c34dc9b61d8
BLAKE2b-256 4d0b3a31e2b9ba7166451b27cb93d11efc3f84668cf47086155eb0249c66c10c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 6112f54e352cc61f8662bb015506c380249f1d64c09f4bdebbef25812e6cdb7f
MD5 1749792f955e49179c83981c09b21679
BLAKE2b-256 85964e6a94a581509b8608e957748ac3fbcebb6aa0198a43b875149b3f459183

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.7.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7f63abe4a362630c9dfbb4d459641b9aa0e8a99e6784a595713712f86d80aebe
MD5 05608335cce9a493bdce0660e1ab7548
BLAKE2b-256 5167893c2967c25e7aed6734609d5d3a06429f1af4da46d4d7fed12fbf6a8bd1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 35c3ae8ae43f18f9b6005554969ecf9e57e3f3e8f6937ea4228ad3593a3ad253
MD5 17911e30e6ed6dfb2fcea233d35b5dca
BLAKE2b-256 2464d75471ae3fe0bfdfa82076c45f9e2a45a68cf3b2d62b511becd77f757fe0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.2-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2de769e021133e775f8d370ce6c218939a26d94b12e80f68c7c13da5fe3257a0
MD5 666bef2283514551502ce7acfa47b52b
BLAKE2b-256 dc66311fbca3c65dd56e12f32debb700bff6ca9d33ad2d0fe4eeb508fcc5f17b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-2.7.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e1f012bcb70c6119926c3db49f57dde3d2b5c47a2131f8a6293e739270d243f2
MD5 b261ab32b3fe328e060d290a510109db
BLAKE2b-256 ae1b6ae6caa9f3cc93b88aaf8ea9a62aa7274fbb9d4ebcd95fbb6376a2dd45cf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 92267356b7625f6014b728a997245ecc56db390cd6c9feb98fbb2e19e565456b
MD5 08e7c066e6925c3d5c5894608abc1411
BLAKE2b-256 4c7f5eb8328282a16e86e5b427fda41b60950462f65a3602783096439308d3e8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.2-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4ccfb444e28883551eccd3e0b8b1586f6e16ffcc5013fded34f15879f6d6354f
MD5 559c3b9a22d53d677e3e2372610bbe16
BLAKE2b-256 b8a4b05fc6f495563d62e657b08fd92ebfc0fedd7bcd18e4c21a1f4af3ecb5c8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.2-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-2.7.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3fbfdd38cdc3b35f0e79614c97b0f176deef4c7b1a2ba6692b33a198b3e94d17
MD5 4e029b421175926528fe3635d7cb5f60
BLAKE2b-256 fa0c4fc086c0f644a3060b4260d8dfbdc44c5bdecdf7a202030c752a266fb532

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.2-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 950a12b30dd9bc8a378575c37936ab1c21c53291dc603cd5de818bd1eb8f47aa
MD5 17d4f6e7a15651bc5412456fbac22406
BLAKE2b-256 17bbc6d1a3770abd81f252969ef7d53f88cf5ec98550cb08554c1a99a4a8ab48

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e2188f4d1d85114d5f7fcc7cee9afffe9b34a3b258a37f36db01f4da98bdae96
MD5 aaacd52b84a31daaaa1ea80641ae83dc
BLAKE2b-256 84d82dcc814a3ee3c063cacaa502e469d3578dd5abe135de87dd3f7dcb5fd9f0

See more details on using hashes here.

Provenance

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