RaftCLI - robdobsn/RaftCore GitHub Wiki
The RaftCLI project installs an executable program on your machine called raft. It is partly a wrapper around the Espressif ESP IDF build tools and also provides a consistent developer experience for scaffolding, building, flashing, serial monitoring, remote logging and OTA update of Raft applications.
RaftCLI handles the following tasks so you don't have to interact with ESP IDF directly:
-
SysType resolution — determines which SysType to build (from the
-sflag, a previously recorded choice, or the first SysType folder found) - Build method selection — automatically chooses Docker or native ESP IDF, with options to override
-
ESP IDF version matching — reads the required ESP IDF version from the project's
Dockerfileand locates a matching local installation for native builds -
Build invocation — calls
idf.py -B build/<SysType> buildwith the correct environment -
Flash — uses
esptoolfor flashing - Serial Monitor provides a built-in serial monitor with command history and auto-reconnect
- Remote Logging provides logging and command handling over an IP (WiFi, etc) link directly to the terminal
- OTA update — sends firmware to a device over WiFi/Ethernet
For a detailed description of each build stage that happens after RaftCLI invokes the build, see Raft Build Process.
RaftCLI is written in Rust and installed via:
cargo install raftcli
You will also need either Docker (for containerised builds) or a locally installed ESP IDF (for native builds). For flashing, install esptool:
python3 -m pip install esptool
| Command | Alias | Description |
|---|---|---|
raft new <folder> |
raft n |
Scaffold a new Raft app |
raft build |
raft b |
Build the firmware |
raft run |
raft r |
Build, flash and monitor |
raft flash |
raft f |
Flash without rebuilding |
raft monitor |
raft m |
Serial monitor |
raft debug <args> |
raft d |
Debug over IP |
raft ota <ip> |
raft o |
Over-the-air firmware update |
raft ports |
raft p |
List serial ports |
raft esptool <args> |
raft e |
Run esptool directly |
Use --no-docker (or -d) to build with a local ESP IDF instead of Docker. Use -s <SysType> to select a specific SysType.
Full documentation including all command options is available on the RaftCLI GitHub page.