Skip to content

Reserved variables

varlock reserves a couple of environment variable namespaces for its own use. Knowing them helps you avoid surprises and understand how varlock passes state between processes.

PrefixExampleWho sets it
VARLOCK_* (no underscore)VARLOCK_ENVvarlock (computed) — see Builtin variables
_VARLOCK_* (single underscore)_VARLOCK_ENV_KEYyou — to configure varlock’s behavior
__VARLOCK_* (double underscore)__VARLOCK_ENVvarlock internals — injected automatically, never set these yourself

Set these in your shell, CI, or deploy environment to configure varlock’s behavior.

Encryption key used to decrypt the injected env blob and any encrypted() values at runtime. Typically set in deploy environments. See Encrypted deployments.

Encryption key for the on-disk resolved-value cache. When set (e.g. as a CI secret), it enables the disk cache in environments without OS keychain access. See Caching.

Overrides varlock run output redaction:

  • true / 1 — force redaction on (only applies to piped/redirected output; errors if attached to an interactive terminal)
  • false / 0 — disable redaction entirely

The --redact-stdout / --no-redact-stdout flags take precedence over this env var. Useful when you can’t easily change the command being run — for example in a wrapper script or CI config.

These are injected automatically so that varlock state survives across process boundaries. You should never set them yourself — they’re documented here only so you recognize them if you see them in a process environment.

The serialized env graph (resolved config values plus metadata) injected by varlock run and build-time integrations, so the runtime can load your config without re-invoking the CLI.

A marker set so a child process can detect that it is running under varlock run.