Value Source

There are multiple types of value sources. The type used for a value source is determined by the type field. For example:

# All of these profiles will generate the same exported value for GREETING

# Literal shorthand - most common
[applications.example.profiles.shorthand.variables]
GREETING = "hello"

# Literal expanded form - generally not needed
[applications.example.profiles.literal.variables]
GREETING = {type = "literal", value = "hello"}

[applications.example.profiles.command.variables]
GREETING = {type = "command", command = "echo hello"}

Value Source Types

Value Source TypeDescription
literalLiteral static value
fileLoad values from a file
commandExecute a shell command

Common Fields

All value sources support the following common fields:

OptionTypeDefaultDescription
multipleboolean, string[]falseLoad a VARIABLE=value mapping, instead of just a value; Pass a list of variables to only load some. See more
sensitivebooleanfalseHide value in console output

Type-Specific Fields

Each source type has its own set of available fields:

Value Source TypeFieldTypeDefaultDescription
literalvaluestringRequiredStatic value to export
filepathstringRequiredPath to the file, relative to the config file in which this is defined
commandcommandstringRequiredCommand to execute in a subshell; the output of the command will be exported
commandcwdstringnullDirectory from which to execute the command. Defaults to the directory from which es was invoked. Paths will be relative to the .env-select.toml file in which this command is defined.