{
  "id": "deck",
  "name": "decK",
  "homepage": "https://github.com/Kong/deck",
  "description": "Configuration management and drift detection for Kong",
  "executables": [
    "deck"
  ],
  "dotfiles": {
    "paths": [
      "~/.deck.yaml"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "decK",
    "description": "Sync, diff and dump Kong Gateway configuration. Konnect, TLS, auth and tag-filter options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "gateway",
          "sync"
        ],
        "label": "Sync state to Kong",
        "source": [
          {
            "id": "src",
            "kind": "help",
            "url": "https://github.com/Kong/deck/blob/main/cmd/gateway_sync.go",
            "evidence": "use := \"sync [flags] [kong-state-files...]\"\nsyncCmd.Flags().StringVarP(&syncWorkspace, \"workspace\", \"w\", \"\",\n\"Sync configuration to a specific workspace \"\nsyncCmd.Flags().BoolVar(&dumpConfig.SkipConsumers, \"skip-consumers\",\nsyncCmd.Flags().BoolVar(&syncCmdAssumeYes, \"yes\",\nfalse, \"assume `yes` to prompts and run non-interactively.\"\nrootCmd.PersistentFlags().String(\"kong-addr\", defaultKongURL,\n\"HTTP address of Kong's Admin API.\"\nflag names: --kong-addr, --workspace, -w, --skip-consumers, --yes\n"
          }
        ],
        "field": [
          {
            "id": "files",
            "label": "State files",
            "description": "Use - for stdin.",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "file",
              "role": "input"
            },
            "multiple": true,
            "sources": [
              "src"
            ]
          },
          {
            "id": "kong_addr",
            "label": "Kong Admin API address",
            "description": "Defaults to http://localhost:8001.",
            "type": "url",
            "option": [
              "--kong-addr"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "workspace",
            "label": "Workspace",
            "description": "Kong Enterprise only.",
            "type": "string",
            "option": [
              "--workspace",
              "-w"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "skip_consumers",
            "label": "Skip consumers",
            "type": "boolean",
            "option": [
              "--skip-consumers"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "yes",
            "label": "Assume yes",
            "description": "Run non-interactively.",
            "type": "boolean",
            "option": [
              "--yes"
            ],
            "effect": "overwrite",
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "sync",
            "label": "Sync state files to Kong",
            "fields": [
              "files",
              "kong_addr",
              "workspace"
            ],
            "required": [
              "files"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "files",
              "kong_addr",
              "workspace"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "skip_consumers",
              "yes"
            ]
          }
        ]
      },
      {
        "path": [
          "gateway",
          "diff"
        ],
        "label": "Diff state against Kong",
        "source": [
          {
            "id": "src",
            "kind": "help",
            "url": "https://github.com/Kong/deck/blob/main/cmd/gateway_diff.go",
            "evidence": "use := \"diff [flags] [kong-state-files...]\"\ndiffCmd.Flags().StringVarP(&diffWorkspace, \"workspace\", \"w\",\ndiffCmd.Flags().BoolVar(&diffCmdNonZeroExitCode, \"non-zero-exit-code\",\nfalse, \"return exit code 2 if there is a diff present,\nrootCmd.PersistentFlags().String(\"kong-addr\", defaultKongURL,\n\"HTTP address of Kong's Admin API.\"\nflag names: --kong-addr, --workspace, -w, --non-zero-exit-code\n"
          }
        ],
        "field": [
          {
            "id": "files",
            "label": "State files",
            "description": "Use - for stdin.",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "file",
              "role": "input"
            },
            "multiple": true,
            "sources": [
              "src"
            ]
          },
          {
            "id": "kong_addr",
            "label": "Kong Admin API address",
            "description": "Defaults to http://localhost:8001.",
            "type": "url",
            "option": [
              "--kong-addr"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "workspace",
            "label": "Workspace",
            "description": "Kong Enterprise only.",
            "type": "string",
            "option": [
              "--workspace",
              "-w"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "exit_code",
            "label": "Exit code 2 on diff",
            "type": "boolean",
            "option": [
              "--non-zero-exit-code"
            ],
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "diff",
            "label": "Show pending changes",
            "fields": [
              "files",
              "kong_addr",
              "workspace",
              "exit_code"
            ],
            "required": [
              "files"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "files",
              "kong_addr",
              "workspace"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "exit_code"
            ]
          }
        ]
      },
      {
        "path": [
          "gateway",
          "dump"
        ],
        "label": "Dump Kong state",
        "source": [
          {
            "id": "src",
            "kind": "help",
            "url": "https://github.com/Kong/deck/blob/main/cmd/gateway_dump.go",
            "evidence": "Use:   \"dump\",\ndumpCmd.Flags().StringVar(&dumpCmdStateFormat, \"format\",\n\"yaml\", \"output file format: json or yaml.\")\ndumpCmd.Flags().BoolVar(&dumpWithID, \"with-id\",\ndumpCmd.Flags().StringVarP(&dumpWorkspace, \"workspace\", \"w\",\ndumpCmd.Flags().BoolVar(&dumpAllWorkspaces, \"all-workspaces\",\ndumpCmd.Flags().StringVarP(&dumpCmdKongStateFile, \"output-file\", \"o\",\nfileOutDefault, \"file to which to write Kong's configuration.\"\n\"Use `-` to write to stdout.\"\nrootCmd.PersistentFlags().String(\"kong-addr\", defaultKongURL,\n\"HTTP address of Kong's Admin API.\"\nflag names: --kong-addr, --workspace, -w, --output-file, -o, --format, --with-id, --all-workspaces\n"
          }
        ],
        "field": [
          {
            "id": "output_file",
            "label": "Output file",
            "description": "Use - for stdout.",
            "type": "path",
            "option": [
              "--output-file",
              "-o"
            ],
            "path": {
              "kind": "file",
              "role": "output"
            },
            "effect": "overwrite",
            "sources": [
              "src"
            ]
          },
          {
            "id": "format",
            "label": "Format",
            "type": "enum",
            "option": [
              "--format"
            ],
            "choices": [
              {
                "value": "yaml",
                "label": "YAML"
              },
              {
                "value": "json",
                "label": "JSON"
              }
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "kong_addr",
            "label": "Kong Admin API address",
            "description": "Defaults to http://localhost:8001.",
            "type": "url",
            "option": [
              "--kong-addr"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "workspace",
            "label": "Workspace",
            "description": "Kong Enterprise only.",
            "type": "string",
            "option": [
              "--workspace",
              "-w"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "with_id",
            "label": "Include entity IDs",
            "type": "boolean",
            "option": [
              "--with-id"
            ],
            "sources": [
              "src"
            ]
          },
          {
            "id": "all_workspaces",
            "label": "All workspaces",
            "type": "boolean",
            "option": [
              "--all-workspaces"
            ],
            "sources": [
              "src"
            ]
          }
        ],
        "task": [
          {
            "id": "dump",
            "label": "Dump to a file",
            "fields": [
              "output_file",
              "format",
              "kong_addr"
            ],
            "required": [
              "output_file"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "output_file",
              "format",
              "kong_addr",
              "workspace"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "with_id",
              "all_workspaces"
            ]
          }
        ]
      }
    ]
  }
}
