swarmexec › Docs › CLI · TUI · MCP
CLI · TUI · MCP_
Which interface does what — and why some things live in the TUI alone.
swarmexec has three faces: the CLI for scripts and one-off
commands, the TUI (swarmexec ui) for looking around
and changing things interactively, and the MCP server
(swarmexec mcp) that lets an AI assistant read the services you opt
in. This table puts them side by side.
The rule behind it: whatever the TUI changes has a CLI twin, or is
listed here as TUI-only with its reason. The MCP server is read-only
on purpose, with one exception (exec_run, off unless a service's
labels allow it), so a write action is never a gap in the MCP column.
The CLI reference lists every command and flag.
This table is swarmexec against itself; for the line between swarmexec and the
Docker CLI, see Next to docker.
A cell names the command, key or tool. — means the interface does not offer it. Rows marked TUI only are deliberate; the reason is under the capability.
On this page
Reading the cluster
| Capability | CLI | TUI | MCP |
|---|---|---|---|
| Cluster overview: nodes, replicas and health of every service | status | the tree and the Nodes tab | cluster_overview |
| Services and their containers (slot, id, node, uptime) | ps | Stacks/Services tab | services_list |
| Live CPU and memory per container | stats | markers in the tree; i → stats view | stats |
| Inspect a service: spec and recent tasks | — | i on a service | service_inspect |
| Inspect a container on its node TUI only for now: it reads the container from its node's agent, picked from the tree; a CLI form can follow. | — | container menu → inspect | — |
| What changed in the cluster recently TUI only the manager's event stream is already open for the live tree; keeping it is free there and would be a daemon connection a one-shot command does not have. | — | e activity overlay | — |
| Security risks of the deployed services | security report (whole cluster) | ! overlay | — |
| Security report of the whole cluster (Markdown) | security report | ! then w | security_report (with --allow report) |
| Placement diagnosis — why a task is missing TUI only for now: it is one view over nodes, constraints and task errors; there is no CLI or MCP form of it yet. | — | i → a → D | — |
Containers: logs, exec, forward
| Capability | CLI | TUI | MCP |
|---|---|---|---|
| Logs of a container, a service or a whole stack | logs (--stack, -f) | L, the log view | logs_read (bounded, never follows) |
| Interactive shell in a container | exec | container menu → bash / sh / shell as user… | — |
| Run one command in a container | exec web -- cmd | — (open a shell) | exec_run (needs the service's exec label) |
| Copy a file in or out of a container | cp | container menu → copy file out of / into container | — |
| Copy a file between two containers CLI only picking a second container is a selection the TUI has nowhere else; it needs its own design. | cp web.1:/f db.2:/tmp/ | — | — |
| Forward a local port into a container | port-forward | p; the Forwards tab | — |
| Copy a container's id TUI only the clipboard belongs to the terminal UI; on the command line ps prints the id. | — | container menu → copy id | — |
| Kill a task's container TUI only a deliberate, one-at-a-time act on the container you are looking at; Swarm replaces the task, so there is nothing for a script to wait on. | — | container menu → kill task | — |
Stacks
| Capability | CLI | TUI | MCP |
|---|---|---|---|
| List stacks | stack ls | s groups the tree by stack | in services_list |
| Export a deployed stack as a file | stack export | E → export | — |
| Diff a stack file against the cluster | stack diff | E → compare | stack_diff |
| Security-check a stack file before deploying | stack check = security check | E → deploy checks first | stack_check |
| Deploy a stack file | stack deploy | E → deploy | — |
| Remove a stack | stack rm | X on a stack row | — |
| Wait until a deploy has converged CLI only: a gate for scripts and CI; the TUI shows the same state live. | wait | — (watch the tree) | — |
Changing a service
These are the editors behind i → a on a service
(edit a service). They are TUI-only on
purpose: each is an interactive, staged edit of one live service. In a script
the declarative way is the stack file — stack diff, then
stack deploy — and every one of them is also a
docker service update flag against the manager, which swarmexec
does not need to repeat.
| Capability | CLI | TUI | MCP |
|---|---|---|---|
| Set or update the image version TUI only | — | u | — |
| Diff the spec against the previous one TUI only | — | d | — |
| Roll back to the previous version TUI only | — | R | — |
| Scale TUI only | — | s | — |
| Force-update (redeploy unchanged) TUI only | — | f | — |
| Edit env, labels, ports, networks, secrets, mounts, resources, placement TUI only | — | e l p n S v r P | — |
| Remove a service TUI only | — | X | — |
Nodes and disk cleanup
| Capability | CLI | TUI | MCP |
|---|---|---|---|
| List nodes: state, role, resources, what each could reclaim | node ls | Nodes tab | nodes in cluster_overview |
| Prune a node per category | node prune | P on a node | — |
| Show or set the cluster-wide prune schedule | node prune-schedule | S on the Nodes tab | — |
| Node labels and availability (active / pause / drain) | node update | l, a on a node | — |
Volumes, networks, secrets, configs
| Capability | CLI | TUI | MCP |
|---|---|---|---|
| List volumes on every node, with their users | volume ls | Volumes tab | volumes_list |
| Remove a volume on the nodes that hold it | volume rm | X | — |
| Remove every unused volume | node prune (volumes category) | P on the Volumes tab | — |
| Create a volume; attach one to a service TUI only attaching is a service edit (see above); creating names a node you pick from the cluster. | — | n, A | — |
| List networks, with subnet-overlap findings | — | Networks tab | networks_list |
| Create a network; attach, detach, DNS aliases TUI only service edits and docker network create already cover scripts. | — | n; a d A in the members view | — |
| Subnet and MTU advice before a network is created TUI only it is part of the create form: a free subnet and the MTU the underlay actually allows, proposed before you confirm. | — | n on the Networks tab | — |
| List secrets (names only) and their users | — | Secrets tab | secrets_list |
| Rotate a secret and keep its name | secret rotate | R in the secret's detail | — |
| Create, delete, attach, detach a secret TUI only docker secret create / rm and service edits cover scripts; the TUI adds the editor. | — | n, X; a d in the detail | — |
| List configs and their users; read a config | — | Configs tab | configs_list (names and users) |
| Create a config TUI only docker config create covers scripts; the TUI adds the editor, as for secrets. | — | n on the Configs tab | — |
Contexts and the agents
| Capability | CLI | TUI | MCP |
|---|---|---|---|
| List Docker contexts | context ls | the sidebar (c) | contexts_list |
| Create, remove, switch a context | context create / rm / use | n, X, u in the sidebar | — |
| Deploy or remove the agents | init, down | — | — |
| Update the agent image | init --force | u on the agent service | — |
| Check manager and agents | doctor | status line names the failing agent | doctor |
| Show the effective configuration | config show | — | — |