Docs / Metadata & Tagging

Metadata & Tagging

SlickEnv reads standard .env files but also understands metadata annotations. By adding structured comments above any variable, you can describe it, flag it as sensitive, set validation rules, and more.

Annotation syntax

Annotations are comments that begin with # followed by an @field tag. They must appear on the line immediately above the variable they describe.

# @description Human-readable explanation
# @required true
# @sensitive true
VARIABLE_NAME=value

Supported fields

FieldTypeDescription
@descriptionstringHuman-readable explanation of the variable
@requiredbooleanWhether the variable must have a value
@sensitivebooleanMasks the value in CLI output and logs
@formatstringExpected format or pattern (e.g. url, email, stripe_secret_key)
@defaultstringDefault value used if the variable is not set
@examplestringExample value shown in documentation and status output

Auto-injection defaults

When you push a .env file without annotations, SlickEnv automatically injects sensible defaults:

  • Variables containing KEY, SECRET, TOKEN, or PASSWORD are marked @sensitive true
  • Variables with a URL-shaped value get @format url
  • All variables are marked @required false by default

You can override any auto-injected annotation by adding your own.

Freeform comments

Any comment line that does not begin with an @ tag is treated as a freeform comment and preserved as-is. SlickEnv will never modify or remove your comments.

# This is a freeform comment — SlickEnv preserves it.
# @description Stripe secret key
# @sensitive true
STRIPE_SECRET_KEY=sk_live_abc123

Full example

# === Database ===

# @description PostgreSQL connection string
# @required true
# @sensitive true
# @format url
# @example postgres://user:pass@localhost:5432/mydb
DATABASE_URL=postgres://localhost:5432/myapp_dev

# === API Keys ===

# @description Stripe secret key for payment processing
# @required true
# @sensitive true
# @format stripe_secret_key
STRIPE_SECRET_KEY=sk_live_abc123

# @description Public analytics key (safe to expose)
# @required false
# @sensitive false
# @default ua-000000-1
ANALYTICS_KEY=ua-123456-7

# === App Config ===

# @description Application port
# @required false
# @default 3000
PORT=3000

# @description Log level
# @required false
# @default info
# @example debug
LOG_LEVEL=debug