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

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.20-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.10.20-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.20-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.20-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.10.20-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.20-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.20-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.10.20-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.20-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.20-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.10.20-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.20-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.20-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.10.20-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.20.tar.gz.

File metadata

  • Download URL: openbricks-0.10.20.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.20.tar.gz
Algorithm Hash digest
SHA256 116d188ed9826903fc8b0ab927c308e38872f5c8529130baa9a8857ab3db22a4
MD5 f107440601f5f65626583ce26acf0da6
BLAKE2b-256 1379d23886dfa0e75b4f513045881a3d5fbf15ead1d99d8972d6a50c4368f249

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a0275ea8430a6fb2c2cdd8a0a169043253d1bd9cebc95b2ec3272fa63c37cdff
MD5 fa5bdc6acf6bbd114f15e90ff58c5c56
BLAKE2b-256 aec4d61d5e7a23bab8bc254b6e40e932382e974a0bfdd42e88a1e10c8be294dc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7127935d2b1b1c42ecd195708c5373c19acb9e60f58f51e724728f1becf6dfbf
MD5 d828e81b586ce26bee2d70f0cbd67663
BLAKE2b-256 e63ad8c4a8f81af3c8b2409bdcfee3cb27b49bbadeed6e6f241eb6d3cd390cb5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 204cbe658cf41ef5b780169796c10ea54e6bb175a69d867793a894dbf9f705bc
MD5 699d99b84903af19c59ddec6f2c56e05
BLAKE2b-256 e9edb3818eb19f6468ff1d56c2834177557471a716337a38dbc178152fb6604d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 496a5ad64cd29f0d01c47a303328a815d63dbd6e979e4c16325cb4182cc2997c
MD5 7f713a3e22f0e488986d3b12eab7c083
BLAKE2b-256 12a162f12064e962296818fcfb81eb01bfd4541b967f23f1208e148b5bac371a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a566ab9f086a12dc3829f1a9c59d030bc5b3ae04931afd699bcdd1aafd6541c7
MD5 06c6729740bba1b119f3780b7709f4bb
BLAKE2b-256 d13659f0d1a47233d48ff758b8b3a9eb2b45fcc49997485b39c3e5e470a79d40

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 38851b9087a0b21f317d66cbfa5a46ee7cf7d5530d5f021416f3da48c0791968
MD5 a58c6ffa34b86d291c208e25d47f9336
BLAKE2b-256 2822256151d84a164473f3b0bd8d3387d1bb2b5cf2f03a1591fe8cdeb5f2d387

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bfb2d4bf840350b945a2c6ad884633b608fa7bb8e0248e3071c48c5ddc79f4af
MD5 c990c4aecc0be55c128e4ed372a1fcbf
BLAKE2b-256 b58346a327f5c09c12032def42eea0d6c8366af44dc8043d20929ce2f96bebec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a3ea85c2fb05e9f60e31831f672fbe3bbd051f2470a71acc6cbd8afac1e97dc5
MD5 db2db820914a7179d4fd24f2e7e63b10
BLAKE2b-256 b7b1ae917a36cf6af096c6b5b6ef185480742f764d6df94abae919118b2ec4ae

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 817db7746ad4d767508ffdd0d8eeb40e72ad4cec4e3aa66a19b8a4051bd5a8d0
MD5 9f100fb222481e33c41d7d27085e12ab
BLAKE2b-256 4bfd2e7c91d8516bcd3bba50088f67afa2585f9ee7e8adce36dd0108b437e694

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e5eb6661c52be22cb21de0dcdf54e8e2310d1557812664db217b8a9a867a5800
MD5 b3cccde81f722f0036dae79bdadc2bd6
BLAKE2b-256 3c969cf26e4db8c8ccab6061b18373d63c599fdb5578d8170a67cdcb4b95fb01

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b90723b604986bfaa4f268f17df2df191a4c528f3e4e22e6ee3591ddd583360d
MD5 d072484aafd683e55ef2e83ff49db803
BLAKE2b-256 55d84172f770d9023c5949039a32f3f333667f9de4572f0e1fb1973cd318bd8a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fa2ee84911a5479d97e7186d3851feeaff0ab5ca99146833ff32813412872805
MD5 8b46afbfa99a53cfa6a81bc4be4c9921
BLAKE2b-256 8602d373dcfa3d2af34062065508b047881cfbf43c454d3c6157430a1440ff76

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.20-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.20-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b09549ee8e45ef05d8e3bebef5ed53a950fbbe13b5b0feaf6ffa5d50cbcda0cd
MD5 f45e33d2f63c9f275d8f58f3e7551dbf
BLAKE2b-256 948f774d489b61bf4508b93e490608364384b4bf04e1a07c7a0756283c72ddf2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3e6a67416ba833b266d2243c0be0fcd8fddbb3ceaa847ef16cbf35da4ce81676
MD5 bc01898d154283c7e8c5058dd266aef3
BLAKE2b-256 85318ac40587df623096e056037a27f504be825075878b4377ded31dd928136e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.20-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c0741f1c7065c4021290e9f546596a53010e7207c953fc353d998a0a35c03c65
MD5 d5ea3ceb192e92e970f0168e25ff7a1e
BLAKE2b-256 702d5b5436f4beafa93520be8906d02b5f562cdf30e0069301dc15f7e4bb6f15

See more details on using hashes here.

Provenance

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