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

Uploaded CPython 3.13Windows x86-64

openbricks-1.34.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.34.1-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.34.1-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.34.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.34.1-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

openbricks-1.34.1-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.34.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.34.1-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.34.1-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.34.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.34.1-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

openbricks-1.34.1-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.34.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.2 MB view details)

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

openbricks-1.34.1-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.34.1.tar.gz.

File metadata

  • Download URL: openbricks-1.34.1.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.34.1.tar.gz
Algorithm Hash digest
SHA256 c39dbe3173633a9d6a8aad06cad7fafe76eb3c31942183354959c1a57e601146
MD5 30ec75ad072cfc8a97c6c3e8fa501aad
BLAKE2b-256 a3a3def1389dbfca147f5a0c8c80c4b7d06d88b684710b4c49fe9306ab454ac5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e8370b8170c5b61df9ef0472515e61d4012422f8761598f3e95dfe0589be5fa0
MD5 03c344e9c4f0f4d606c585e05d689dff
BLAKE2b-256 fc7a2a608b0abe41b4edacf82a4927729ee815affdc4bb803cf948154d07a759

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fec284fbfe05bd8a47ecaaafd1101e7d57c8889aef54771aa30bc26f7d75266a
MD5 52f73f8cc150616f85a2caca0626e4d0
BLAKE2b-256 a5cfe8195526147f65450e8b678bc08bb0dc61fff2e331989795e66881614541

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 019d9c184119b7d89545c3d27806cc7d59b6cd6f49abd72b778002d0b61d05cb
MD5 a995052c725936b06dd40754419a5572
BLAKE2b-256 2257500c0c30117ee0f06f7523ea8a2ae7de752bcd741df490d296d704b6497c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d9bf7dc5f97e020d2c2bfc5d5d2da7ecb26947b42aa21f83eabb7bc89e73c574
MD5 eada5fa737f8d84e688f1fd6c5aedcb5
BLAKE2b-256 bfb24ad4c6ee3231416a0b79c0ae5ce33ac6639318105b1395c00302d3baabd4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e87c731110f39f343fc423a6bad770310e8d544b63a5f0f267fc8c3f6031d79b
MD5 370e21175c89dcee3a517163465479a5
BLAKE2b-256 2cc289fc8c16d341d59d2ef69f011743348d10bd28b394aa09465f6c41d2b180

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7d6aead8790118a5b6ab7f79f15dc90bd93718bd38b7f8ad517abaab161382b5
MD5 14493568a3c18c7e35374ec82b519bfc
BLAKE2b-256 1d1fe56159163a85fca4a031e263c43295521c4ae5f1d53c5f85e4eb4f22303f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 078c888814ae84085ab040accad9395b326adba6af503ae4058d7218c8c1b55d
MD5 bf23074ed121d872463104d56b4dde78
BLAKE2b-256 6006f3a282571c48774b60e22c38133583b98c5bffeafe547664bfeeb5de5e8c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b4bb4ea5466cd20673e3d93832f2099cac0334f8450e935b3f7b1e4109ce3b57
MD5 6166ef8cce9028bb4120d07fa51dc37d
BLAKE2b-256 0d595774059d3415dc7720b6bac76bc56c33b37ee188c0cd0d9337ab4a2a696f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 523d87d0f2c7a6a54e777f4ba8beffb9bbb7dee0ac3fcac33a4b59af80d32a5f
MD5 1071732d2ead84efb348179a4fe90c4e
BLAKE2b-256 bf904c02b91dd4f985899a3a401ee8cbfd8d0afa4d416f60c5aad2b0d9db0e19

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 407db56782509f88f53e1258ad11d63a2eb6b6ee6285a6fac4a63024a4547408
MD5 82ece424030e1efee442c9598e908e97
BLAKE2b-256 f2161673c7ed9bdf1ccacb1c58d41aad36cf310789f263df90aedb22e82d4516

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 69e5e97d08bc5714f90943df0b1e372621e001a4254112e716af6d96c0c4085a
MD5 dc558af68af4e946158ce545d1ceb73c
BLAKE2b-256 419d96f39b1bc06b3d4d36faf5b38749c65c46e8285e6ca39416d83e3805bb20

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c3613566d5812ff72da593fea96d8e62eec5c7a01d17c2aa455d58115073b8c6
MD5 573be4b08ab4f4797aebf07e334f0e52
BLAKE2b-256 9b6b4964895271cd6c9c6e928f5bae273ee7dc386aa2d327914457a67fc42bcf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.34.1-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.34.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5864459e3e4f0974cc6de0232f6828d0b99a8a39d4017b798ac92cf7e753b2a5
MD5 3970fb7eb63f661edc9f26be749d2756
BLAKE2b-256 e88135fd5a537eb847941615c0033936eadf58be3faf2a3f6f32e89a34675710

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 912d4d41f452821fe532c2c987a974c1e84181bc430004dbf7fcec7c148beba6
MD5 7670fa6284afb9adad552e9e468cdb7c
BLAKE2b-256 faa6a19223f3a188af65d2c22d9c26d29f8f2154f56c048603c935cb0a88b7a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.34.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 351b519e1a2fcec83e835a8c96aa531424d931c379a782107300cb85f0fd88a4
MD5 332795bfa868b49018032588ae087ebc
BLAKE2b-256 8026f35685ab910a17c30423cc7c7f7af1f9931587ab608d36f727905da3ac58

See more details on using hashes here.

Provenance

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