YINI — A Human-Friendly Configuration Format
YINI is a human-friendly, INI-inspired text-based configuration format for software projects: readable like INI, structured like JSON, without YAML's surprises. It offers clear nesting, comments, and predictable parsing, so your configuration stays easy to read and reason about as it grows. Suitable for configuration files, application settings, and general data storage.
Example of YINI code:
Source file: config.yini
💡 Why YINI?
INI, YAML, and JSON all approach configuration differently, each with tradeoffs:INI favors simplicity, YAML offers expressive structure, and JSON prioritizes precision.
YINI focuses on keeping configuration readable while providing clear nesting and predictable behavior.
- Clear structure without indentation-based rules — YINI uses explicit structure instead of indentation-based semantics, so files stay readable and predictable.
- Readable section nesting that scales with file size — YINI supports nesting and structured data while keeping configuration files easy to scan and maintain.
- Optimized for human-edited configuration — The format prioritizes clarity, comments, and consistency for day-to-day configuration work.
- Predictable behavior defined by clear rules — YINI has a formal grammar and well-defined parsing rules, reducing surprises across tools.
- A balanced middle ground between simplicity and structure — It offers more structure than INI, less noise than XML/JSON, and fewer edge cases than YAML.
More info: What is YINI and Why?
💡 How can YINI be used?
Build, convert, and consume structured configuration and data using simple tools.- 🛠 Convert YINI → JSON via CLI.
- 📦 Load YINI into your app as native objects.
- 🧩 Use YINI for configuration, data files, pipelines, and tooling.
⚡ TL;DR — Quick Start
Try YINI in three simple steps:
-
1) Create a file
Save the two lines below asconfig.yini: (no build step, no dependencies required)^ App name = "Hello"⚠️ Make sure you save the file with the
.yiniextension (not.txt). -
2) Run this in your terminal
From the same folder where you saved the file:
npx yini-cli parse config.yini --prettyUse the
--prettyflag for pretty-printed JSON output: -
3) See the result
You should now see the following (JSON):
{ "App": { "name": "Hello" } } -
Bonus: JavaScript output
npx yini-cli parse config.yiniGives the output as the following JavaScript object:
{ App: { name: 'Hello' } }
Nice — you just parsed your first YINI file.
📝 Example
YINI code:
Source file: settings.yini
Parsed output (JSON):
{
"Settings": {
"serviceId": "NebulaService",
"release": "3.2.1",
"debugMode": false,
"tagline": ""Nebula" is a cloud of gas and dust in outer space.",
"Network": {
"bindAddress": "127.0.0.1",
"bindPort": 8080,
"allowedOrigins": [
"https://myapp.com",
"http://localhost:3000"
]
},
"Capabilities": {
"enableSearch": true,
"experimental": [
"new-ui",
"streaming-api"
],
"pools": {
"min_units": 2,
"max_units": 5,
"size_mb": 128,
"timeout_sec": 90
}
},
"DB Config": {
"host": "db.internal",
"ssl": true,
"Security": {
"username": "service_user",
"password": "****"
}
}
}
} New to YINI? Read a short intro to the YINI format.
🧩 Key Features
- Clear section markers
Sections start with
^by default:^ App title = "MyApp"Nested sections use repeated
^markers to indicate section levels — similar concept like Markdown's heading levels:^ App,^^ Server,^^^ Logging. This creates a clear section hierarchy without relying on indentation.YINI also supports alternative section markers such as
<. - Predictable and well-defined
Defined by a formal, versioned specification and grammar (
ANTLR4) to ensure consistent behavior across tools. - Simple key–value pairs
Inside a section, configuration is written as:
key = valueThis keeps files readable and familiar, inspired by classic INI.
- Structured like YAML, readable like INI
Useful data types (similar to JSON):
- Nested sections
- Lists (arrays)
- Objects (JavaScript objects)
- Strings and numbers
- Booleans and nulls
- Comments where you expect them
Supports both line comments (
#,//,;and block/multi-line comments/* ... */), making it easy to document configuration directly in the file. - Reduced syntax noise
Keeps files readable by avoiding excessive brackets, quotes, and long dotted key paths such as
server.database.advanced.param. - Free and open source
YINI is open-source software, free to use, inspect, and build upon.
ℹ️ About
YINI is an INI-inspired configuration format designed for clarity, simple nesting, and predictable parsing.
The format is defined by a formal, versioned specification and maintained as an open-source project under the YINI-lang organization on GitHub.
🛠️ Contribute & Get Involved
YINI is open-source and actively maintained. You can get involved by trying it, reporting issues, contributing code, or just ⭐ the project on GitHub.
🔭 Next steps
- Get Started
Learn how to install and parse your first config in minutes.
- Quick Tutorial
5-minute guided walkthrough of the YINI format and validation basics.
- Code Examples
Real-world YINI examples showing common configuration patterns.
- FAQ
Common questions about using YINI in real projects.
- Specification
Official YINI format rules with full technical details of the YINI format.
