Skip to content

Config Item @decorators

Item decorators in a comment block directly preceeding an env item are attached to that item. Multiple decorators can be specified on the same line. A comment block is broken by either an empty line or a divider.

# @required @sensitive @type=string(startsWith=sk-)
# @docsUrl=https://docs.servicex.com/api-keys
SERVICE_X_API_KEY=

Sets whether an item is required - meaning validation will fail if the value resolves to undefined or an empty string.

Default behavior for all items can be toggled using the @defaultRequired root decorator

# @defaultRequired=false
# ---
# @required
REQUIRED_ITEM=

Opposite of @required. Equivalent to writing @required=false.

# @defaultRequired=true
# ---
# @optional
REQUIRED_ITEM=

Sets whether the item should be considered sensitive - meaning it must be protected from leaking. The value will be always be redacted in CLI output, and client integrations can take further action to prevent leaks.

Default behavior for all items can be set using the @defaultSensitive root decorator

# @sensitive
SERVICE_X_PRIVATE_KEY=
# @sensitive=false
SERVICE_X_CLIENT_ID=

Sets the data type of the item - which affects validation, coercion, and generated types. Note that some data types take additional arguments. See data types reference for more details.

If not specified, a data type will be inferred if a static value is set, or default to string otherwise.

# @type=url
SOME_URL=
# @type=string(startsWith=abc)
EXAMPLE_WITH_TYPE_OPTIONS=
INFER_NUMBER=123 # data type of `number` will be inferred from the value

Provide an example value for the item. This lets you avoid setting placeholder values that are not meant to be used.

# @example="sk-abc123"
SECRET_KEY=

URL of documentation related to the item.

# @docsUrl=https://platform.openai.com/docs/api-reference/authentication
OPENAI_API_KEY=