YINI Cheat Sheet
A quick reference for writing clean, readable YINI configuration files.
YINI makes data files (such as configuration files and application settings) easy for humans to read
and predictable for machines to process — like INI, but with real structure, lists (arrays), objects, and comments.
Less verbose than JSON, simpler than YAML, and more expressive than INI.
🧱 Basic Syntax
| Element | YINI Syntax |
|---|---|
| Section heading - level 1 | ^ App |
| Section heading - level 2 | ^^ Database |
| Section heading - level 3 | ^^^ Pool |
| String | "text" or 'text' |
| Number | 42, 3.14, 1e4 |
| Boolean | true, false, on, off, yes, no (case-insensitive) |
| Null | null, Null, (or blank in lenient mode) |
| List / Array | [1, 2, 3] |
| Inline object (map/dict) | { a: 1, b: 2 } |
| Comment | // Default comment |
| Alt. comment | # Comment (must be #␠ or #\t) |
| Multi-line (block) comment | /* ... */ |
| Full-line comment | ; This is a full-line comment (only full lines) |
| Disable line | --debug = true |
| Disable section | --^ Experimental |
🧩 Inline Objects & Nested Data
(Objects are also known as maps/dicts.)
Simple object
db = { host: "localhost", port: 5432 }Nested objects
service = {
http: { port: 8080, secure: true },
limits: { rpm: 1000 }
}🧭 Important Rules
- Indentation is only for humans — structure is defined by section markers (
^,^^,^^^, etc). - Strings must always be quoted using
'...'or"...". name: "John"creates a list, not a single value. Usename = "John"for single values.- Trailing commas are allowed in lists and objects (lenient mode).
- Duplicate keys in the same section are not allowed.
#is a comment only if followed by space or tab.
🔢 Number Formats
YINI supports multiple numeric formats:
| Format | Example |
|---|---|
| Integer | 42 |
| Float | 3.14 |
| Scientific | 1e6, 5.2E-3 |
| Hexadecimal | #FFAA00 |
| Binary | 0b101010 |
| Octal | 0o755 |
All numeric forms are parsed as real numbers — no quotes required.
🧪 Minimal Example
^ App
name = "Nebula"
version = "2.3.1"
^^ Network
ports = [80, 443]
ssl = on
^^ Limits
requests = { perMinute: 1200, burst: 60 }Next Steps
- ➡️ YINI Code Examples
Explore real-world configurations. - ➡️ Get Tools
CLI, parser libraries, and editor tools.
