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

Uploaded CPython 3.13Windows x86-64

openbricks-2.7.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-2.7.3-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.3-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-2.7.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-2.7.3-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.3-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-2.7.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-2.7.3-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.3-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-2.7.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-2.7.3-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.3-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-2.7.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-2.7.3-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.3.tar.gz.

File metadata

  • Download URL: openbricks-2.7.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-2.7.3.tar.gz
Algorithm Hash digest
SHA256 f6a583ba4dd26a9828aa997cae1c6f771124e5bf4d385db8318525598563d403
MD5 882dea58bfd2b7e32dae7cacf8bb5865
BLAKE2b-256 d9ad66cd366cc6d01e8f1ec6d2344edd5d90578c49bf8a21d9977933ea6b478c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.3-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.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 92ad0e30dd7cf5d7aed3bdd2600c44947997e0b58c6adc2790015140f1981b7e
MD5 b9890a633205599e66e0a4f4759df4c5
BLAKE2b-256 6921d85921f993354566c83038375bec9ae31d467ce6b4c1296b156c4c3d4fea

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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-2.7.3-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.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 36adc52929019350e72a27d46fcd34404d072333217ff4e8579a70f74cba7ffa
MD5 eb836a96e1a7676994313bb538e4e075
BLAKE2b-256 a3155e97a6e05aceaa492b6e8ed60fd24d6f74e85f61c2dbb467be44524e423c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.3-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8de4f93024c9fb383f258f83d5afc588bc4bc92312cfc9f50d1ff1c65aa53080
MD5 b9c67e8d9cad50d4ebbf48c72d43a912
BLAKE2b-256 fdc86e10495020b89e4a69d846f9f1db55b656c34fc7241026486e924dee4f68

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.3-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.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9441eed7562e2eb0e77d634e047a9179ecfff7583fe5b0aed11bc8c9f31b8f20
MD5 f269e12908eb98f2b68bc0fe59b3cc98
BLAKE2b-256 f8b545ac049df701fc41aa3f3614149025975b0fba7bf215d6cf7821619b0409

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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-2.7.3-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.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ebe7f030bb206840b0f0b4e1963b2befa45e14e00b4858592c7912c5e99d3a4f
MD5 1772aecaadf1654bc8a649d7369b3750
BLAKE2b-256 3fbd38ec13c24ca2ad84bd8e829fa364fa82fe89d7d3313c8d26e0d321bc1182

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.3-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 45ee8cd2edc048039ef797a3f71b35d468e0d38e08981f439e4904508c6c8d78
MD5 470e2f5d642681631a79aae9b441a41f
BLAKE2b-256 1b53febe1ed6b3218b8401ed00bff62d6b10b4e16f2ae1779a7b95895aecb1e9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.3-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.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 374517ca744d858bc2dfe69a982b101eecc12662a778a383571f2977addded62
MD5 2efc0743ec415a5cd35222b31e59c349
BLAKE2b-256 4e6b8780855fba23296393c29e0783b9eb2eda296193d4298e1343e9211c163b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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-2.7.3-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.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b6985ffe43a9402be2e5a5586c19bbe05552c577a4affb617d011dfe3bfa3dff
MD5 8b587da6a7a4a6d4f8ac3560a1a231e8
BLAKE2b-256 e35d2d9e985d5003445b8e20387744444bd2975fc0cef98946ff2f98ea1ce9d5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.3-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b6142492958f06ba222b9b27a6db0233962d4156c6611f80a28c3b07f54021d1
MD5 d3d515578d803c1d7ccd95300788261d
BLAKE2b-256 4cf6b88b5a0ed07421d490633b7aabe4a7f9fe935284afc4efc310d1af4327d1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.3-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.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 523bfda9008328e28225b4e1408576330952e01cb96e3a6f499709c018e260b1
MD5 32910579edbc956d2536ee9d8e8efd83
BLAKE2b-256 6b71cdcd9e5a6ca2728aa6f2dce7530c2fcb9266c6d5ae2c8b5624b83b5160a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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-2.7.3-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.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 17090e5643c124d3ee5121702d85bf58a62f5e02b4815008893a6bdf7b0f7156
MD5 58dac2d3c3b4f95e6cee1f88ceedb9a7
BLAKE2b-256 4e9b6959e9ddd9ba1a93a14fceec0362641562304b151ce304476c79190365e7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.3-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a527f8a32a367d0aa2065689369bd1168cf7ab2f53a2810759aef09b132224ae
MD5 a5e4a312be99f5ff155b98196613c308
BLAKE2b-256 49aee15d06043ed5c63f15a2bc714db099e4e03ba253c0ec2f6a79bc315e9387

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-2.7.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-2.7.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 eded66fd4caece3d2a13fb22e2ea091e2c2630fac693f9a07d544ec1b0533d55
MD5 fbf11170389aafc5a19fd9ce25ff019e
BLAKE2b-256 c01e97e4667e8ce23fa10a1176645ce1050d83014b0475d66b19d6727a47ca54

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-2.7.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-2.7.3-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.3-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 277a9b753d5850841713f3f1535fc4dd7c461d892977916a8a1dd8aaa67983d3
MD5 9836ded5b51eb78ed752dd15f1e9b00a
BLAKE2b-256 9ee477e8a0a1b69d880eb3a7a494c5c985b2914c713aaad4911d916d12166875

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-2.7.3-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 69c4cd5af5601ba85931fe3577ea143fc8ff7e8551cb080a37436696bece6c22
MD5 ba315584f88f23ea19a08e19c9b692f3
BLAKE2b-256 6ff4834a5fa1c0643fde6c4e6f5b6b2996c2bf07412510730ffe157c665cceb6

See more details on using hashes here.

Provenance

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