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

Uploaded CPython 3.13Windows x86-64

openbricks-1.40.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.40.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.40.1-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.40.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.40.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.40.1-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.40.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.40.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.40.1-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.40.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.40.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.40.1-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.40.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.40.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.40.1.tar.gz.

File metadata

  • Download URL: openbricks-1.40.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.40.1.tar.gz
Algorithm Hash digest
SHA256 97c48a7918e37b97fec03d8a19472b36a4ef8d55b6f0dd8859991cbbb98087ba
MD5 aab21ea0eadea243412697293923522a
BLAKE2b-256 59ac64835354592c602036ff6a6f977cd514b1d34f8d83e396a15bb19b6577ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 96bebba373774ff4b53480605280655597e9ca840a834656a723c492e11bb336
MD5 bfa8dbe6cfcff3b6649aed27d0a661b3
BLAKE2b-256 51ec7d551cf588f61c31bdb447e58fc71677f6eba9c314387c3db708408a7105

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.40.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.40.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.40.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2b52ea432e5f0035347c09492e1b2ad814a85afe036ed8ef4ab6bae9b9b8d312
MD5 85a1d02a41fb975e2c69bf3e02a5f4ab
BLAKE2b-256 ba1ab22738686d4ce793a30b80618891328df1d29a6655e8beeb988ee0813057

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 62016aab03644506302f2ac2b95b0fa5d2e1026cf5a10a493f2688e806ea7e84
MD5 8fb213e53895ca13c16d0844f0a029dc
BLAKE2b-256 6d517be2d350b311a16c5e296c0e15d8274a35c07f6a8d27f03cdf915839ebc3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f76ddbe12b4f933609c30d3bf6b99ded1a943164b40234388e5ee9ce87a50c1a
MD5 24ff1c14233be3cebb5fdc523a697ed6
BLAKE2b-256 f3246b8a47ea0092a7f6a9f5127c6b9c8babd25cee31244c30f93b03dbbad221

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.40.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.40.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.40.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 cd286f4fb57d95eca8327f669936ec64598524f4fa4e62b04e0c8fbdbee671b8
MD5 1ea06d323f6f479af48384354170dd65
BLAKE2b-256 c08206668bba64f726f274efbb0f3b32f5974b8857b51f7e579641daacb82d7f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d6bac21eb06784c643d57345622af0cc3bc4eb08a8e7c80c901215858d1181fa
MD5 a709b71134ec5bc1d5a7b6733328a4dc
BLAKE2b-256 4401a9a15418f902505b96f08c7f3e9307ce5752263025dfebe9605ee3143980

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cbe25be32b06e545851caed5e02f6447251ecc53c8927a30819faa5b38a2142a
MD5 e14c9177723399493bce8da3cb39c558
BLAKE2b-256 3c1fd27bdc0f55e422c97b7c1a01eb04d3c4ed3884a5963d183203d078f86a27

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.40.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.40.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.40.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 264a409060080f4d30d923ea72cffa13da6d2718cbf50765686ba7f89ba93c83
MD5 922c72fb1e7fe06f7b58b829fa3a160a
BLAKE2b-256 aad9cf2d11e43b44eb2567d6044430e93e217624bead6dca74e1e95ae4c3c524

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9891376e60bddfcdd05ac3424a69f09ecb4e2cfbc536e098e86495880d20052f
MD5 b72c0c07d88003590ec68e33d67aea70
BLAKE2b-256 d6b010a8ad1bb6a7718e0e9e8eff584e7e04d2bf9ca08f4e94a7048772d135db

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 62ba7ee919c0adda591cd38252cc910c8c1ca9d9695f945d6984decf017a3ab3
MD5 b9891859783f4d1c9ab769b39bddf97d
BLAKE2b-256 b2ff0f3945095a4d212b0ad1e84a9773f528f1bcb454d7144b3788d053a04fe7

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.40.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.40.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.40.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d1b23cefa887b26337dfe450c984b2ae74d8090715560701148d5d533bf24b77
MD5 91d23dd07187e86b473afbd13a474122
BLAKE2b-256 e48f7bf7d704a8d711b9e05e09fc3fe02cd73b7c76e78081d8f85ac5d122491f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 75a9a66f708cef14d541bd06caa3515ee381a76d2314e4ffaf68f492e4006a03
MD5 1a8393b8c2d3c03573b73bf9d55e087c
BLAKE2b-256 ddf1ace6c27f154422e25965ed60efaf5707f72e4cb11787d6ad047ec1ba869c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.40.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.40.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cf458a5b740753fd8ba8fba504e1b2d04e0f77889b713ecb5052dbae69265aee
MD5 0cafdb6286f132ae68c8d62ba0b6f06e
BLAKE2b-256 557f6ceae66a548b360c15ee6b6887d3bcd79ed21afe1f32c1f9bf05b3ab3a02

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.40.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.40.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.40.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fa93ea96a34f40f027643e308d3242efebca75c53a756c242233e404aa1e955d
MD5 612623db52e12c2d381807d72398e742
BLAKE2b-256 8388febc45c2847db1f45e69be93e19089fc4e18a505d9e6a4b1ddece2c2bbd2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.40.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a5fcd5fd6473bc4979a8b1e96b3a6dc16efd5bc02e67b624b66f7d445d51ff1a
MD5 4f68b31008cfdfbe817d02df54c1b79c
BLAKE2b-256 494380adb91cf08c9ab56c104f2eb72edb5821ccba2cff8d4fa751abe50f11cb

See more details on using hashes here.

Provenance

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