varsvars

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 hide

show

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 .varskey is missing
  • Warns if the pre-commit hook isn't installed

Flags

FlagShortDescription
--file <path>-fTarget a specific .vars file
vars show -f staging.vars

hide

vars hide

Encrypts 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

FlagShortDescription
--file <path>-fTarget a specific file only
vars hide -f staging.vars

Quick Edits

For when you'd rather not open the file at all.