Basics, getting secrets, envs, keys...

pkhub.io cli utilty for developers

Usage:
  pk [command]

Available Commands:
  get         Get "safe" resources
  help        Help about any command
  sh          Run programs with named environments

Flags:
      --config string   config file (default is $HOME/.pk.yaml)
  -h, --help            help for pk
      --insecure        Only for localhost testing, this will turn off tls certification verification
      --url string      Set the remote url default is pkhub.io (default "https://pkhub.io")

Use "pk [command] --help" for more information about a command.

The CLI contains the JQ json processing tool integrated so that you can filter/extract results with --jq <expression>

Get a Secret Value

This procedure can be repeated for logins, certificates, environments etc.

pk get secret -s my-group-5 -n DB_PASS --jq "[0].val"

Cli Get Secret

Get an Environment

eval `pk get env -s my-group-5 -n myenv  | jq -r ".[0].val"`

Note that in this example we use the external jq command to un-escape the embedded strings and new lines.

Cli Get Env