Skip to main content

openbricks — host-side CLI + MuJoCo-backed simulator for the openbricks MicroPython firmware. Flash, list, run, upload, log; ``openbricks sim`` for the physics simulator.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openbricks-0.12.0.tar.gz (17.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-0.12.0-cp313-cp313-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.12.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.12.0-cp313-cp313-macosx_10_13_universal2.whl (17.3 MB view details)

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

openbricks-0.12.0-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.12.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.12.0-cp312-cp312-macosx_10_13_universal2.whl (17.3 MB view details)

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

openbricks-0.12.0-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.12.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.12.0-cp311-cp311-macosx_10_9_universal2.whl (17.3 MB view details)

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

openbricks-0.12.0-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.12.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.12.0-cp310-cp310-macosx_10_9_universal2.whl (17.3 MB view details)

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

openbricks-0.12.0-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.12.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (17.3 MB view details)

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

openbricks-0.12.0-cp39-cp39-macosx_10_9_universal2.whl (17.3 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-0.12.0.tar.gz
  • Upload date:
  • Size: 17.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.12.0.tar.gz
Algorithm Hash digest
SHA256 0ae1c1d1762a83ed027dc9283f6951c2026cbfb2de49b0a3a9859ad2f4bff23c
MD5 efdd4f71a9ac23d48463b9a2c49831b7
BLAKE2b-256 cb5137cb9b287211c7af172ca4850e8ecccd472770a3b4b77aefc37ea64ff3e6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.12.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.12.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4feea8eb5b28ce509feeac059a7a9446f8d67e920c4530102172a8d089fcc4f4
MD5 111bc0a1f9da79b8af86963e629d4090
BLAKE2b-256 ae42000691053d372410cb1740ec6494d4e416a63fe7e741da017c89859b99d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.12.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 37b0fe65e4c6352e94c255ca40ee8d793d29e0d6bf62dd86961a1be78e33c743
MD5 80c4d3b44c5c1a3d0c6eaba336793176
BLAKE2b-256 22cd33b47cc47782e0b9741eebcc902b8cb3ee747c68b4d2193f7c3aeef7280a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.12.0-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e50818bf3a621d5b4dda5436c3c5d073c389e06678b01416c1884a58c3747797
MD5 fcf361d5941d77a503798f6999cb3019
BLAKE2b-256 59bb2a8432a54dfa9c84bb57c7a7590a1ebb8822d6c7db5a76f4df021e228890

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.12.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.12.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a9a45acbfbc3139679c27cbe255996542da7d88cc2afc24a6f85a07c32ee086e
MD5 67c0b98376ba806ca842bda1564b8325
BLAKE2b-256 2e86246d0feee0d6e5e5bc71d50cc5112d2554817698b6fee0b82487685ab22c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.12.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ceac52e6c70ce57e756731ac704a8e4f9bd3dfd9ab6cc406d2db95c7e65de5a3
MD5 4cc892f698e2fb9cf58f06d009e35e07
BLAKE2b-256 54dd7701e7099d5cae209a9e31d3b7a19d3d906a9990f591155df68fc5c43273

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.12.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f115efafba7c1291b4cc84dc3c29e66229c67126250b8f4e0944b35f6fd0b0a6
MD5 e44dd40c75b95ed10d1a83a73475a8f5
BLAKE2b-256 b24bf75d23bdef3b38cf93e1d9e12357fd7e73e168673780fe07eab955d80623

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.12.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.12.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7b5ff8575e8aaabe1669d206fef8ddb89cd48ca31b7ed69923ea7f5a66e00e7c
MD5 20094dedcf3534f562f136893fc0a701
BLAKE2b-256 654202532eed8d568b75c1f330ee9d18e3848f773e846ce8b08a7ff816795085

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.12.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2571d64905678410fa5a05330542934287c26f21a074bcb27b2aabe3e50437a4
MD5 6dd865850a8e001ebc4b244f82431c6c
BLAKE2b-256 04b3d70195baeabad56907f3e43840f7dbb230c5ff8b91094ce04f273941b2d9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.12.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 df5e8130ba0925e85ba79e6cf6c9c2d8a2fd5f4f303e8ec864ce41998c561cb6
MD5 76d0404b19be832976f57fb0c3a1404f
BLAKE2b-256 37adb854c00a1ce2e92a1320643cbcba38f28611f4dcfe047374fdb694ff4fe7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.12.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.12.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1bd09950bc0e5f36df625a03d19b29883da92a4e6f44ca40adafe32e40188119
MD5 7f4364bce197b273e2b375860f244121
BLAKE2b-256 7880e1f451f20b22fa0349c76f51d429aad63a3eac4058042ba090eb331ef941

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.12.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 53d5b034684e83af341cc4051359251bd3315eda269028f811b8496511eb57e8
MD5 64c985d409b6e6f73678380da7a3f43c
BLAKE2b-256 29756d61176e0987f631b8e1f242f7962f8e67f312b3ecc8825ee2cdeee0c611

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.12.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c2e4fc301ea5b7e02fc8cc64d7467ac4d14ea985e242f50170220560d1c5075e
MD5 82f702b33edbf7ee440729926e2eae83
BLAKE2b-256 50531b4039444a9d121e1e2c0b27f4ece6e84a3f9d565dbe26f56268927e46af

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.12.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for openbricks-0.12.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 79184d3af7f7c6e1845148b916368657d193365180869be230cf19ea67998d6d
MD5 d72215072c715751730df809a986e6d3
BLAKE2b-256 f5e311d3e4849be80fd33d5a3b2dcb003c412c94d5cba0105648de5a22c68a5e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.12.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 28cbbca536466e257c59a11b9f2e956dcfe00c02065155aca7079e1e12ead8ed
MD5 24e2d5d28869ee80799f2c6c3a2d6eb8
BLAKE2b-256 313e84d13f2ce2545d93c0a6c2337bd37f319acd87e6c94aef434b32ade012ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.12.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 25b5c189a83fe5e45b2a535e5a6a916b20a3ac43afbe0d1976aea01a945669b7
MD5 7e1e1a721b8a408581c999d093fc21eb
BLAKE2b-256 70c4515ccd4b628e11f2993e6b0a4dd3538688396014250ba3c13c62ef2f431d

See more details on using hashes here.

Provenance

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page