API Reference Notes¶
Generated Dokka output is the authoritative API reference for this library.
Build it locally from the workspace root:
./dev dokka kotlin-dotenv-parser
Main Parser API¶
parseDotenvText(text, options)parses a full dotenv document and returns entries in source order.DotenvEntrycontains the parsed key, value, and source line.DotenvParseOptionscontrols variable expansion, command substitution, resolver state, command limits, and naming rules.DotenvParseExceptionand its subclasses describe syntax, expansion, and command-substitution failures with source context.
Expansion API¶
StringExpanderexpands POSIX-style variables and command substitutions in a plain string.ExpansionOptionscontrols the lower-level expander.VarResolverandMutableVarResolverprovide variable lookup and assignment support.ExpansionExceptionreports expander failures before they are mapped to parser exceptions.
Command API¶
CommandExecutoris the abstraction used by command substitution.ProcessCommandExecutoris the default implementation.CommandOptionscontrols shell selection, environment inheritance, working directory, timeout, output limit, stderr handling, charset, and non-zero exit policy.CommandResultreturns stdout, exit code, and captured byte count.
Command execution is implemented on JVM targets. Android and native targets return
CommandRunException.Unsupported.