sigildocs

(sigil env)

(sigil env) - Environment Variable Utilities

Provides utilities for working with environment variables, including loading from .env files.

Exports

Load environment variables from a .env file.

Parses the file and sets environment variables for each line. Supports standard .env format:

  • KEY=value (one per line)
  • Lines starting with # are comments
  • Values can be quoted with " or '
  • Empty lines are ignored

Does nothing if the file doesn't exist.

Parse a single .env line and set the environment variable

strip-quotesprocedure

Remove surrounding quotes from a string

Get an environment variable with a default value.

Returns the value of the environment variable, or the default if the variable is not set.

Get a required environment variable.

Returns the value of the environment variable, or raises an error if the variable is not set.