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.

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 (0.10.x): the package currently ships sdist-only. pip install openbricks compiles the bundled native extension (openbricks_sim._native) on first install, so a C compiler + Python headers are required (gcc / clang on Linux/macOS, MSVC on Windows). Manylinux wheels via cibuildwheel are a follow-up — when those land, fresh installs will be faster and toolchain-free.

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 pybricks-dev 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-dev
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.10.16.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.10.16-cp313-cp313-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.13Windows x86-64

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

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

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

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

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

Uploaded CPython 3.12Windows x86-64

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

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

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

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

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

Uploaded CPython 3.11Windows x86-64

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

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

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

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

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

Uploaded CPython 3.10Windows x86-64

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

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

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

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

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

Uploaded CPython 3.9Windows x86-64

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

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

openbricks-0.10.16-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.10.16.tar.gz.

File metadata

  • Download URL: openbricks-0.10.16.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.10.16.tar.gz
Algorithm Hash digest
SHA256 4193fe96fbb8516127eb52c63cb653f9c523a1aecba650967b1afe1e79671b78
MD5 c367b862a2d093265872749d1588d232
BLAKE2b-256 f3b26a1a26a987f0ae071fdf0518d86a07b9cc1db3760f17ac3fdec8bfa6d746

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.16-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 579d1d35da99917a5a51b1c4b7a2d25ceeb3f3d08f10799bbc82f7a33754b17a
MD5 452f116843568c9e779df56e5fffe07c
BLAKE2b-256 a6f58f681252ff743409d501c1e0193b0556847c38d872df89b3652aa4c8c7ed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.16-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3c6e3c406410a7b4db90be1667c01b077a262d3d20386d2b089c4a637c987bb7
MD5 dc762a8d06891adf0d93c379ec452be1
BLAKE2b-256 443f0be05865c0f3aacd5f440c03efe4e626acb57ee54517b7defbbd6fbeaa60

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.16-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.10.16-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.16-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7da04492aa8499de2b31a99a7141e3297be0884be3b9f149283d90d2ce37b48a
MD5 fcb7ef66aeaf6d9a98cb04eeea381d75
BLAKE2b-256 fe1cbc3c672d0e5c78408304dc6d339d39429a01e9d200b19622bc5821fea0bf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.16-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3c0c3464b07e1db635016ed5545b6fb8c029ad9d28ac8982b9301ade6f968b67
MD5 c85deb02d26043cd631de30ccb12829b
BLAKE2b-256 ecb30f8ba2e6707f18c0c0ca57bdc7a1f93f7f2cf5a6e05d5280cf475a64e8a7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.16-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b7ba6bfc8762f7403abbda46142150bfa74b5b61ae177e79c4de1c458b128afe
MD5 27658e1b9eaf060eb48e27213bec6855
BLAKE2b-256 201fd1371fec39893082830163e7689d2b4b2bfe11ce96d0b4c5f88bafc4f798

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.16-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.10.16-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.16-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 45f538e5f6ffcac72f966dcea29e1d0d456f24646482679aaaf1f6de43972ea3
MD5 935ccfc8457c23ae680bf10552ebd1e3
BLAKE2b-256 e5875568bf0582c56c868fb873ac774b5d171e5c24356e085dfc5921f173fd2f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.16-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1fb1b5d9aa94d224c4a35d65c7b70a4b46a6bcf6b3c4a879d1afa509901b3dc3
MD5 c6c42b3743615d0ff52f2aefa2d35c23
BLAKE2b-256 a9e1b55f6280ebf6c91b060ad8fa87aa93fce0d5978a39874887a3988d51bb87

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.16-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 902cd237bac2d2bce3c9a95de4f5bc04fc640db9d6baac166c15ee4226d34980
MD5 58642627a38da1edc7b7d843a43c1637
BLAKE2b-256 40682a082d2eca6a3bf4d2bcc2209e911c8065e4df7c5ea0f7acdacf8a4f189c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.16-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.10.16-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.16-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 01193d9ec3585744cb748bf237adb603bffa0f7ac48b87126b140c6792802ff9
MD5 b2df34879624a2df6bc54855afbbbe24
BLAKE2b-256 40e99b469556b89d1223043623fe997aa1c7a9a235c92015363a866817a8816e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.16-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c7cd516aa43dadb94b0e3820b281e4b626ee8d7f57efe96b8caa32d0414642fc
MD5 3a784a7f1fcc6cf6eab9c25f82e48ea4
BLAKE2b-256 67123dd7197d43ba94435b5c801234578c7b278109caf850e83f5dd47c2467e8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.16-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9d2580cc0e905aa76add27ce5393d064a9fc70a8181438c17c36a7cec3457a81
MD5 0fae5fc20b306646078604b54c706b4a
BLAKE2b-256 cdf9e5036a1ccc5af5a984a81cb7d1c8ed2ad280a78852744726c27eb02e60b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.16-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.10.16-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.16-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7a5b085aca235b916bad57159a782564eb6b88f1d059790199b649a8922fa19a
MD5 53db7ea6b2c7c462882b5054eba84d3f
BLAKE2b-256 590010b70d6077aecd93afcc9664a258ddb9d67b3bbe8a034a93872ebb7cef40

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.16-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.10.16-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 94e46ae384b424dc1626dadaa3606fca48da68626734f717c4adeb0f023eb82e
MD5 98e5020bc8fd2610eb1b67837eee2da0
BLAKE2b-256 bb7b8ee4083ce86fc1c33aa3055a7e9913c19ec184bc1ce266e7e404f0d01622

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.16-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 32fc2f59284727c385d346ffc9fbe7514e2b5af80c9d2bb552fb5823c04a0dd4
MD5 15ac21fad926e0755ecc341bd074f8d9
BLAKE2b-256 929c0f54fadffb50342b7e1d32804b19a98a51865f8cbbaf7a4af70343116621

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.16-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_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.10.16-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for openbricks-0.10.16-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 d70855d3fad785ef95eaa745c8348c3da5769728bb98452add305b303e09882b
MD5 58208765d444a91be34e7b409571d215
BLAKE2b-256 361c3b91307056880b48455c30f99669f0e5bed80d42cab394d55ea261efb851

See more details on using hashes here.

Provenance

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