swarmexec

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.

Reading the cluster

CapabilityCLITUIMCP
Cluster overview: nodes, replicas and health of every servicestatusthe tree and the Nodes tabcluster_overview
Services and their containers (slot, id, node, uptime)psStacks/Services tabservices_list
Live CPU and memory per containerstatsmarkers in the tree; i → stats viewstats
Inspect a service: spec and recent tasks—i on a serviceservice_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 servicessecurity report (whole cluster)! overlay—
Security report of the whole cluster (Markdown)security report! then wsecurity_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

CapabilityCLITUIMCP
Logs of a container, a service or a whole stacklogs (--stack, -f)L, the log viewlogs_read (bounded, never follows)
Interactive shell in a containerexeccontainer menu → bash / sh / shell as user…—
Run one command in a containerexec web -- cmd— (open a shell)exec_run (needs the service's exec label)
Copy a file in or out of a containercpcontainer 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 containerport-forwardp; 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

CapabilityCLITUIMCP
List stacksstack lss groups the tree by stackin services_list
Export a deployed stack as a filestack exportE → export—
Diff a stack file against the clusterstack diffE → comparestack_diff
Security-check a stack file before deployingstack check = security checkE → deploy checks firststack_check
Deploy a stack filestack deployE → deploy—
Remove a stackstack rmX 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.

CapabilityCLITUIMCP
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

CapabilityCLITUIMCP
List nodes: state, role, resources, what each could reclaimnode lsNodes tabnodes in cluster_overview
Prune a node per categorynode pruneP on a node—
Show or set the cluster-wide prune schedulenode prune-scheduleS on the Nodes tab—
Node labels and availability (active / pause / drain)node updatel, a on a node—

Volumes, networks, secrets, configs

CapabilityCLITUIMCP
List volumes on every node, with their usersvolume lsVolumes tabvolumes_list
Remove a volume on the nodes that hold itvolume rmX—
Remove every unused volumenode 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 tabnetworks_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 tabsecrets_list
Rotate a secret and keep its namesecret rotateR 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 tabconfigs_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

CapabilityCLITUIMCP
List Docker contextscontext lsthe sidebar (c)contexts_list
Create, remove, switch a contextcontext create / rm / usen, X, u in the sidebar—
Deploy or remove the agentsinit, down——
Update the agent imageinit --forceu on the agent service—
Check manager and agentsdoctorstatus line names the failing agentdoctor
Show the effective configurationconfig show——