{
  "id": "container",
  "name": "Container",
  "homepage": "https://github.com/apple/container",
  "description": "A toolset for building and running Linux containers on macOS.",
  "executables": [
    "container"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/container/config.toml"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Apple container",
    "description": "Run a container or build an image with Apple's container CLI. Networking, mounts beyond -v, registry and resource-limit options are mostly left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "run"
        ],
        "label": "Run a container",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "revision": "container CLI version 1.6.0",
            "evidence": "USAGE: container run [<options>] <image> [<arguments> ...]\n  -e, --env <env>         Set environment variables (key=value, or just key to\n  -i, --interactive       Keep the standard input open even if not attached\n  -t, --tty               Open a TTY with the process\n  -w, --workdir, --cwd <dir>\n  -c, --cpus <cpus>       Number of CPUs to allocate to the container\n  -m, --memory <memory>   Amount of memory (1MiByte granularity), with optional\n  -d, --detach            Run the container and detach from the process\n  --entrypoint <cmd>      Override the entrypoint of the image\n  --name <name>           Use the specified name as the container ID\n  -p, --publish <spec>    Publish a port from container to host (format:\n  --rm, --remove          Remove the container after it stops\n  -v, --volume <volume>   Bind mount a volume into the container\n"
          }
        ],
        "field": [
          {
            "id": "image",
            "label": "Image",
            "type": "string",
            "position": 0,
            "sources": [
              "help"
            ]
          },
          {
            "id": "args",
            "label": "Command and arguments",
            "type": "string",
            "position": 1,
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "name",
            "label": "Container name",
            "type": "string",
            "option": [
              "--name"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "interactive",
            "label": "Keep stdin open",
            "type": "boolean",
            "option": [
              "--interactive",
              "-i"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "tty",
            "label": "Allocate a TTY",
            "type": "boolean",
            "option": [
              "--tty",
              "-t"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "detach",
            "label": "Run in background",
            "type": "boolean",
            "option": [
              "--detach",
              "-d"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "rm",
            "label": "Remove after it stops",
            "type": "boolean",
            "option": [
              "--rm"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "env",
            "label": "Environment variables",
            "description": "key=value, or just key to inherit from the host.",
            "type": "string",
            "option": [
              "--env",
              "-e"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "publish",
            "label": "Published ports",
            "description": "[host-ip:]host-port:container-port[/protocol]",
            "type": "string",
            "option": [
              "--publish",
              "-p"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "volume",
            "label": "Bind mounts",
            "type": "string",
            "option": [
              "--volume",
              "-v"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "workdir",
            "label": "Working directory",
            "type": "string",
            "option": [
              "--workdir"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "cpus",
            "label": "CPUs",
            "type": "integer",
            "option": [
              "--cpus",
              "-c"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "memory",
            "label": "Memory",
            "description": "Optional K, M, G, T or P suffix.",
            "type": "string",
            "option": [
              "--memory",
              "-m"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "interactive",
            "label": "Interactive shell",
            "set": {
              "interactive": [
                true
              ],
              "tty": [
                true
              ],
              "rm": [
                true
              ]
            },
            "fields": [
              "image",
              "args",
              "interactive",
              "tty",
              "rm",
              "volume",
              "env"
            ],
            "required": [
              "image"
            ]
          },
          {
            "id": "background",
            "label": "Background service",
            "set": {
              "detach": [
                true
              ]
            },
            "fields": [
              "image",
              "name",
              "detach",
              "publish",
              "env",
              "volume"
            ],
            "required": [
              "image"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "image",
              "args",
              "name",
              "interactive",
              "tty",
              "detach",
              "rm"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "env",
              "publish",
              "volume",
              "workdir",
              "cpus",
              "memory"
            ]
          }
        ]
      },
      {
        "path": [
          "build"
        ],
        "label": "Build an image",
        "source": [
          {
            "id": "help",
            "kind": "help",
            "revision": "container CLI version 1.6.0",
            "evidence": "USAGE: build [<options>] [<context-dir>]\n  <context-dir>           Build directory (default: .)\n  --build-arg <key=val>   Set build-time variables\n  -f, --file <path>       Path to Dockerfile\n  --no-cache              Do not use cache\n  --platform <platform>   Add the platform to the build (format:\n  -t, --tag <name>        Name for the built image (default:\n  --target <stage>        Set the target build stage\n  --pull                  Pull latest image\n"
          }
        ],
        "field": [
          {
            "id": "context",
            "label": "Build context",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "directory",
              "role": "input"
            },
            "sources": [
              "help"
            ]
          },
          {
            "id": "tag",
            "label": "Image tag",
            "type": "string",
            "option": [
              "--tag",
              "-t"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "file",
            "label": "Dockerfile",
            "type": "path",
            "option": [
              "--file",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "help"
            ]
          },
          {
            "id": "build_arg",
            "label": "Build args (key=val)",
            "type": "string",
            "option": [
              "--build-arg"
            ],
            "multiple": true,
            "sources": [
              "help"
            ]
          },
          {
            "id": "target",
            "label": "Target stage",
            "type": "string",
            "option": [
              "--target"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "platform",
            "label": "Platform",
            "type": "string",
            "option": [
              "--platform"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "no_cache",
            "label": "No cache",
            "type": "boolean",
            "option": [
              "--no-cache"
            ],
            "sources": [
              "help"
            ]
          },
          {
            "id": "pull",
            "label": "Pull latest base image",
            "type": "boolean",
            "option": [
              "--pull"
            ],
            "sources": [
              "help"
            ]
          }
        ],
        "task": [
          {
            "id": "build",
            "label": "Build and tag",
            "fields": [
              "context",
              "tag",
              "file",
              "build_arg",
              "target"
            ],
            "required": [
              "tag"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "context",
              "tag",
              "file",
              "build_arg",
              "target"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "platform",
              "no_cache",
              "pull"
            ]
          }
        ]
      }
    ]
  }
}
