Config item @decorators
boolean
toggles whether the setting a value for the item is required
default value can be toggled using the @defaultRequired root decorator
boolean
toggles whether the item should be considered sensitive (and must be protected from leaks)
default value can be toggled using the @defaultSensitive root decorator
any
provide an example value for the item
boolean
trim leading and trailing whitespace (including newlines) from the value
boolean
trim leading whitespace from each line, will trim the number of spaces found on the first line only
only works if the value is a multi-line string
enum
sets the type of the item, will default to string if not set.
some types take additional arguments, see below for more details
Built-in base types
Section titled “Built-in base types”string
Section titled “string”# @type=string(minLength=5, maxLength=10, toUpperCase=true)MY_STRING=valueSettings:
minLength(number): Minimum length of the stringmaxLength(number): Maximum length of the stringisLength(number): Exact length requiredstartsWith(string): Required starting substringendsWith(string): Required ending substringmatches(string|RegExp): Regular expression pattern to matchtoUpperCase(boolean): Convert to uppercasetoLowerCase(boolean): Convert to lowercaseallowEmpty(boolean): Allow empty string (default: false)
number
Section titled “number”# @type=number(min=0, max=100, precision=2)MY_NUMBER=42.5Settings:
min(number): Minimum allowed valuemax(number): Maximum allowed valuecoerceToMinMaxRange(boolean): Coerce value to be within min/max rangeisDivisibleBy(number): Value must be divisible by this numberisInt(boolean): Value must be an integerprecision(number): Number of decimal places allowed (for non-integers)
boolean
Section titled “boolean”# @type=booleanMY_BOOL=trueThe boolean type accepts various string representations:
- True values: “t”, “true”, “yes”, “on”, “1”
- False values: “f”, “false”, “no”, “off”, “0”
# @type=url(prependHttps=true, allowedDomains=["example.com"])MY_URL=example.comSettings:
prependHttps(boolean): Automatically prepend “https://” if missingallowedDomains(string[]): List of allowed domains
# @type=email(normalize=true)MY_EMAIL=User@Example.comSettings:
normalize(boolean): Convert email to lowercase
# @type=port(min=1024, max=65535)MY_PORT=3000Settings:
min(number): Minimum port number (default: 0)max(number): Maximum port number (default: 65535)
# @type=ip(version=4, normalize=true)MY_IP=192.168.1.1Settings:
version(4|6): IP version (4 or 6)normalize(boolean): Convert to lowercase
semver
Section titled “semver”# @type=semverMY_VERSION=1.2.3-beta.1Validates semantic version strings according to the semver specification.
isoDate
Section titled “isoDate”# @type=isoDateMY_DATE=2024-03-20T15:30:00ZValidates ISO 8601 date strings with optional time and milliseconds.
# @type=uuidMY_UUID=123e4567-e89b-12d3-a456-426614174000Validates UUID strings (versions 1-5 per RFC4122, including NIL).
# @type=md5MY_HASH=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6Validates MD5 hash strings.
# @type=enum(development, staging, production)ENV=developmentTakes a list of possible values. The value must match one of the provided options exactly.
simple-object
Section titled “simple-object”# @type=simple-objectMY_OBJECT={"key": "value"}Validates and coerces JSON strings into plain objects.