Reloading Secrets
Understand why vault updates do not automatically appear in your shell, and learn how to fix it with dse reload and dse up.
Prerequisites
Section titled “Prerequisites”- Getting Started completed (shell plugin installed, at least one secret loaded via
.secenv)
The problem
Section titled “The problem”-
Open two terminals
In Terminal 1, enter your project directory:
Terminal window cd ~/my-projectecho $DATABASE_PASSWORD# Output: s3cr3t-db-pass -
Update the secret in Terminal 2
Terminal window echo "new-rotated-password" | dotsecenv secret store DATABASE_PASSWORD -
Check Terminal 1
Terminal window echo $DATABASE_PASSWORD# Output: s3cr3t-db-pass <-- still the old value!
The fix: dse reload
Section titled “The fix: dse reload”-
Run
dse reloadin Terminal 1Terminal window dse reload# dotsecenv: loaded 1 secret(s) from .secenv: DATABASE_PASSWORD -
Verify the new value
Terminal window echo $DATABASE_PASSWORD# Output: new-rotated-password
When to use dse reload
Section titled “When to use dse reload”- You stored or rotated a secret in another terminal or on another machine (after
git pull) - You edited the
.secenvfile (added or removed a variable) - A secret fetch failed and you want to retry
Bonus: dse up
Section titled “Bonus: dse up”If you open a terminal directly in a subdirectory (for example, an IDE terminal opening in ~/my-project/src/), the parent .secenv was never traversed. Use dse up to walk up the directory tree and load all ancestor .secenv files:
cd ~/my-project/srcecho $DATABASE_PASSWORD# Output: (empty)
dse up# dotsecenv: loaded 1 secret(s) from .secenv: DATABASE_PASSWORD
echo $DATABASE_PASSWORD# Output: new-rotated-passwordNext steps
Section titled “Next steps”- Shell Plugins — trust system, tree-scoped loading, nested
.secenvfiles - Share a Secret — share secrets with teammates