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

Uploaded CPython 3.13Windows x86-64

openbricks-1.15.1-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-1.15.1-cp313-cp313-macosx_10_13_universal2.whl (17.3 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

openbricks-1.15.1-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-1.15.1-cp312-cp312-macosx_10_13_universal2.whl (17.3 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

openbricks-1.15.1-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-1.15.1-cp311-cp311-macosx_10_9_universal2.whl (17.3 MB view details)

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

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

Uploaded CPython 3.10Windows x86-64

openbricks-1.15.1-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-1.15.1-cp310-cp310-macosx_10_9_universal2.whl (17.3 MB view details)

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

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

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: openbricks-1.15.1.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-1.15.1.tar.gz
Algorithm Hash digest
SHA256 6b93d1a7f238f230ca1010dec61a90b244890036a588345b0e9405b8496c30bd
MD5 2b2598929252258d186b882d54b13c49
BLAKE2b-256 22b47b9a32247140d9327a69c43a7a89ed627aaec96b66fa5a40ad4825f7d26e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.1-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-1.15.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 19d1cf8ed1c0fa8b284b50b2b8335b893c7dcbaefa53f98f1b9363732b80088a
MD5 5044f500f14eced36b84232bf6f7fcda
BLAKE2b-256 abe9272ce36ca0fee4bff231dd03b5fd0190c6d255afaa64ac2b758c915b06c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.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.15.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.15.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 ce06529f4c5f30e463c38f3488247996fd77fe1984a593651f5ff794e6905708
MD5 4b3cb5bd67e2f0681a979f02396e202f
BLAKE2b-256 8795c1925fe23a6705ec673b126ca3475b001dc0a697a740de9fca203d4ed7b1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5a2221ea0a75d2b85bf7de2707d6ed130642451214888b8e0b39df17a21b6f45
MD5 fe2e2abc699ff1d304aa8e5c0a8c5aa3
BLAKE2b-256 e87d187b9701189d85aa5c4931cbcf9b2d9113a11aab7f7de3357cfb6662d86f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.1-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-1.15.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8e9f95445a5b0a19df288f479d5c648395f7c90266893b47ff7ed0b97f478477
MD5 ae0cc984398f1d3be541a4b21fe5a6a1
BLAKE2b-256 bd5e4db2cd7421c86c4e61eb3ac423b5ea47347411247a799961581675e65484

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.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.15.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.15.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8ae5a04879872fef974ca0f8f8927a0d94fa73b38f84ef55966b115e8043f837
MD5 bff1ec0ed39b3f846ee867cfdb82c16c
BLAKE2b-256 777115ee85b9bcd8fec5bf00e4f259a61bc26845809e6cf5b1cf286b97278e36

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 c275c2e56cc7ceabcd1096e499352ff745dc19e21052dd34bd9a31b610a66e09
MD5 745cedc8af165a7ccc9688c6f80841fa
BLAKE2b-256 88815e29e604c6154ea23f315ed1dd07b134f5543dfdc15ca6e9a7ceb467081d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.1-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-1.15.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5c7d6c853a2c83a1ebb24dd192041cf363f71bd57b5000b4853326a310af1588
MD5 6ea28951be324bc50a4229670ddfb318
BLAKE2b-256 4d80c1a4e4009e11d57ec9b8886728692d26bb211ec199fcac926ba68f88239b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.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.15.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.15.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 072601e266e34e96e0962bdd0ed28f54f07f0bc9df27ad54e1aadac2c5bec55b
MD5 983db29ea011fc4e7af9e8b8e12e9b57
BLAKE2b-256 9f46fa807868ea4119e9359ed29754d9ed67b6755b2c42c07d011c1447730fd3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 bc2aab3c87da99ad35bfdcaf9768be59bd835061b3bd642381216f54ec339c79
MD5 1d375f5a036312f6f8e936ae67a56556
BLAKE2b-256 0f9186b98d1987c5fdc4252c01fa23b612005d8f07e1d3b0dfeec4803da03033

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.1-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-1.15.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c97a259fe967224dc443ccade0cc0082926ac8f4bbc4dc36cd95e4e13a1d8613
MD5 906639eca266688dbf78cd80a035727a
BLAKE2b-256 d4eff12d7b8a46499a2f020fee78860529d18248abff5d523c13b938ebbbd27d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.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.15.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.15.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 e0bc24218611929c94d71af1cc8f0f42e89e268afdb6737324bd72806dd683cd
MD5 af07d10c266b6e76462d63c43c4807c5
BLAKE2b-256 80fcd9369fcd84a37e0041746e3d2f386c55e6259db6fe983b7a5a4780d87d10

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 447b6fad2c52822623998bc08d73c016abae43e197ac1db9e0af3c4db211a60e
MD5 e4ee5f6adf238a66f00457204c2b153a
BLAKE2b-256 820a095790d5621ea921d0a4b0605d96b8b95c6edcb61f67eb78db94748a65d1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.15.1-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-1.15.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bd27a40f27a58b7014df034f9832b9cf38d0ff1a375ba6eadd8b4395332fb5b0
MD5 21d4ff51bfe9528356ecea9ad40399da
BLAKE2b-256 c2d1fcc78bd2c20872c4494e21fd0045d1cf410422bea0fbfd57621ccfe09cef

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.15.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.15.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.15.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 03e64ef2d8ac6462ad4805b9a5a285aa19f88133398996fb324a32381074fb67
MD5 4e9dffe6e23201f01153bc38e9ce97c8
BLAKE2b-256 48c0bfb4e0dde32d78e0a0f66c9882662cb3a5fb7901728ef8e42d67d4ab3527

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.15.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a2bfc4bcf2826e123e53522c38fa708e485f139b07cc38a7aefb26aeeac801af
MD5 b0e4d3dcbf25b24fa5e2f3c48379d607
BLAKE2b-256 fd7f337e6791e9a9e674b7e6498247c8b24893a2752446557536d34049e3210f

See more details on using hashes here.

Provenance

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

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