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.10.tar.gz (17.2 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.10-cp313-cp313-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.13Windows x86-64

openbricks-0.10.10-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

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

openbricks-0.10.10-cp313-cp313-macosx_10_13_universal2.whl (17.2 MB view details)

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

openbricks-0.10.10-cp312-cp312-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-0.10.10-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

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

openbricks-0.10.10-cp312-cp312-macosx_10_13_universal2.whl (17.2 MB view details)

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

openbricks-0.10.10-cp311-cp311-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-0.10.10-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

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

openbricks-0.10.10-cp311-cp311-macosx_10_9_universal2.whl (17.2 MB view details)

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

openbricks-0.10.10-cp310-cp310-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-0.10.10-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

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

openbricks-0.10.10-cp310-cp310-macosx_10_9_universal2.whl (17.2 MB view details)

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

openbricks-0.10.10-cp39-cp39-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-0.10.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl (17.2 MB view details)

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

openbricks-0.10.10-cp39-cp39-macosx_10_9_universal2.whl (17.2 MB view details)

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

File details

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

File metadata

  • Download URL: openbricks-0.10.10.tar.gz
  • Upload date:
  • Size: 17.2 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.10.tar.gz
Algorithm Hash digest
SHA256 c25b4e69fda30fe94b1b53a747f9066559806948b9219b07b7565806366d9e1c
MD5 b945a5d98bf4b88ee45e1c2d2654755d
BLAKE2b-256 c2869f1f19b1bb12a285960d4e5891e533db8f9d42d89bf99f6f39dd3e847f97

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.10-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 877aa9aae522ffa22ac1d6cbc65248bc10b3ea66f95f59dd21bacaf9260f41d9
MD5 08d0f00180b53e90374bfd2c95b38448
BLAKE2b-256 67e60672d5d380037359b18215236c1aab5c6b8bcbe9949c26ed571f98001493

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.10-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.10-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.10-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e5f9b5db6df1a10143420f48aeea19b39ccaa2204c3e4142987a630147d2f3f7
MD5 63520710d569d2ac600c023286ff647d
BLAKE2b-256 dba353ddb032c2c6613955d9210ca3ff61a0289e8aa605d5669d572c3df1174d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.10-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 c09c868980bcece2e29eda389bcc1a8e951690e3c43410775f6fb7337b317b5c
MD5 c47114b357373b61d60c8784e0bf2f9d
BLAKE2b-256 a4f9140fc4c32dba87f2a614661041a4917bb0a094bc1a9f057d50241e3276fb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.10-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0e94577d10f9ab761fcc1cba07f211df45d8faa08ceb6438bf432a055328a4fd
MD5 ffb73e46fd395c8a0cffd1c0234b4440
BLAKE2b-256 3fda172025e30b2c78ffd4d54ea283ed5c3f66719f9c9ea5da3f763a16414abc

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.10-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.10-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.10-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0ca98cfb53cff98410d34f0ef552189653bebcd9816e601f804dce3147a6972c
MD5 db4950641003a8939cd517c1a4216c48
BLAKE2b-256 9ff5051b599d9e4f2574b7af2b35d207d1886cb56014862da3d0dcd74ee929d4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.10-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 698dfdeff83b8c5844cab15e1376bb1fc5c3f727712723def49df180bbae4c03
MD5 a18417fd1b9abd77381b7b9495a274a6
BLAKE2b-256 9346793629971ecf04a4cdf3649aa6276181d3974fdea25221ba632cf8f4b3a0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 466a94d367b577754fd4a36de80d56944d332444ce065f0b1e8b189751175280
MD5 e481e681b955d2921b63866ee90493e6
BLAKE2b-256 72f1e485d9a512d3e07161f0f6eb3a125aed5b86001e0fc9f1b8019a8c320232

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.10-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.10-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.10-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 77b55f76f8440f033752206eb6f2cc9f35d883ebace3a1f6e7abc0f06dfac25c
MD5 09aaad38d7401d25ae42e6650a128c9e
BLAKE2b-256 f65c0d0d4a11f9ac6ac8822f3e6026dc0384ca39ebd4a445ba5479aac85abed2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.10-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6e53360c08de9c65bb179e47126c46b578e4cc9c9bc4cfe4f48ab9e2bf0c29f3
MD5 e448e003e25b9f58bbae903f1a8ad3a0
BLAKE2b-256 0f7038fe2c2d51a967354252e5697bcc19d10a3a06587f5e926e3ee34dd08456

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 26a970ad01bc19c5eaf64b045030e2977c191b81f6783a2be84ad1a4698faeb7
MD5 1711df8cf9115ffc91399222cad5a2ad
BLAKE2b-256 b937c578b43e30ef3a452726cd9c877355a00850bd97e1b4bbc67b232006e04d

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.10-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.10-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.10-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3cd91f81e41500329ad303d2c30514342ab07f8f2dd73d7743bea64ec7877231
MD5 e81778596495cf814a1ac66194a3bc23
BLAKE2b-256 2b843e0fffa8c1813fa0628be2e04de36779b4e3f7744256932a84a4c9c4f89a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.10-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3d6453dac677614dcd4b847f8882625aa5fceedc7a0a0b107d44af93fc146ab1
MD5 2e280947a09a044fabd494da174d8589
BLAKE2b-256 8d24874aedd1b4b7021c8b829e87ab4756a87471954d68e6155ae9bdb19f015f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-0.10.10-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 17.2 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.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c3c573caa0fedce30d4c748b26904ef165a7a4a059d34e47b1b4ebac3c3fd41d
MD5 3411d3f1af2c0af0da539e014cae2c6a
BLAKE2b-256 7c6ca7a1c8edc4a7f61a1faa613e71333affd24ac0bb57f4ab7bb0ee346285c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-0.10.10-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.10-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.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e7a6847c0471f3eade16cea40e6b6585772ec59855275ec8c816daaa24a7cdfb
MD5 a05bd8f9f3064f94032fe88810ebb9c2
BLAKE2b-256 24a25f48788f5f35cd76f9dd60a946ee41831e71c067a78503dd3cf86fb35020

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-0.10.10-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6824eba082814af7957fc6877300f1bb13c91dd82d46e8c1511a6933e7e2e6df
MD5 2f46a9f00f7c2a881d52e8bab4fabdcc
BLAKE2b-256 bf694dfcc91681f3ca29f08f86f76e33f842c712592b00297425710ff92b2ddf

See more details on using hashes here.

Provenance

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