BMCLI Execution Modes
命令名、参数与机器可读字段保持英文,以便直接复制到终端或交给 AI 使用;当前安装版本的精确契约请以
bmcli help ... --format=json为准。
| Mode | When | Channel open/close | Latency |
|---|---|---|---|
| Standalone | Daemon not running | Per-command (~2.75s overhead) | Slow |
| Daemon | Daemon running | Once at startup | ~50ms |
When a daemon is running, commands that support persistent execution are forwarded to it. Some discovery, file-only, Help, update, and health commands remain local; some stateful operations require the daemon. Consult command Help for the installed-version execution requirement. The daemon avoids repeated USB open/close and preserves channel/protocol state.
If no live daemon PID exists, BMCLI may execute the command in standalone mode.
If a daemon PID is live but TCP communication fails, BMCLI returns a non-zero
IPC error and does not fall back to standalone. This prevents an enumeration
index such as 0 from resolving to a different physical device while the daemon
holds the originally selected device exclusively. Connection attempts may be
retried only before any command bytes are sent; BMCLI never automatically
re-sends a command that may perform a hardware action.
Explicit start: BMCLI does not automatically create a daemon. Start it with
bmcli daemon start when a workflow needs persistent channel state, and stop
only a daemon owned by that workflow.
权威来源: bmcli_reference.md in the BMCLI repository. Run bmcli help <category> <action> --format=json for the exact contract of the installed version.