{
  "id": "ddev",
  "name": "DDEV",
  "homepage": "https://ddev.com",
  "description": "Docker-based local PHP+Node.js web development environments.",
  "icon": "https://ddev.com/favicon/apple-touch-icon.png",
  "executables": [
    "ddev"
  ],
  "dotfiles": {
    "paths": [
      "~/.ddev/global_config.yaml",
      "~/.ddev/commands/",
      "~/.ddev/homeadditions/"
    ],
    "exclude": [
      "~/.ddev/bin/",
      "~/.ddev/.update"
    ],
    "secret": [],
    "machine_lines": [
      {
        "file": "~/.ddev/global_config.yaml",
        "match": {
          "key_path": [
            "router_http_port",
            "router_https_port"
          ]
        },
        "scope": "backup"
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "DDEV project tools",
    "description": "Logs, database export/import and snapshots for the current DDEV project. Other subcommands are left out.",
    "quality": "ai-draft",
    "base": "fig:ddev",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/ddev.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "logs"
        ],
        "label": "Show logs",
        "description": "Shows logs of a service of the current project.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/ddev.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "follow",
            "label": "Follow",
            "type": "boolean",
            "option": [
              "--follow",
              "-f"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "service",
            "label": "Service",
            "type": "string",
            "option": [
              "--service",
              "-s"
            ],
            "suggestions": [
              {
                "value": "web",
                "label": "web"
              },
              {
                "value": "db",
                "label": "db"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "tail",
            "label": "Tail lines",
            "type": "integer",
            "option": [
              "--tail"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "time",
            "label": "Timestamps",
            "type": "boolean",
            "option": [
              "--time",
              "-t"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "follow",
            "label": "Follow web logs",
            "set": {
              "follow": [
                true
              ],
              "service": [
                "web"
              ]
            },
            "fields": [
              "follow",
              "service",
              "time"
            ],
            "required": []
          },
          {
            "id": "db",
            "label": "Last db lines",
            "set": {
              "service": [
                "db"
              ]
            },
            "fields": [
              "service",
              "tail"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "follow",
              "service",
              "tail",
              "time"
            ]
          }
        ]
      },
      {
        "path": [
          "export-db"
        ],
        "label": "Export database",
        "description": "Dumps the project database to a file or to stdout.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/ddev.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "file",
            "label": "Output file",
            "type": "path",
            "option": [
              "--file",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "output"
            },
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "gzip",
            "label": "gzip",
            "type": "boolean",
            "option": [
              "--gzip",
              "-z"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "bzip2",
            "label": "bzip2",
            "type": "boolean",
            "option": [
              "--bzip2"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "xz",
            "label": "xz",
            "type": "boolean",
            "option": [
              "--xz"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "target_db",
            "label": "Database",
            "type": "string",
            "option": [
              "--target-db",
              "-d"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "gz",
            "label": "Export gzip file",
            "set": {
              "gzip": [
                true
              ]
            },
            "fields": [
              "file",
              "gzip"
            ],
            "required": [
              "file"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "file",
              "gzip",
              "bzip2",
              "xz",
              "target_db"
            ]
          }
        ]
      },
      {
        "path": [
          "import-db"
        ],
        "label": "Import database",
        "description": "Imports a SQL dump or archive; drops the existing database first unless told not to.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/ddev.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "src",
            "label": "Dump file",
            "type": "path",
            "option": [
              "--src",
              "-f"
            ],
            "path": {
              "kind": "file",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_drop",
            "label": "Do not drop database first",
            "type": "boolean",
            "option": [
              "--no-drop"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "target_db",
            "label": "Database",
            "type": "string",
            "option": [
              "--target-db",
              "-d"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "progress",
            "label": "Show progress",
            "type": "boolean",
            "option": [
              "--progress",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "extract_path",
            "label": "Path inside archive",
            "type": "string",
            "option": [
              "--extract-path"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "import",
            "label": "Import dump",
            "fields": [
              "src",
              "progress",
              "target_db"
            ],
            "required": [
              "src"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "src",
              "no_drop",
              "target_db",
              "progress"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "extract_path"
            ]
          }
        ]
      },
      {
        "path": [
          "snapshot"
        ],
        "label": "Database snapshot",
        "description": "Creates, lists or cleans up database snapshots.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/ddev.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "name",
            "label": "Snapshot name",
            "type": "string",
            "option": [
              "--name",
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "list",
            "label": "List snapshots",
            "type": "boolean",
            "option": [
              "--list",
              "-l"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "cleanup",
            "label": "Clean up snapshots",
            "type": "boolean",
            "option": [
              "--cleanup",
              "-C"
            ],
            "effect": "delete",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "all",
            "label": "All projects",
            "type": "boolean",
            "option": [
              "--all",
              "-a"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "yes",
            "label": "Skip confirmation",
            "type": "boolean",
            "option": [
              "--yes",
              "-y"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "create",
            "label": "Create snapshot",
            "fields": [
              "name",
              "all"
            ],
            "required": []
          },
          {
            "id": "list",
            "label": "List snapshots",
            "set": {
              "list": [
                true
              ]
            },
            "fields": [
              "list"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "name",
              "list",
              "cleanup",
              "all",
              "yes"
            ]
          }
        ]
      }
    ]
  }
}
