Command line
Every command is mcuctl COMMAND [options]; python -m mcuctl COMMAND is the
same. mcuctl COMMAND --help lists a command’s options. Board commands take
-d DEVICE (also --device) after the command name: a serial port
(COM4, /dev/ttyACM0), ws://HOST[:8266] for WebREPL, or ble://NAME for a
bledev board. With an editor session connected and no -d, a command uses
that session. A failure prints {"ok": false, "error": "...", "hint": "..."}
and exits non-zero.
Session and connection
Command |
What it does |
|---|---|
|
Whether a session is up, which device, which interpreter |
|
List serial ports; |
|
Connect, let go, reconnect to the last device |
|
Tail the activity log ( |
|
Call a session method directly ( |
Files
Command |
What it does |
|---|---|
|
List, tree and free space |
|
Upload. |
|
Download, same options |
|
Copy; |
|
As named. |
|
Edit a board file with |
|
Remove debris a session leaves (probe scratch files, |
|
MicroPython over serial only |
|
Read, build or write a MicroPython ROMFS image. Over WebREPL, |
Run and reset
Command |
What it does |
|---|---|
|
Evaluate an expression, or run code; |
|
Run a local script; |
|
Run, wait, and read a result file ( |
|
Tail the board’s output without interrupting it |
|
See Run code and use the REPL. |
|
Enter the bootloader |
|
Read the board clock, or set it to the host’s UTC |
|
Read-only console capture ( |
|
Read-only tee of a second port that dies with the command; prefer |
|
Windows: restart a wedged ESP32 or CH343 USB node ( |
Packages
Command |
What it does |
|---|---|
|
Install with mip (MicroPython); |
|
Install an OmniPython package and what it needs from micropython-lib (MicroPython). |
|
Copy |
|
Install with circup (CircuitPython); |
|
Search the package indexes. |
Wi-Fi
wifi boards, find NAME, password BOARD, status, enable, disable: see
Connect over Wi-Fi.
mcuctl hold
Holds one device’s friendly REPL open across commands. See Drive a running app.
Command |
What it does |
|---|---|
|
Opens the connection and stays ( |
|
Types the code, waits for the prompt after it, and returns what came back. |
|
Types it (Enter is added unless |
|
What the device printed since the last |
|
Ctrl-C, then waits for the prompt |
|
Runs the code through the raw REPL and returns to the friendly REPL. The one command that leaves it |
|
Lets go (asks the holder, then the PID from its PID file), or shows holders and offsets |
Every answer is JSON with a next offset; --text prints only the answer.