Environment Commands
Commands for loading, unloading, and executing with secrets in your shell environment.
kredenv load
Shows the secrets currently loaded in your shell session. Requires the shell hook to be active.
kredenv loadTIP
The actual loading is performed by the shell hook interceptor. kredenv load displays what was loaded.
Flags
| Flag | Description |
|---|---|
-n, --namespace | Load secrets from a specific namespace |
kredenv unload
Unloads kredenv secrets from the current shell session. Requires the shell hook to be active.
kredenv unloadkredenv exec
Executes a command with secrets injected into its environment. Secrets exist only for the lifetime of the command and are never loaded into your interactive shell.
kredenv exec -- <command> [args...]Flags
| Flag | Description |
|---|---|
-n, --namespace | Execute with secrets from a specific namespace |
Examples
# run with flat secrets
kredenv exec -- node server.js
# run with secrets from a specific namespace
kredenv exec -n staging -- terraform plan
kredenv exec -n production -- kubectl apply -f deploy.yaml
# pipe friendly
kredenv exec -- env | grep AWSNamespace resolution
If --namespace is not passed, kredenv falls back to autoload_namespace from the kredsfile.yaml. If neither is set, only flat secrets (no namespace) are injected.
kredenv which
Prints the path to the kredsfile.yaml that will be used in the current directory.
kredenv whichUseful for debugging when you're unsure which manifest is in scope.
kredenv validate
Validates the kredsfile.yaml in scope for syntax errors and structural issues.
kredenv validateYou can also validate a specific file:
kredenv validate ./path/to/kredsfile.yamlkredenv checks for:
- Missing
keyfields - Duplicate secrets (same key and namespace)
autoload_namespacereferencing a namespace with no matching secrets