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

Uploaded CPython 3.13Windows x86-64

openbricks-1.47.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.47.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.47.1-cp312-cp312-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.47.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.47.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.47.1-cp311-cp311-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.47.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.47.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.47.1-cp310-cp310-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.47.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.47.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.47.1-cp39-cp39-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.47.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.3 MB view details)

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

openbricks-1.47.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.47.1.tar.gz.

File metadata

  • Download URL: openbricks-1.47.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.47.1.tar.gz
Algorithm Hash digest
SHA256 8f9d6890b4a2c36184851ce8c4eddca27fca379ef870b1d67820f7d40ce467c6
MD5 29d37a032afc45add791246bcfa90bcb
BLAKE2b-256 e08fae275f5161944120f5cb5afcc03301b9edebcee8d6cacb4945fe54ffa74a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e0fa59631951019ea2be0a21c4c7198874ca15a47ee16177c48f5f60ed4e4e99
MD5 0e1aaa9df9b55e841eb97c302331f27a
BLAKE2b-256 e5db6fc2f28fc945a2da0588c1d42e3b144dc5810bb490be2f12dee6f8acb456

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.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.47.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.47.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a9c81425184a6f9cfac5c4d6555bfc892a8578cd1c3a5b453cfadbe0829351ae
MD5 974c98485763e51d26450c468d3b8bf4
BLAKE2b-256 2493b8c2b9720b680fab8e279db3e63e3d56276d7604146b7def8b1125b97f46

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e5fddc86841d2e8041fbdf55dc58a155497cedea41c815aa4166ca0af5324e04
MD5 d36faf377991071ef645219d3e0dd88c
BLAKE2b-256 0980f5f26689412084db53cdcd4577401d8e3d44aef463d7b44a5fdc3e8238d1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8f7b4a96f9442ee718e17abd06d8ef492bb9daf80f8a9196caa371b8ef47c009
MD5 79e6d963a65f6db3089886ab21b9f6a3
BLAKE2b-256 758de180aaf87c0333f2b8210b591cd6d846919e4b17bd07630a6ebff874b23a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.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.47.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.47.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e6e5fb2921095e768e677f4d17c535740cb6d6807a83c12bb635de670f4ce204
MD5 8080519e3107a27457fa7980da17d29a
BLAKE2b-256 cb953f698611907f5b4de072861aeffa61ad79cb98655d8e086dcd9a851a2122

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8b40ec474fb5fbb3293868720b99fc05db1d4629af7e566f2decd18ff28d40a4
MD5 6a2e31f440ad089e016dd2efd5e6ea72
BLAKE2b-256 a05537d2d80759afff920eed9d0f50b3f6de72708e6747782d8de9e31e137e6a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c78a69dc2e4a3f189f0388661ffab28c8f15073f884a8cac4893f3d030f104b5
MD5 d5bc7f2b08b426b562ab6042895d2555
BLAKE2b-256 74c9ea85262aa5be531f7a46ccd990445ae7e905996b81acdedf200afb512da1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.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.47.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.47.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 bce7d40b930b145e1b11d96f3d0c6eb984e59e788d250e0dfeb2184140c5e1fa
MD5 97ee3e0076a93e693d52651b1db1641b
BLAKE2b-256 997b8e16d8be1ce002ea368cf570c681ec97de99a937382b55d9c7da9f8d0c00

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9e831e632f0d014cd86d788da3b3a31b9d75adc804a5f6c1eeed4959130361c2
MD5 ccccc900c82f3c1aa644faeb0c6d86f0
BLAKE2b-256 38489487623bfc8c7d0c8ba16f8fd62953619ff7ffb34c602d1ea7ff98c3f2eb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c7f85d0045daea1c374211105be0095bd28f770fa1f7654a14d1e511463cc361
MD5 53df7b80445389ed82333ba640a5cc39
BLAKE2b-256 1db5b6caedb93ceb553bf225714969aef3e1e94fe1240bba4fb5e97b6a1c7890

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.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.47.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.47.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 6a5b2c0b7c0ec0e25b849c0a6ac23c453c067316a54a400fe97492214841cbc7
MD5 e64bfc200a02ba43742734020a6d09f7
BLAKE2b-256 99ebb1505f47912f7c53e411974977bdf8ef7fa8fa013e30341e30bef47d147e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a4be66075f5ad734c7dfef9ad00b7ccd0eb9973cb12f3fd10bb270f3d283b269
MD5 288606554898ecb7d7f90ad1afa3aef2
BLAKE2b-256 0f2d6293e3aeb40ad8913a73e8ecaf503a8db81c4d233876d66f7a11ce928668

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.47.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.47.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 472eb5e91f9aaed854940133bdea6d31ffba1cf603dd821601654a70749f91c7
MD5 7c71c4a88aacd005cc315219a42d4c6e
BLAKE2b-256 1c842833c994395869d88c49dd61e5c4b431ff95ef5657ef6a6dae65e5a3d26d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.47.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.47.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.47.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7f948a69934fd802366b061ffa0eb7e879f86c1eb6d1d803175ba4ae6a10b2b8
MD5 15e7f7a0a3a563717a6ce123fabdd365
BLAKE2b-256 f22f7c0f27a4fd5d07ef0263aa12084da37a0559a6d37408986f14327d439272

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.47.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 991d51bb72ad1d85b4de66a515273e520f10f9d7cc053a58fddd4d0fb385f5d6
MD5 4b847fd921f8e56bd0b711abdc8fb82d
BLAKE2b-256 ae6729ac185b34b5b6efad3cd94010269d01fa85e47ddd8f90583076cb340300

See more details on using hashes here.

Provenance

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