Expand description
Pure env-file parser (no I/O, no set_var). Used by startup bootstrap and admin import endpoint.
Pure .anyllm.env-format parser. No I/O, no set_var — safe from any context including tests.
Format rules (bash-compatible subset):
- Lines starting with
#are comments. KEY=valueorKEY="value"orKEY='value'.- Double-quoted values interpret
\n,\t,\r,\\,\". - Single-quoted values are literal (no escape processing, matching bash behavior).
- Keys must match
[A-Z_][A-Z0-9_]*(POSIX portable env var names).
Structs§
- EnvWarning
- A non-fatal issue found during parsing (unknown key, duplicate, sensitive overwrite, etc.).
- Parse
Result - The result of parsing a
.anyllm.envfile. Ifhard_errorsis non-empty the caller must abort — do NOT writepairsto the database. - Parsed
Pair - A successfully parsed key-value pair from an env file.
Functions§
- escape_
for_ env_ file - Escape a value for double-quoted
.anyllm.envoutput. Produces a string safe to wrap in"...". - parse_
env_ content - Parse
.anyllm.env-format content without any I/O or side effects.