Managing Variables
Day-to-day workflow for adding, editing, and removing variables.
Decrypt & Encrypt
The core loop: show to decrypt, edit the file, hide to encrypt.
# Unlock (config.vars → config.unlocked.vars)
vars show
# Edit config.unlocked.vars in your editor
# Lock (config.unlocked.vars → config.vars)
vars hideshow
vars show [file]Decrypts a config.vars file and renames it to config.unlocked.vars. The encrypted values are replaced with their plaintext. Edit the file directly, then run hide.
Before decrypting, vars checks for common problems:
- Warns if
.varskeyis missing - Warns if the pre-commit hook isn't installed
Flags
| Flag | Short | Description |
|---|---|---|
--file <path> | -f | Target a specific .vars file |
vars show -f staging.varshide
vars hideEncrypts ALL unlocked .unlocked.vars files. Scans for any *.unlocked.vars file in the current project and encrypts each one, renaming it back to .vars. You don't need to specify a file.
Encryption is all-or-nothing per file. If any value fails, that file stays untouched.
If schemas changed since the last gen run, hide regenerates the TypeScript types automatically.
Flags
| Flag | Short | Description |
|---|---|---|
--file <path> | -f | Target a specific file only |
vars hide -f staging.varsQuick Edits
For when you'd rather not open the file at all.