varsvars

CLI Workflow

All vars commands at a glance.

Commands

CommandDescription
vars initInitialize vars in your project — creates config, key, gitignore, hook
vars gen <file>Generate TypeScript types from a .vars file. --platform node | serverless | deno | static selects the output shape. cloudflare was removed in the current major — use serverless instead.
vars show [file]Decrypt a .vars file in-place for editing
vars hideEncrypt all unlocked .vars files
vars run --env <env> -- cmdRun a command with decrypted env vars injected
vars check [-f file]Validate schemas and run check blocks
vars add <name>Interactively add a variable
vars remove <name>Remove a variable from a .vars file
vars lsList all .vars files with lock state and var count
vars ls <file>List variables in a file with metadata
vars export --env <env>Export as dotenv, json, or k8s-secret format
vars key initCreate a new encryption key
vars key rotateRotate the encryption key
vars key fingerprintPrint the key fingerprint
vars key exportPrint base64 master key for CI
vars doctorDiagnose your vars setup

Environment

VariableDescription
VARS_KEYBase64-encoded master key — bypasses PIN prompt. Required for CI/CD. Get it with vars key export.

Guides