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

Uploaded CPython 3.13Windows x86-64

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-2.5.1-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.5.1-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.5.1.tar.gz.

File metadata

  • Download URL: openbricks-2.5.1.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.5.1.tar.gz
Algorithm Hash digest
SHA256 d402a30690ec6c7805b7e49b4e1e88a7d514a3e540744358d077a08822c8eee8
MD5 15c6efd8c8d34a4a277c9b845e465c12
BLAKE2b-256 3754319a67fac7595b0bc3763546581fab9788cb702b83bf416a3a9d8f38dfb1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.5.1-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.5.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 66be1a96d52dac05d2cbb8c525ab1bc7694e955dbb24efee6ebf154fa2912ae5
MD5 922c1ff682122b0755d329392e47fa96
BLAKE2b-256 44c8cc28effbcb8571207c223b3de0dcf8dd60472455b079a7dcb0b4bd3c3b90

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.5.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 c6b4205fb41979ddbdaafbc55813819f5112e67e469d08566a033407db63e273
MD5 e1bcfbd6685d89c553aa00a3ec113013
BLAKE2b-256 3dc3b44dd407e1a5ef27b933326eb739118e63523a11629ede2c18eab4addd4f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.5.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 bb0c0d369da7ccd8513f3eddb1f73ab95de3c7b6bd7ed3f1a91643da49c4085c
MD5 5f7fcee6927facad1a41dd2ad5c032a6
BLAKE2b-256 ccb1f2533c83f9f32f9ca670d44a2dd21ae8f5dc9ceee67f5d42eecfa6587b14

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.5.1-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.5.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f607dae12209ab3f30bd21d21f449f3c4b7f456ef77444a7533d3e3c4c21c550
MD5 6de427af2d0dcbe78e7940e10bc0753e
BLAKE2b-256 0da482ba6463ca0f8d127ba4c8b9fb1a7c11fdf9b455668ada609842b355e227

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.5.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 800d65a0e3cfe7c9a6ce6a7e2b0ddad81661123388c2a121fcdeec6c8beacb9e
MD5 44af74169129e0511bcb931fddd570a6
BLAKE2b-256 f5879605ae6f473250b2d749235be75e0cf59b9aac21ea2209e185066f300d1e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.5.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 cb0f81f6973f3628fc9050c689b3e3b9b33851a47449d3a63c6311c10c927a0a
MD5 64779788fd412d3cd611d87bb5d1f2d3
BLAKE2b-256 5b74af2381dc325ee579d0752a86b255472738c7fd8641b0291dae4ccc509907

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.5.1-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.5.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7b751246df2eb2813d5a6e10859b616af2b3252305c3badd66d7d7bdddb657d1
MD5 787cb361180844953e5c74ff874a4c27
BLAKE2b-256 da700bf42269fb0c780f86670ae097aad64108fb0392b97c26c1d201147243cc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.5.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bc94dc75c0f8fa3267f7cf0dcb5f1594c03bae24fd014543e11f3a1e49aa67b7
MD5 6d0366a5919de73e7fb69a1619b331fa
BLAKE2b-256 cd44065b5016b4424bceb5974ae5ea98331ea930cbe1ded643eb2307602b3b84

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.5.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ff683e82348fe9c4e12f5c91617ceae62e4681c8665ac3ad565900164ff5eb15
MD5 e931775eaca36f721d8730f6a9c9567b
BLAKE2b-256 51e199b24a628cd07690834c469365234807d77434111b24cfd3937dbcf88d49

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.5.1-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.5.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1f9155f66b05d6abc8d2fb182cb275cdd0b85e0f7923bbf5c753954327655225
MD5 a9879afe57121e42749a1b26d836d3d3
BLAKE2b-256 730bb0e02fc9bae7f69591628be9f7553d0ef504687051355a51845a8ef799ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.5.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 343523fcb8bda6b9d87de146bf2798494ee6015d3ba4f43d698018527f944ed3
MD5 29969bf7bf8cb1ed49997b1de3dfa669
BLAKE2b-256 e8207bab2b67d735440056e668432ca89e97a5034fbf3645761e317fd3e0aa12

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.5.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e7494daf24979f77bda080bc878a184eebe8c2551298489deccc85ca3b1efe73
MD5 97ec1054ea523b58a69a0102e86c8886
BLAKE2b-256 a9afac73cf9b9e8c37288f3e857c8814e110d2b567915b94da6a9462a8611f6b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.5.1-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.5.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 dcc0b655f2b36e84c5dc03e6a08153f1a3c007c79a2146b4ad71b1967b80c364
MD5 d569e5399c95ba996ea7b2075cf11c77
BLAKE2b-256 d839347713a7aa78c600aba844ec858b0395a98ba8b87efba973290d1c20cd00

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.5.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3461e31f8c0e364efb71a91591b13f3b03755894acdae7fea55321e26d2f3c24
MD5 6a8740fef4eed613ed6ea120faf6c05d
BLAKE2b-256 a104caf730b4df4c3ea406a367dc86ccd618abfaf52a72f3cbd27e4e451d9d82

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.5.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 803275319a33a35a96a8149978fb1fb600e555dc894cc26f815df7926f1abe08
MD5 5735c4f588dfca7c174a0eebb560b17f
BLAKE2b-256 29336be234f044659ec8b5d95acb904255057ea161506fbacb7330686eff6e26

See more details on using hashes here.

Provenance

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