id = "deck" name = "decK" homepage = "https://github.com/Kong/deck" description = "Configuration management and drift detection for Kong" executables = ["deck"] [dotfiles] # decK's upstream CLI source sets the home-directory config name to # ~/.deck.yaml when --config is not supplied. # https://raw.githubusercontent.com/Kong/deck/main/cmd/root.go 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 } [[commands.subcommand]] path = ["gateway", "sync"] label = "Sync state to Kong" [[commands.subcommand.source]] id = "src" kind = "help" url = "https://github.com/Kong/deck/blob/main/cmd/gateway_sync.go" evidence = """ use := "sync [flags] [kong-state-files...]" syncCmd.Flags().StringVarP(&syncWorkspace, "workspace", "w", "", "Sync configuration to a specific workspace " syncCmd.Flags().BoolVar(&dumpConfig.SkipConsumers, "skip-consumers", syncCmd.Flags().BoolVar(&syncCmdAssumeYes, "yes", false, "assume `yes` to prompts and run non-interactively." rootCmd.PersistentFlags().String("kong-addr", defaultKongURL, "HTTP address of Kong's Admin API." flag names: --kong-addr, --workspace, -w, --skip-consumers, --yes """ [[commands.subcommand.field]] id = "files" label = "State files" description = "Use - for stdin." type = "path" position = 0 path = { kind = "file", role = "input" } multiple = true sources = ["src"] [[commands.subcommand.field]] id = "kong_addr" label = "Kong Admin API address" description = "Defaults to http://localhost:8001." type = "url" option = ["--kong-addr"] sources = ["src"] [[commands.subcommand.field]] id = "workspace" label = "Workspace" description = "Kong Enterprise only." type = "string" option = ["--workspace", "-w"] sources = ["src"] [[commands.subcommand.field]] id = "skip_consumers" label = "Skip consumers" type = "boolean" option = ["--skip-consumers"] sources = ["src"] [[commands.subcommand.field]] id = "yes" label = "Assume yes" description = "Run non-interactively." type = "boolean" option = ["--yes"] effect = "overwrite" sources = ["src"] [[commands.subcommand.task]] id = "sync" label = "Sync state files to Kong" fields = ["files", "kong_addr", "workspace"] required = ["files"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["files", "kong_addr", "workspace"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["skip_consumers", "yes"] [[commands.subcommand]] path = ["gateway", "diff"] label = "Diff state against Kong" [[commands.subcommand.source]] id = "src" kind = "help" url = "https://github.com/Kong/deck/blob/main/cmd/gateway_diff.go" evidence = """ use := "diff [flags] [kong-state-files...]" diffCmd.Flags().StringVarP(&diffWorkspace, "workspace", "w", diffCmd.Flags().BoolVar(&diffCmdNonZeroExitCode, "non-zero-exit-code", false, "return exit code 2 if there is a diff present, rootCmd.PersistentFlags().String("kong-addr", defaultKongURL, "HTTP address of Kong's Admin API." flag names: --kong-addr, --workspace, -w, --non-zero-exit-code """ [[commands.subcommand.field]] id = "files" label = "State files" description = "Use - for stdin." type = "path" position = 0 path = { kind = "file", role = "input" } multiple = true sources = ["src"] [[commands.subcommand.field]] id = "kong_addr" label = "Kong Admin API address" description = "Defaults to http://localhost:8001." type = "url" option = ["--kong-addr"] sources = ["src"] [[commands.subcommand.field]] id = "workspace" label = "Workspace" description = "Kong Enterprise only." type = "string" option = ["--workspace", "-w"] sources = ["src"] [[commands.subcommand.field]] id = "exit_code" label = "Exit code 2 on diff" type = "boolean" option = ["--non-zero-exit-code"] sources = ["src"] [[commands.subcommand.task]] id = "diff" label = "Show pending changes" fields = ["files", "kong_addr", "workspace", "exit_code"] required = ["files"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["files", "kong_addr", "workspace"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["exit_code"] [[commands.subcommand]] path = ["gateway", "dump"] label = "Dump Kong state" [[commands.subcommand.source]] id = "src" kind = "help" url = "https://github.com/Kong/deck/blob/main/cmd/gateway_dump.go" evidence = """ Use: "dump", dumpCmd.Flags().StringVar(&dumpCmdStateFormat, "format", "yaml", "output file format: json or yaml.") dumpCmd.Flags().BoolVar(&dumpWithID, "with-id", dumpCmd.Flags().StringVarP(&dumpWorkspace, "workspace", "w", dumpCmd.Flags().BoolVar(&dumpAllWorkspaces, "all-workspaces", dumpCmd.Flags().StringVarP(&dumpCmdKongStateFile, "output-file", "o", fileOutDefault, "file to which to write Kong's configuration." "Use `-` to write to stdout." rootCmd.PersistentFlags().String("kong-addr", defaultKongURL, "HTTP address of Kong's Admin API." flag names: --kong-addr, --workspace, -w, --output-file, -o, --format, --with-id, --all-workspaces """ [[commands.subcommand.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"] [[commands.subcommand.field]] id = "format" label = "Format" type = "enum" option = ["--format"] choices = [{ value = "yaml", label = "YAML" }, { value = "json", label = "JSON" }] sources = ["src"] [[commands.subcommand.field]] id = "kong_addr" label = "Kong Admin API address" description = "Defaults to http://localhost:8001." type = "url" option = ["--kong-addr"] sources = ["src"] [[commands.subcommand.field]] id = "workspace" label = "Workspace" description = "Kong Enterprise only." type = "string" option = ["--workspace", "-w"] sources = ["src"] [[commands.subcommand.field]] id = "with_id" label = "Include entity IDs" type = "boolean" option = ["--with-id"] sources = ["src"] [[commands.subcommand.field]] id = "all_workspaces" label = "All workspaces" type = "boolean" option = ["--all-workspaces"] sources = ["src"] [[commands.subcommand.task]] id = "dump" label = "Dump to a file" fields = ["output_file", "format", "kong_addr"] required = ["output_file"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["output_file", "format", "kong_addr", "workspace"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["with_id", "all_workspaces"]