vectordotdev/vector

Make `vector generate` output documentation

Open

#1687 opened on Feb 3, 2020

View on GitHub
 (3 comments) (4 reactions) (0 assignees)Rust (21,837 stars) (2,126 forks)batch import
domain: clidomain: configdomain: setupgood first issuetype: enhancement

Description

Right now vector generate outputs quite minimal configurations.

❯ vector generate "stdin"
data_dir = '/var/lib/vector/'
dns_servers = []
[sources.source0]
max_length = 102400
type = 'stdin'

This issue proposes the output be something like the following:

#                                    __   __  __
#                                    \ \ / / / /
#                                     \ V / / /
#                                      \_/  \/
#
#                                    V E C T O R
#                                   Configuration
#
# ------------------------------------------------------------------------------
# Website: https://vector.dev
# Docs: https://vector.dev/docs/
# ------------------------------------------------------------------------------

# The location of data storage
data_dir = '/var/lib/vector/'
# Custom DNS servers to use (if any)
dns_servers = []

[sources.source0]
# https://vector.dev/docs/reference/sources/stdin/
type = 'stdin'
# The maxiumum bytes size of a message before it is discarded.
max_length = 102400

We may want to opt for a smaller logo, or none at all. We also may want to output commented versions of fields that are using defaults.

Contributor guide