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

Uploaded CPython 3.13Windows x86-64

openbricks-1.97.0-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-1.97.0-cp313-cp313-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.97.0-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-1.97.0-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.97.0-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-1.97.0-cp311-cp311-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.97.0-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-1.97.0-cp310-cp310-macosx_10_9_universal2.whl (3.6 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

openbricks-1.97.0-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-1.97.0-cp39-cp39-macosx_10_9_universal2.whl (3.6 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-1.97.0.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-1.97.0.tar.gz
Algorithm Hash digest
SHA256 830312c9057c0bb9c17a49c1701419c2f4ccd5b420c834f198ee4b375e8bf6f5
MD5 ec808f45e8405fd88c321b9cf9e4e9aa
BLAKE2b-256 90b50ea3d85f8321ab188e7598d0460fc35211fc695cb5c5068cc00c56e68f0c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.97.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a04379aeb900e705c75a06d1dde0b523ebbe0c3d025969dcf5856a124ac86be2
MD5 e28adb77c78215a718665411e25e0bad
BLAKE2b-256 89b7936afd7589e65aacda802d011df96c3b220f5691cf086fdd01c5656ab4c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.97.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.97.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.97.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 585b5c3398dfdbc340b9659a064d6387dd64dfd82b6097f7cc38e5b0f0fb2e1d
MD5 50dec440c0e47994bae1196e1cc167e4
BLAKE2b-256 6bdc2f226ec2441a966018339355fcec80b8f4e62aed1d7c7eae73176cd07353

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.97.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0472b3bf998399c793ab2187f3943da4ea39e8895fd37cd7c635b65d1b982471
MD5 45037c7fe8550a19ee97c150f9efc6c9
BLAKE2b-256 accb853a2cd43c538888d940571cac5c52b4fe665f9762b2e852cf65dcda3c16

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.97.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2df4e98b18d0702237b78f4aadb706035c49167dbb05a02f64ecf19cfb993373
MD5 93a153299ee56007044e7b3c7d6b6099
BLAKE2b-256 8350f8a2ec9f7a64cb3f426f3261ce70faa1131a4f0eb71aef45480dd1137217

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.97.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.97.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.97.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7b328076abf5fc771d0940621cb65bc4cbf81cbe0763c9cc36a9722b2947ea24
MD5 fb2c228e744b77dcbc2ee98a8dad54bb
BLAKE2b-256 0f9804ce64e5f2769c13a2342b2df11bd13a9e1ff0dfbded174bbf616d514cf8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.97.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 52844692c6a8cf38b9bd40e0147e0c1045ac5741b53d02e531ac2deb9be30438
MD5 57185fcd5d155385bc93908c499ad0f3
BLAKE2b-256 e03f933b904da591f0383630bb62945c0beb24fd7f72caa829f985a9a4e2b855

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.97.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f8478778a790a9160eb40944c30671953aa0aaeff3ab10f87cc5814c5aee9b72
MD5 ffc78aededdac02c52a47a7677b7335d
BLAKE2b-256 8b3a0f877ecda664e4e70e33de28296a30e20fa2fbbdfbd1522e38b660b1ac51

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.97.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.97.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.97.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 468c3a38866721fa50cee54aaff3a38a3593eeaa5d4ebbf17fab5e5b0c631816
MD5 98d03b690e68a22504a91d0029071c78
BLAKE2b-256 da83b5ab6d21a69712e04f1965c82254be0d60a6a662de986403e897920f94dc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.97.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 975e09076a4ae056aeb0cd5214d7790354116abf302f3f78fe739de753174bc5
MD5 055d012a770cc78b0f8b61c4e3d95df1
BLAKE2b-256 3a5ce83aaadb347cbe78642e04cc4937338d5459a74390f4b19191209be41fe7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.97.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7d4673491619d1a81920e88154c9be1b95a2dc360251b3e7eaf624edddf7cdff
MD5 53685078a48efc445dd4bb231109cd17
BLAKE2b-256 a6ae05f3f72a5cdb8bb6f904a0d6782ba01ce7b750919e5903d6cd351dff8ce6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.97.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.97.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.97.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 4ba7f3a4943f2d39c66cd02af418c0a015676d48ca443c3976fb111edeca0f72
MD5 9b9d4a5f50fe680adeb6a89d4166efbd
BLAKE2b-256 db3f24a57f3f56966d91fe6759e080f921c7e86c7d1f3a39e86c14c052541c8f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.97.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d77d1db6f4941437d721505bd37e2dffba23fb40ee82ec749d3a5d7783e53645
MD5 6b3d364869553db7dca883cf1fad6f0f
BLAKE2b-256 002c2372e62269044d4b0bcc39c552272ca967fe3656344ee835ee46415557e5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.97.0-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-1.97.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 03a6fbe5670ff06c3ac47d2948cdc531a044b87ef2af6b7c49eeb2c29bcb2cde
MD5 d43b75ec71b3e9dc8951f2cfc09c8c0b
BLAKE2b-256 b55dc6ba1feca5567be72d3734abcac6b86f5271127c50fde31579d8c844ee34

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.97.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.97.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.97.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 5eac79c43bd8e0d92e50dd1a01dde7b5b498e64833f5a44080e3437ba2508d1f
MD5 28791a3f3377e0f77d1f0169aad08521
BLAKE2b-256 721f5a041de12c6c16b0251946138209b31256bf368ac5799bae176f3aa7a19d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.97.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1c09045947f9646222023f8e648d24cb6878a2468cf3a486f91499a54ba553e9
MD5 10df9c1f28e671ac33cbdd4c111967ae
BLAKE2b-256 af09ea8befbf68e504b7596f9474d98a61fe7120ab1a6b386c214a157d635cbc

See more details on using hashes here.

Provenance

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