{{ $cli := site.Data.docs.cli }}

{{ $cli.name }}

{{ partial "badge.html" (dict "word" "root" "color" "blue") }}

The root command (no subcommand) starts Vector.

{{ template "table" (dict "title" "Flags" "items" $cli.flags "cmd" "vector") }}
{{ template "table" (dict "title" "Options" "items" $cli.options "cmd" "vector") }}
{{ range $k, $v := $cli.commands }}

{{ $k }}

{{ with $v.description }}
{{ . | markdownify }}
{{ end }} {{ with $v.flags }}
{{ template "table" (dict "title" "Flags" "items" . "cmd" $k) }}
{{ end }} {{ with $v.options }}
{{ template "table" (dict "title" "Options" "items" . "cmd" $k) }}
{{ end }}
{{ end }}
{{ define "table" }} {{ $cmd := .cmd }} {{ range .items }} {{ if .flag }} {{ $id := substr .flag 2 }} {{ $href := printf "%s-%s" $cmd $id }} {{ $comma := and .flag .short }} {{ end }} {{ if .option }} {{ $id := substr .option 2 }} {{ $href := printf "%s-%s" $cmd $id }} {{ $comma := and .option .short }} {{ end }} {{ end }}
{{ .title }} Description Environment variable Default
{{- .flag -}} {{ if $comma }},
{{ end }} {{ with .short }} {{ . }} {{ end }}
{{- .option -}} {{ if $comma }},
{{ end }} {{ with .short }} {{ . }} {{ end }}
{{ .description | markdownify }}
{{ with .enum }}
Enum options {{ range $k, $v := . }} {{ end }}
Option Description
{{ $k }} {{ $v }}
{{ end }}
{{ .env_var }} {{ .default }}
{{ end }}