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

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.15-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.15-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.15-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.15-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.15-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.15-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.15-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.15-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.15-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.15-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.15-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.15-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.15-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.15-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.15.tar.gz.

File metadata

  • Download URL: openbricks-0.10.15.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.15.tar.gz
Algorithm Hash digest
SHA256 2678316179a166f56519dcf154c645764c730a6a2f7227a88d2aa6ed6422ee30
MD5 f2aeb2c16b7babbe623dab76e63f2862
BLAKE2b-256 b0c51335007230a55e707c60e996caad84484ba131d2558a01ce1d745b956fa1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.15-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 727e56c1fe499e70c1e9d002eb666de06def472988eb688135ffd63d8f5e7411
MD5 98a790971d1540b97cbe89affd8509ea
BLAKE2b-256 7bb20f97597605201786786999002e60a71306168d2aee49ce81a03b85b3ec1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.15-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.15-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.15-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cf54bd041a946b98db88ec4a0b74442409d5a2bdb07ac640d8c3d4fdfdfae3ec
MD5 303b7b83e1463b64c11734520c7d4dfe
BLAKE2b-256 f8704ac9fd56b724cd42900a87161fb3d0b2fa5e2c824616336a289b6bfb0b55

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.15-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 304081d4cafb90121fe0d9e4ec83148705fdfdb778e0a89f96b0e16d20b428b9
MD5 87b8e042168c5b8fca75d8e1db868de7
BLAKE2b-256 fc9e3289fadc2822ebf5e14d79cc9889d3a5e46f016c30d2865505973239788e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.15-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5dc9e322a99e3e7bd2a966c65ad68e7f886c94fac8d8ca28cc46771381ec67c4
MD5 d8bdaca26349a4c8a3a37ba844640f6f
BLAKE2b-256 648a590f11f5da2854dbb2148f8cae04d7673db2dbaf0db38d4d1ec504a103ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.15-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.15-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.15-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 77b84dbd1c1274cce81d7519dc29ace850d54731245d28dd1e8d78b7511030c9
MD5 781219b9501e3c82aca6f8dd342c5d58
BLAKE2b-256 94a3f6aaded6d1d31ab0f2682cd09f75fb083ff119457f54e602cb72275908ed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.15-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 e2ed8868f95ec9854ea597851dade2acc105846cc6c4805461e486c68a87bc09
MD5 bdfc738be23b833e3fe4c86c5da1b871
BLAKE2b-256 329b559cb2d7471bee15728cd68b80abb45d632ff6279956efa15b15d7012953

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.15-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 577cee28577f5111cb2c65867e2dee46d3c20a048166d261b27a3a1da046afa1
MD5 d47fd2b76fccf0d784099dde93e6081d
BLAKE2b-256 833819352d01c6e90bb01c790a1226b0bfaf84437f9bd3e8856a2f3f77683540

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.15-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.15-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.15-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 901de5cf23506cf807bfb31452705ac38d115497880bef0a513288828c6c9a7a
MD5 9b02acbc7aaa20149334e58e03342b0a
BLAKE2b-256 499eb8340e96cf099e35c018ad3319fc0efe72ebc00610141ea7866c638395d5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.15-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6cfc51e5798bcd27b1a85526f502febeb7e81f4a4c91f23961b947bc1ae3c556
MD5 a487e0d028acbe29b035f9eacf39f78f
BLAKE2b-256 d9226314a11d7c29290155e783c15fff83ff503c9b50498cda41e7ed65e826a8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.15-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1f97992a8ae76fb5134127143a7aa894231a54be8fbbab5efb9f44b807ded785
MD5 0772531f2d4b83e03623b0a722d0c778
BLAKE2b-256 6ab5dd9782e313a8f6bf7de66258793f7097b929fc95e0e60125336b5ead73a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.15-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.15-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.15-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4db82083df70ea91d6be77b2661e2f19c6a458741bab73d953bbbc1e538ec44a
MD5 274d761670e4f2ae8a6aad2df39887fb
BLAKE2b-256 365c2a6d06c7ecc25c9a07e64ebb28432fd25afd402b086bab93f23cd9ba0173

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.15-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e1cb3d1134f384f4d65ecd4df85f7bf9f652c4740eba465f48a18972376e9554
MD5 68c0a68bff2db1e537d28375cdca34c5
BLAKE2b-256 e8c4b5e9c2c1b8a23d7f03494ad368cf3c681a492a40f20b261526c42802ca03

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.15-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.15-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 17d7945f761fb09cad615126fefe77a87d44e159f34cb240a8ed6ecf24bc5559
MD5 9036e2b62bce9e1fb834be1ff259ace3
BLAKE2b-256 0846b49ffc9a79f45fbabd5e354a1a1227003dae920fc6c4e5f9496a001dc773

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.15-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.15-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.15-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 495600028886b59d006e0bd94f7ba2f0359c02b0af843e036910f5297c615d75
MD5 395cccabe7420fa9330a1c73328461dc
BLAKE2b-256 d0216c32c62519885c0c558a4c982aad78227bc630c47092fca3812dcc703a51

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.15-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1786612a4cae73c34ac7da9aaa383b9d3175ef663271b39c8ce1542b2d911ec6
MD5 00e21d449af35e6031f151e3cf0f6cf5
BLAKE2b-256 c567b426fbeb959db5d08a4699bc6c09d1d7b8d6a2ce3466df7c3b954881b3b8

See more details on using hashes here.

Provenance

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