{
  "id": "docker",
  "name": "Docker",
  "homepage": "https://docs.docker.com/reference/cli/docker/",
  "description": "Builds, ships and runs applications in containers.",
  "icon": "theSVG:docker",
  "executables": [
    "docker"
  ],
  "dotfiles": {
    "paths": [
      "~/.docker/config.json",
      "~/.docker/daemon.json"
    ],
    "exclude": [
      "~/.docker/contexts/",
      "~/.docker/buildx/",
      "~/.docker/cli-plugins/",
      "~/.docker/desktop/",
      "~/.docker/run/",
      "~/.docker/scan/"
    ],
    "secret": [],
    "secret_paths": [
      {
        "file": "~/.docker/config.json",
        "match": {
          "key_path": [
            "auths.*.auth",
            "auths.*.identitytoken"
          ]
        }
      }
    ],
    "machine_lines": [
      {
        "file": "~/.docker/config.json",
        "match": {
          "key_path": [
            "credsStore"
          ]
        },
        "scope": "platform"
      },
      {
        "file": "~/.docker/config.json",
        "match": {
          "key_path": [
            "currentContext"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Docker",
    "description": "Run, inspect and build containers. Only the everyday container and image commands are covered; Compose, Swarm, contexts, plugins and registry login are left out.",
    "quality": "ai-draft",
    "base": "fig:docker",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/docker.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "run"
        ],
        "label": "Run a container",
        "description": "Start a new container from an image. Resource limits, networking and security options are left out.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/docker.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "detach",
            "label": "Detached",
            "description": "Run in the background and print the container ID.",
            "type": "boolean",
            "option": [
              "--detach",
              "-d"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "interactive",
            "label": "Keep STDIN open",
            "type": "boolean",
            "option": [
              "--interactive",
              "-i"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "tty",
            "label": "Allocate a TTY",
            "type": "boolean",
            "option": [
              "--tty",
              "-t"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "rm",
            "label": "Remove when it exits",
            "type": "boolean",
            "option": [
              "--rm"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "name",
            "label": "Container name",
            "type": "string",
            "option": [
              "--name"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "publish",
            "label": "Published ports",
            "description": "host:container, for example 8080:80.",
            "type": "string",
            "option": [
              "--publish",
              "-p"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "volume",
            "label": "Volumes",
            "description": "host-path:container-path, optionally with :ro.",
            "type": "string",
            "option": [
              "--volume",
              "-v"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "env",
            "label": "Environment variables",
            "description": "KEY=value, one per entry.",
            "type": "string",
            "option": [
              "--env",
              "-e"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workdir",
            "label": "Working directory",
            "type": "string",
            "option": [
              "--workdir",
              "-w"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "restart",
            "label": "Restart policy",
            "type": "string",
            "option": [
              "--restart"
            ],
            "suggestions": [
              {
                "value": "no",
                "label": "No"
              },
              {
                "value": "always",
                "label": "Always"
              },
              {
                "value": "unless-stopped",
                "label": "Unless stopped"
              },
              {
                "value": "on-failure",
                "label": "On failure"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "privileged",
            "label": "Privileged",
            "type": "boolean",
            "option": [
              "--privileged"
            ],
            "effect": "exec",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "image",
            "label": "Image",
            "description": "For example nginx:latest.",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "command",
            "label": "Command and arguments",
            "description": "Overrides the image default command.",
            "type": "string",
            "position": 1,
            "multiple": true,
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "shell",
            "label": "Interactive shell",
            "set": {
              "interactive": [
                true
              ],
              "tty": [
                true
              ],
              "rm": [
                true
              ]
            },
            "fields": [
              "image",
              "interactive",
              "tty",
              "rm",
              "command"
            ],
            "required": [
              "image"
            ]
          },
          {
            "id": "service",
            "label": "Background service",
            "set": {
              "detach": [
                true
              ]
            },
            "fields": [
              "image",
              "detach",
              "name",
              "publish",
              "volume",
              "env",
              "restart"
            ],
            "required": [
              "image"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "image",
              "command",
              "detach",
              "interactive",
              "tty",
              "rm",
              "name",
              "publish",
              "volume",
              "env"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "workdir",
              "restart",
              "privileged"
            ]
          }
        ]
      },
      {
        "path": [
          "ps"
        ],
        "label": "List containers",
        "description": "List running containers, optionally filtered and formatted.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/docker.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "filter",
            "label": "Filter",
            "description": "key=value, for example status=exited.",
            "type": "string",
            "option": [
              "--filter",
              "-f"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "format",
            "label": "Format",
            "description": "A Go template, for example {{.Names}}.",
            "type": "string",
            "option": [
              "--format"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "last",
            "label": "Last N containers",
            "type": "integer",
            "option": [
              "--last",
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "quiet",
            "label": "IDs only",
            "type": "boolean",
            "option": [
              "--quiet",
              "-q"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_trunc",
            "label": "Do not truncate",
            "type": "boolean",
            "option": [
              "--no-trunc"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "size",
            "label": "Show sizes",
            "type": "boolean",
            "option": [
              "--size",
              "-s"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "exited",
            "label": "Exited containers",
            "set": {
              "filter": [
                "status=exited"
              ]
            },
            "fields": [
              "filter",
              "quiet",
              "no_trunc"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "filter",
              "format",
              "last",
              "quiet",
              "no_trunc",
              "size"
            ]
          }
        ]
      },
      {
        "path": [
          "logs"
        ],
        "label": "Container logs",
        "description": "Print or follow the logs of one container.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/docker.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "follow",
            "label": "Follow",
            "type": "boolean",
            "option": [
              "--follow",
              "-f"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "tail",
            "label": "Tail lines",
            "description": "A number of lines, or all.",
            "type": "string",
            "option": [
              "--tail",
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "since",
            "label": "Since",
            "description": "A timestamp or relative time such as 42m.",
            "type": "string",
            "option": [
              "--since"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "timestamps",
            "label": "Timestamps",
            "type": "boolean",
            "option": [
              "--timestamps",
              "-t"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "container",
            "label": "Container",
            "description": "Name or ID.",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "follow-tail",
            "label": "Follow recent output",
            "set": {
              "follow": [
                true
              ],
              "tail": [
                "100"
              ]
            },
            "fields": [
              "container",
              "follow",
              "tail",
              "timestamps"
            ],
            "required": [
              "container"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "container",
              "follow",
              "tail",
              "since",
              "timestamps"
            ]
          }
        ]
      },
      {
        "path": [
          "exec"
        ],
        "label": "Exec in a container",
        "description": "Run a command inside a running container.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/docker.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "interactive",
            "label": "Keep STDIN open",
            "type": "boolean",
            "option": [
              "--interactive",
              "-i"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "tty",
            "label": "Allocate a TTY",
            "type": "boolean",
            "option": [
              "--tty",
              "-t"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "env",
            "label": "Environment variables",
            "type": "string",
            "option": [
              "--env",
              "-e"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workdir",
            "label": "Working directory",
            "type": "string",
            "option": [
              "--workdir",
              "-w"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "container",
            "label": "Container",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "command",
            "label": "Command and arguments",
            "description": "For example sh, or bash -c 'ls'.",
            "type": "string",
            "position": 1,
            "multiple": true,
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "shell",
            "label": "Open a shell",
            "set": {
              "interactive": [
                true
              ],
              "tty": [
                true
              ],
              "command": [
                "sh"
              ]
            },
            "fields": [
              "container",
              "interactive",
              "tty",
              "command"
            ],
            "required": [
              "container"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "container",
              "command",
              "interactive",
              "tty",
              "env",
              "workdir"
            ]
          }
        ]
      },
      {
        "path": [
          "build"
        ],
        "label": "Build an image",
        "description": "Build an image from a Dockerfile. Secrets, SSH, cache import and output destinations are left out.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/docker.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "tag",
            "label": "Tag",
            "description": "name:tag",
            "type": "string",
            "option": [
              "--tag",
              "-t"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "file",
            "label": "Dockerfile",
            "type": "path",
            "option": [
              "--file",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "build_arg",
            "label": "Build arguments",
            "description": "KEY=value, one per entry.",
            "type": "string",
            "option": [
              "--build-arg"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "target",
            "label": "Target stage",
            "type": "string",
            "option": [
              "--target"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "platform",
            "label": "Platform",
            "type": "string",
            "option": [
              "--platform"
            ],
            "suggestions": [
              {
                "value": "linux/amd64",
                "label": "linux/amd64"
              },
              {
                "value": "linux/arm64",
                "label": "linux/arm64"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_cache",
            "label": "No cache",
            "type": "boolean",
            "option": [
              "--no-cache"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "pull",
            "label": "Always pull base image",
            "type": "boolean",
            "option": [
              "--pull"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "context",
            "label": "Build context",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "build-here",
            "label": "Build current directory",
            "fields": [
              "tag",
              "file",
              "build_arg",
              "context"
            ],
            "required": [
              "context"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "context",
              "tag",
              "file",
              "build_arg",
              "target"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "platform",
              "no_cache",
              "pull"
            ]
          }
        ]
      }
    ]
  }
}
