The MOML 2.0 rules.
A compact reference for the language contract.
timeout = 45 returns the string "45".name = Mike and name = "Mike" mean the same scalar.path = C:\Users\Karim survives exactly.hotkey = #h and color = #085041 are data.colors = red, green is a list. In providers = groq, *openrouter, the * is ordinary text.key = is an empty string. A one-item inline list is written with one trailing explicit "" so its list shape survives a parser-only round trip.# MOML 2.0 and MOML 2.0 files use .m2.{ } block, a leading * marks the active item or named entry. Inside an inline comma list, * has no structural meaning and remains part of the string.Dictionary-like blocks
provider {
c1 = openrouter
details {
d1 = Hello
d2 = World
}
details1 = Hello, World
}key = value, inline list values, and named child blocks are all named entries, so they can coexist.
List-like blocks
providers {
openrouter
anthropic
*openai
}A bare-item block is a list. Do not mix bare items with key = value or named blocks inside the same container.
Rule 7: why the one-item list sentinel exists
This rule is a deliberate round-trip preservation choice, not type inference. MOML stores strings and structure only, so models = llama4 has no way to tell the parser whether the application intended a scalar string or a one-item list.
Scalar: models = llama4 One-item list: models = llama4, ""
The trailing explicit empty string is a structural sentinel used only to preserve list shape when the writer serializes a one-item inline list. MOML preserves it exactly; a schema-aware Gatekeeper may remove one trailing structural empty before returning that setting to the application.
Nested blocks
provider {
details {
details2 {
x1 = New
x2 = Old
}
}
}Nesting depth is not the restriction; structural consistency inside each individual block is.
Quoted strings
Inside quotes MOML defines exactly four escapes: \\, \", \n, and \t. Outside quotes, backslash is ordinary data.