SerialCLI gives you a serial command line to inspect its state and change its behaviour while it runs.
SerialCLI
A running firmware is a black box. SerialCLI gives you a serial command line to inspect it and change its behaviour while it runs. Register commands for state, settings or actions. Type `help` and the table prints itself. No heap, no UART dependency.
What you get
- `SerialCli.h` and `SerialCli.cpp`, a two-file C++ library.
- A compile-time command table, 32 entries by default.
- Feed it one character at a time into a 256-byte buffer.
- Generated `help` output with a project title.
- A seeed_xiao_esp32c5 example with `ping`, `led` and `uptime`.
Dispatch details
Characters accumulate in a fixed buffer until CR or LF arrives. `dispatch()` skips leading spaces, splits up to 16 arguments in place and compares names case-insensitively. Unknown names get a short error. Replies use `writef()`, capped at 160 characters. Tokenizing in place saves stack on small cores; that tradeoff matters more than a fancy parser.