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

Uploaded CPython 3.13Windows x86-64

openbricks-1.27.0-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.27.0-cp313-cp313-macosx_10_13_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.27.0-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.27.0-cp312-cp312-macosx_10_13_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.27.0-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.27.0-cp311-cp311-macosx_10_9_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.27.0-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.27.0-cp310-cp310-macosx_10_9_universal2.whl (3.2 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.27.0-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.27.0-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.27.0.tar.gz.

File metadata

  • Download URL: openbricks-1.27.0.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.27.0.tar.gz
Algorithm Hash digest
SHA256 7c124b8d12ccbe28a04bccb7722096ee78839416b99dd4a331784c80b2526519
MD5 0d59abc375594a40484cb0eff5318b9e
BLAKE2b-256 c410f6c8f56a09848865e91df906136a12ffb5772ac046f737aff87d0a558047

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3418f0cc693ed3be2338562787bf8dce33652f8a62c136cc6ee51cf835cb200b
MD5 176bd70124913b75a338e4a2155703a5
BLAKE2b-256 9620b1a74083b397c1829b7c7cc1238a2cdfb113077ef3fe66b99461da904350

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2772fcd1113e82acac4b1c5eef9d4af91e911564a90c33f6f38c88be2ffe0281
MD5 6cbd43214b3e384c12ff9a97d37e2a01
BLAKE2b-256 15ecccac75b00624ad6927bb33ac6ae627625c254b5f4e625c9634a264fe2aa1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 9ca94254de120828786fa91939c270f883995cfd7adaa0e841795816ae17007d
MD5 89a5a39b2cd85f30fe53068438394cdd
BLAKE2b-256 5c3ed02588dbfbeb646698a8700ff609e3d8df0a90bc132aef23bf417cd7e322

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a5c01f0a7f6c3229b22a3b9a4397b1547bbd235f86c2184c420e09f2170edbe4
MD5 432a16a783279f046cb369be22da939a
BLAKE2b-256 5d228d936c1a5dd9688fe1e5264e5bcc93014d558919cf5314e189224f4175e7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e3c7fc127c01e4ee0c1d23faff6ed501ed1670f0bef63bebb7c1af665206641c
MD5 b42ddebdd38c67879b3d14fa1dc906b9
BLAKE2b-256 056b6a686bbb171578426011327d339ed102d877fb5983edafb3c47c6f559931

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 bb160186c30afa5c99faa5344fdbd9e67d9f26a38fcc46bf2409a4931b4ca74a
MD5 55d1518d08bad33a561bd19b2f92acdb
BLAKE2b-256 b1665fdb55dc303baef474407a3c2b43b1a49f9b6a829864bb46ee6d1fdf5c8f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 07f98485771e2c97993c77bcf5e029a4caaa65c434e6391861bfba5d2e77fe50
MD5 c5534b5622d844679ab1dd97f0f6cb22
BLAKE2b-256 dd54f66e49a3bc1764879dca14071403813c8f8121b687aa2bbe5eeeceac32ad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d4a1378cca9396d2ca9581e76674f14cd02dc8590d19b1ad938654a4d7269e1d
MD5 ef401ec27b52cef9118043cacd2c2b06
BLAKE2b-256 d913b9ffa24fd469302f203ecf974b575b63cdd81c02bd5df744fdfca8d1eeff

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3124d661ed661020bd81931e11c987cbea000c018ffb7b866f850e08b154c08e
MD5 7ef6cb1287b6da021269211f65697b0b
BLAKE2b-256 2318f9d7cffac365060901ddb8386714d27db9a8c1a02b910d4181bf35487973

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 055700c444e29d3fbe1eae1cb2b7bd5d3f0317ce8747ec9bc809eee7565b3123
MD5 97db115bec5d72b9744e5828e4bca812
BLAKE2b-256 c4d5ad662b6eeda294810a1c0df9f97b6e6bc52c2ae95ddd0327d4d991e14fe1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b29c6bea5da81a8beb64e8e56458423d6d63e7dcbe8061bd247eabd483fd67c7
MD5 70aa125aebc4452be483988dc5bac8a8
BLAKE2b-256 33e18656625f8148d0342208aaf4d0e5a79428c11cc817e55caf05179d901745

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c7f85a55b9d7495d66ece5908c04798ec44710812180a72c1c31030bb3dc0155
MD5 c32ba6888e9d2384c1d29e69a81c755c
BLAKE2b-256 d45c05ee63b4a12e67a447bcd575e53ff9d3245e9b80ce34aa257ba368a51e95

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.27.0-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.27.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0b5a8f710761f2be5b22d75eefafd6ffa5dd9f086ea525f630134212b3dd7cf9
MD5 023df647365547dee7c73dde6e05f80a
BLAKE2b-256 2310c7319fea76dad1ec4b358f5307b26b9a3c884106cd407bc0f203feafabca

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 534bc1f841df222bf2bb1c40d42e13f65ef6197ba5f415704a07f72d6729f682
MD5 2fb051e96377f604b768ceea1f17ebf0
BLAKE2b-256 e33bdcb5bffe9f4d56468bfda81994b449af1276a110ff0c83f8eeae03c66bf7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.27.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 12d0acbb86ea78fc7bd7f904ca8851a1b66b770a71df1f5c01d20f61c8ebb62c
MD5 f31ff3439feea61d3ab6bfeb124ee0be
BLAKE2b-256 1a91f72cf9ddb72c670c4e3f4ebd4437844be9bbc4a4b10ef7558554257b6e02

See more details on using hashes here.

Provenance

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