vault export reads an envdef file that maps environment variable names to
vault references, resolves each reference to its
secret value, and writes the result out as a temporary environment file. This
is useful when a shell session or CI job needs secrets available as
environment variables without ever hard-coding the secret values themselves.
With --shell, instead of writing a file vault export prints commands for
the given shell, so the output can be sourced directly, e.g.
source <(nsc vault export --envdef secrets.envdef --shell bash).
Usage
Example
Options
—envdef <file>
Load environment variable names and vault references from this file, rather than literal values.vault export resolves each reference against your
workspace’s vault before emitting it.
—shell <shell>
Emit commands for the specified shell instead of writing a temporary environment file. Currently onlybash is supported.