Skip to content

envpkt env export

Output export KEY='VALUE' statements that can be eval’d to inject secrets into the current shell session. Secrets are resolved via sealed packets and/or fnox — the same pipeline as envpkt exec, but without spawning a subprocess.

Terminal window
envpkt env export [options]
OptionDescriptionDefault
-c, --config <path>Path to envpkt.tomlAuto-detected
--profile <profile>fnox profile to useDefault
--skip-auditSkip the pre-flight auditfalse
Terminal window
# Source secrets into the current shell
eval "$(envpkt env export)"
# Use a specific fnox profile
eval "$(envpkt env export --profile staging)"
# Specify config path
eval "$(envpkt env export -c path/to/envpkt.toml)"

Add to ~/.zshrc or ~/.bashrc for automatic secret loading:

Terminal window
eval "$(envpkt env export 2>/dev/null)"

Warnings are emitted to stderr so they don’t pollute the eval output.

  1. Resolves envpkt.toml (auto-detected or via --config)
  2. Decrypts sealed packets and/or resolves via fnox
  3. Outputs export KEY='VALUE' for each resolved secret to stdout
  4. Emits any warnings to stderr

Values containing single quotes are safely escaped (' becomes '\'').