Skip to content

Latest commit

 

History

History
67 lines (51 loc) · 3.03 KB

kvdictl.md

File metadata and controls

67 lines (51 loc) · 3.03 KB

kvdictl

Synopsis

kvdictl is a command line utility for interacting with the kvdi API server.

Configurations can be passed either on the command-line or via a viper configuration file. The path to the configuration file defaults to ".kvdi.{json,toml,yaml,hcl,env}" in either the current user's HOME directory or the current working directory (if HOME cannot be determined). It can also be set explicitly using the -c or --config flags. Options passed on the CLI will override any of those provided in a configuration file.

There are two additional fields available in the configuration that are not exposed as flags. Instead of a file, you can inline the CA certificate of the server directly with "server.caCert". You may also specify the password for authentication at "server.password". If not found in the configuration file, you will be prompted when credentials are required. You may also set the password in the environment variable KVDI_PASSWORD to avoid being prompted. In the future, there will potentially be the ability to create API tokens specifically for API and CLI usage.

Using the CLI with a user that requires MFA is currently not supported.

An example for a configuration file might look similar to this:

server:
  url: https://127.0.0.1
  user: admin
  password: "supersecret"
  insecureSkipVerify: false
  caFile: "/path/to/file.crt"
  # OR #
  caCert: |
    -----BEGIN CERTIFICATE-----
    MII...
    -----END CERTIFICATE-----

Most commands that provide an output can be configured to do so either in yaml or json. Additionally, the --filter flag can be used with a JMESpath to filter the output further.

Complete documentation for kvdi is available at https://github.com/kvdi/kvdi

Options

  -C, --ca-file string         the CA certificate to use to verify the API certificate
  -c, --config string          configuration file (default "$HOME/.kvdi.yaml")
  -f, --filter string          a jmespath expression for filtering results (where applicable)
  -h, --help                   help for kvdictl
  -k, --insecure-skip-verify   skip verification of the API server certificate
  -o, --output string          the format to dump results in (default "json")
  -s, --server string          the address to the kvdi API server (default "https://127.0.0.1")
  -u, --user string            the username to use when authenticating against the API (default "admin")

SEE ALSO

Auto generated by spf13/cobra on 24-Oct-2021