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.70.0.tar.gz (3.7 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.70.0-cp313-cp313-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-1.70.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.70.0-cp313-cp313-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.70.0-cp312-cp312-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.70.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.70.0-cp312-cp312-macosx_10_13_universal2.whl (3.5 MB view details)

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

openbricks-1.70.0-cp311-cp311-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.70.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.70.0-cp311-cp311-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.70.0-cp310-cp310-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.70.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.70.0-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

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

openbricks-1.70.0-cp39-cp39-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.70.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.6 MB view details)

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

openbricks-1.70.0-cp39-cp39-macosx_10_9_universal2.whl (3.5 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-1.70.0.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for openbricks-1.70.0.tar.gz
Algorithm Hash digest
SHA256 5eddf6a1b6d6d533124574859caddbb0ee9a6abd4d018ab06f349c528707ec1c
MD5 567b8c38cdb19d048088446f2d29ee54
BLAKE2b-256 d4a1c8618f4f8f342cb783bbf551e0480b152310aae44a3aa6b7d944bceff6da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.70.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5bf3b211a85a032a62742e899d7848f3766662577d003be68ccba2b95820bd1e
MD5 12d7db9972716b6f958075f380748063
BLAKE2b-256 2c5adb2c865253273ba72f062607c690dcf482d7ad472c479f20c912e2adf51a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.70.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.70.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.70.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4d8d0c3c2ab1156b3f47fe0c5f7272982d07d50e5931d16cadcf1cf9b1d40d58
MD5 04354e17f74fc52c2ef27beadea19609
BLAKE2b-256 4849d799834a6f86fb66213af73576bf18f02b33069d308d4eb1ce82adf131df

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.70.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 2e1d88f05a6e65e02e64aa81886cb2fa96ca878af037639e24c05b841e6d4a11
MD5 78566ff1fb49b9b73a5e1f205d5bae4a
BLAKE2b-256 4eb9f2798662113e05a23b884b3ff1aad73de1fb441d8c271561f05be74c966d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.70.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f5fad37159763138dccd8bd51ee220c13980dec9f7be5a147f5b48c91dfc12d4
MD5 57de557a805b971bf69681e6bab1e7a6
BLAKE2b-256 7cd1233e7dd4d211246a5f32978aaf23feab7a6467fc55c9097334dd7b587fed

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.70.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.70.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.70.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7edec4557b070a225daac71dd6153f910b7b68d8429fd4f0baff2b7d6f1b801e
MD5 d34678ddacea24d4dcce70a8edd03e72
BLAKE2b-256 db096a51665e30b8cb2502ce5a07da6c582692b5f680569809aa3a481b05cf82

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.70.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 340efc328ef3d9fb8cac305da73257b493aa04678a496355a048cf3c7fceae51
MD5 696fe2e1cb8b531fdf0083026ae3c86a
BLAKE2b-256 772ea5f82865953ffb71843491ebdd3670c8f423fb2895e366b1943a081d39d2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.70.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f2261dc62bba7bee60449883355a902aa95078bdcc6a6280ce7770afbf7d3fd9
MD5 66e4be7b8327e98296044355f724a8d5
BLAKE2b-256 c252d7cd4e7912a06ab9f5d9b60565796d42bd12375c225a3d50436f33a04bd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.70.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.70.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.70.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 150a73188975bc425a894bfbe921f7ec79494a0deb216358f3ce0d0ee9a4760a
MD5 2386ac4b0254b5d5f74452b99c90d200
BLAKE2b-256 216473ae6e4089dd2366400fc593c42b0318bed7b87658d6a95dba77b829e6ba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.70.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a6e1e56ece8eebaf9adb34ddd2cb93bd8565f3f594ec8d28170a6ced848f9711
MD5 b32fcb74fcced4da0e95e40a7dc12f40
BLAKE2b-256 4fa8a755cefa4c7df7a51900f7a610e113c86f2ea443583dc1e1a484d02419f0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.70.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8c5d78ec92845b4dee7a2bdf436faa8eec240a788fd1779de8d1afaac230ac24
MD5 2b3e4e3b77b62374e428c3d9fa1720e3
BLAKE2b-256 591f9dc7481078fe313d2add209c76c88910eac42e658c1a4a6d2b4a0aedd1a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.70.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.70.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.70.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0094ebccb23fd8239e3f4d3c358eda83c59668d0fe24a2e8ddf5117d678e8373
MD5 8cfea8565089d76d8cd6a6123b657c95
BLAKE2b-256 e34583bff40ce5437825b8e4c587833885bf8443082d31be9c0b901eb53c727c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.70.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9d0a5068809e7de4d014d09f764f54a27b15e3bdc8b792776650ac6390e6d3a4
MD5 ac50720920760137cf868e742836adde
BLAKE2b-256 cc4247085863c4582a32660fcd36fb839b80f03c3ffca8e442265122d9e87e8a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.70.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.70.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f7f0c66fee017d84071b582955958f00f8f9469b56337c6031e96e6106745b0a
MD5 de36c4d6968b5add98038a09a91da7fb
BLAKE2b-256 2f9d04fcfcad374b76e9d051ac99579889909ef3bd170f99606ecf4e71e8c36f

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.70.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.70.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.70.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3d819a49c63d6055897792e8aa87f5d36ec70309ac869247f5031b983f3a75e3
MD5 b87bf5bf44c463362d6bf331463d9958
BLAKE2b-256 a702ab226bc3e92e906b48f5001e75133978ad6d44714668b30928caaac6eefd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.70.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c1e3c0a379ba7b294f53f0ec770a69caf12105ddb346b7dd0cc9dd69da7b7f33
MD5 c74b9c7cdb692f6059d438acb4a58465
BLAKE2b-256 beff71e78cba856a4d7421f59276ef0f90428144821e64c25a3f0cffd5a801ea

See more details on using hashes here.

Provenance

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