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

Uploaded CPython 3.13Windows x86-64

openbricks-1.19.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.19.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.19.1-cp312-cp312-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.12Windows x86-64

openbricks-1.19.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.19.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.19.1-cp311-cp311-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.11Windows x86-64

openbricks-1.19.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.19.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.19.1-cp310-cp310-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.10Windows x86-64

openbricks-1.19.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.19.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.19.1-cp39-cp39-win_amd64.whl (17.3 MB view details)

Uploaded CPython 3.9Windows x86-64

openbricks-1.19.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.19.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.19.1.tar.gz.

File metadata

  • Download URL: openbricks-1.19.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.19.1.tar.gz
Algorithm Hash digest
SHA256 f1e5569f3ad15257122f25872c0ea2c13db02c29584a1668f8ef0337ebc93ba9
MD5 9c21c5524e346e4248b8ee069227e31a
BLAKE2b-256 13575ad207a8393428e621e61f29de0d62ce54bb764159673ef1e1b038900da8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.19.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.19.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 40e4d5a6fa444fb4b2fd7f0d5682ab8f1b7340b3e1816715f0d9bca9d47c9278
MD5 97aa7395daa850030e1b5d96a8ce4452
BLAKE2b-256 3eb81d0c07682c28e000db2b5e3fb2ea49624c3546908b3d52b13eae632001f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.19.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.19.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.19.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7425b25a852add442174b653900c6a20123fc4c25c5cc4565fd49d755c5982e8
MD5 2e786874264be9ae7165f1862f62969e
BLAKE2b-256 dea4d5aff196e173b135c14a3db2e66f4df0bfed5ade5b6e9c579009bd5b41df

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.19.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 5e882217fe40e2f7e2f4ebec447f13a120840875d048babaafebaa13775b73b8
MD5 aa95a5696c4ab5facd83f31f2d18a4d0
BLAKE2b-256 05af52e5d9c664572cb67e111ad69b0a376d2c76b14ea075da3eded02eafd035

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.19.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.19.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2c47f556596456abc45e531a24545e24be69b6e424f2e98726e79ed7c605c82c
MD5 219c20541a82303070bd8f34799abcae
BLAKE2b-256 07731d170b806c0712e1e95b63b5a865cb946f5bc69a989950d7bf4e600bf895

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.19.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.19.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.19.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 1ded7ebeab35fbc9f64d0ec34c57b99219b79198d12c9c0e30cb7be01e019f21
MD5 03b4fd1b4d19c2b17e52affe5436cf06
BLAKE2b-256 79d5ed7c1bd301be398037923e5a42d8dd973184fe3144d141205625ca79c823

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.19.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 8fed340b90c0385cce09d746fff359af82942be7d2cb0b129015303af252d42d
MD5 918d4390fbbec5303cf12ec1b4825605
BLAKE2b-256 9921e08635f8df8ee5f788170e054473f225ed7e9fbb37636501aaeed27db6dd

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.19.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.19.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 057f13f4ed9ca3a122a51641b4fb7a5574f0d7a5b779a719f887902e8132551f
MD5 ed0a4d5dce72e9070d47c8a319661422
BLAKE2b-256 5ba5d43441bb26da441088d64599e349067eff557675572e570122e8fc4484a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.19.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.19.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.19.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 16880e618e98e8d36cb0007d5dc34b4c17f311e967bb8773f08c14e6a4cd02bb
MD5 7585cffee9938070889f2ad29a27dec1
BLAKE2b-256 b2d92b91cfaf990daee9c6e59a7c15ed5f4584bfffe0ed17dfd7099a5f02b71b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.19.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b1f94344fbab803b093aaf54df2a06360918b4e7290af683ac704ccc1d3d626a
MD5 fd2b314011a1e6ec649ea7e0946e1ef1
BLAKE2b-256 94230e8b89f3ddf762dd865a5b227187a6d8d63026589d57ed12ae6975b311c5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.19.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.19.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 537436ac05cda6d19db30afcc0281d17784ae842c1db7513317a7a843818dfe7
MD5 fd316b4d8520fc922267ffb5cdd84eb8
BLAKE2b-256 36752d0b155ad7dede1c32cb029943441845496401114cde9280556cabd5a74b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.19.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.19.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.19.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3e070b4a5c511943cc63f423c1c8f9ad05c715373ae8e6a410655acf3f2f5930
MD5 0ec6bde20145598cc3c527e7ed6e0d2f
BLAKE2b-256 07e345790447c24168dd733281db0baaa48e8ef6638a8f3299ece3384b5bbf9d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.19.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3f4197d7ec610acc00574b612fbf6b169c7d47738577dcea5e4d3428fc3314db
MD5 6a788e34a8d77a1b078b633abe9dfdc5
BLAKE2b-256 4d9be8ad8b0c7f528ff3b5f3e7171b3fab4418b771d9f66d958deefe46453f3e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: openbricks-1.19.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.19.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c83e9559c7e08f6d16ec762101927885e27ff017eeceb2d17ad30ffcaf623d86
MD5 0e66c4940814ae3787c8421ca0ada2ec
BLAKE2b-256 32740d445cffcbff38c336ff1a5170c25628bb0f8d20d19757a652c36d20b428

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbricks-1.19.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.19.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.19.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9d1dd782a4db8288620d4e9c8d95bd93b30d316f1bb2a25faab789a035bba842
MD5 123804f8e58ef0e77eb0a5b2ce63ae46
BLAKE2b-256 e4a5e828311305fa398cb915e80eb0ba41d15c14061c90fbb6fad130947d45bd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openbricks-1.19.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2f48c0bff63c4b8dc8511f7fc338e6c0140df99fc3c6cc66bf396d8f512d1791
MD5 81a071b89e0d3567b41dd31a93190575
BLAKE2b-256 18c485cdda46d4df6e3c8c69632a33e4f58ea181fea8d03fd8709ba7c03fb9cd

See more details on using hashes here.

Provenance

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