Skip to content

Command API

This page describes command shapes used by the current app source. It is not a stable public API; it is a source-aligned reference for troubleshooting and audits.

ColimaStack resolves executable paths through tool lookup, injects the locator PATH, and redacts sensitive arguments/output before displaying command history.

Required binaries are searched in the process PATH plus:

/opt/homebrew/bin
/usr/local/bin
/opt/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

For Docker and Kubernetes commands, the app forwards COLIMA_HOME, KUBECONFIG, DOCKER_HOST, DOCKER_CONTEXT, and proxy environment variables when present. Missing binaries become Diagnostics or backend issues.

All profile-scoped Colima commands set COLIMA_PROFILE=<profile>.

PurposeCommand shapeMutates state
Profile listcolima list --jsonNo
Profile statusCOLIMA_PROFILE=<profile> colima status --jsonNo
Start/create/apply profileCOLIMA_PROFILE=<profile> colima start [flags]Yes
Stop profileCOLIMA_PROFILE=<profile> colima stopYes
Restart profileCOLIMA_PROFILE=<profile> colima restartYes
Delete profileCOLIMA_PROFILE=<profile> colima delete --forceYes
Enable KubernetesCOLIMA_PROFILE=<profile> colima kubernetes startYes
Disable KubernetesCOLIMA_PROFILE=<profile> colima kubernetes stopYes
Update profileCOLIMA_PROFILE=<profile> colima updateYes
Edit profile configCOLIMA_PROFILE=<profile> colima start --edit [--editor <editor>]Yes
Template editorCOLIMA_PROFILE=<profile> colima template [--editor <editor>]Yes
SSH config`COLIMA_PROFILE= colima ssh-config [—layer=truefalse]`
SSH access`COLIMA_PROFILE= colima ssh [—layer=truefalse] [— <command…>]`

colima start flags are generated from the profile editor when set:

--runtime <runtime>
--vm-type <vm-type>
--arch <architecture>
--cpus <count>
--memory <GiB>
--disk <GiB>
--mount-type <mount-type>
--mount <host[:vm][:w]>
--dns <server>
--env <KEY=VALUE>
--kubernetes=true|false
--kubernetes-version <version>
--network-address=true|false
--network-preferred-route=true|false
--port-forwarder <value>
--network-mode <mode>
--network-interface <interface>
--vz-rosetta
--nested-virtualization
--k3s-arg <arg>
--k3s-listen-port <port>

The UI blocks profile rename on edit and requires profile-name confirmation before delete.

PurposeCommand shapeNotes
Colima versioncolima versionTool check
Docker client versiondocker version --format "{{.Client.Version}}"Tool check
kubectl client versionkubectl version --client=true -o jsonTool check
Lima versionlimactl --versionTool check
Docker contextdocker context showRuntime check
Docker server versiondocker --context <expected-context> version --format "{{.Server.Version}}"Used when selected profile is running and Docker runtime is expected
Kubernetes contextkubectl config current-contextDiagnostic message when kubectl is available

For the default profile, the expected Docker context is colima. For named profiles, it is colima-<profile>.

If a selected context is known, every Docker command is prefixed with docker --context <context>.

View or metricCommand shape
Active contextdocker context show
Containersdocker ps --all --no-trunc --format "{{json .}}"
Imagesdocker images --digests --no-trunc --format "{{json .}}"
Volumesdocker volume ls --format "{{json .}}"
Networksdocker network ls --no-trunc --format "{{json .}}"
Container statsdocker stats --no-stream --format "{{json .}}"
Disk usagedocker system df --format "{{json .}}"

Output is parsed as JSON lines. Malformed lines or records missing required fields are dropped with backend warnings. A dead container creates a warning issue.

Command details:

  • External binary: docker.
  • Timeout: 15 seconds.
  • Mutating: no.
  • Context behavior: --context <context> is added when the selected profile exposes one.
  • Socket behavior: socket paths are displayed and indexed, but Docker inventory commands use context flags rather than passing socket paths.

Container actions are routed through app command history and refresh the selected profile after a successful mutating action.

PurposeCommand shapeMutates state
Start containerdocker --context <context> start <container>Yes
Stop containerdocker --context <context> stop <container>Yes
Restart containerdocker --context <context> restart <container>Yes
Pause containerdocker --context <context> pause <container>Yes
Resume containerdocker --context <context> unpause <container>Yes
Kill containerdocker --context <context> kill <container>Yes
Delete containerdocker --context <context> rm <container>Yes
Load logsdocker --context <context> logs [--timestamps] --tail <count> <container>No
Load inspect JSONdocker --context <context> inspect <container>No
Terminal commanddocker --context <context> exec -it <container> /bin/shDepends on shell command

Command details:

  • External binary: docker.
  • Timeout: 30 seconds for lifecycle commands, logs, and inspect.
  • Context behavior: --context <context> is added when the selected profile exposes one.
  • Delete behavior: the UI requires typing the selected container name or ID exactly before rm can run.
  • Output behavior: logs and inspect output are redacted before being stored in command history or shown in detail panels.

Feature pages: Containers, Images, Volumes, Networks, Monitor.

Kubernetes inventory is read-only. If a selected Kubernetes context is known, every command is prefixed with kubectl --context <context>.

View or metricCommand shape
Active contextkubectl config current-context
Nodeskubectl get nodes -o json
Namespaceskubectl get namespaces -o json
Podskubectl get pods --all-namespaces -o json
Serviceskubectl get services --all-namespaces -o json
Deploymentskubectl get deployments --all-namespaces -o json
Node metricskubectl top nodes --no-headers
Pod metricskubectl top pods --all-namespaces --no-headers

Command details:

  • External binary: kubectl.
  • Timeout: 20 seconds.
  • Mutating: no.
  • Namespace behavior: pods, services, deployments, and pod metrics use --all-namespaces; nodes and namespaces are cluster-scoped.
  • Metrics behavior: failed kubectl top commands create informational issues, not fatal errors.

Feature pages: Kubernetes, Workloads, Services.

DocumentPath
Colima home$COLIMA_HOME or ~/.colima
Profile config$COLIMA_HOME/<profile>/colima.yaml
Default template$COLIMA_HOME/_templates/default.yaml
SSH config$COLIMA_HOME/ssh_config
Daemon log$COLIMA_HOME/<profile>/daemon/daemon.log

See Security & Privacy for redaction, indexing, copy behavior, and stored output limits.