mooncake fleet exec¶
Run an ad-hoc shell command on one or more fleet peers
Description¶
Fan-out a single shell command across selected peers. The command runs through the kernel's shell action — $VAR is expanded by the peer's shell, NOT the controller's. Use -- to separate flags from a multi-arg command form; the args are joined with single spaces before dispatch. For --json output one JSONL record per peer is emitted; pair with jq for scripting.
Flags¶
| Flag | Type | Default | Description |
|---|---|---|---|
--peer |
[]string | - | Select peers: repeat to UNION. Each value is a name, key=value filter (tag=production), or @k=v,k2=v2 AND-group. Default: every peer in peers.toml. |
--peers-file |
string | - | Override the peers.toml path |
--parallel |
int | 0 |
Max peers in flight (0 = unbounded) |
--env |
[]string | - | KEY=VAL forwarded to the shell step (repeatable) |
--cwd |
string | - | Working directory on the peer |
--timeout |
string | - | Per-peer wall clock (e.g. 30s, 2m); enforced by the kernel |
--become |
bool | false | Run with sudo on Unix peers (maps to as_user: root). --ask-become-pass is deferred to spec-47. |
--shell |
string | - | Override the default interpreter (bash, zsh, pwsh, powershell, cmd, ...) |
--no-color |
bool | false | Disable ANSI colors in the [peer] prefix |
--json |
bool | false | Emit one JSONL record per peer instead of multiplexed lines |