What is YINI and Why?

YINI is a human-friendly, text-based configuration format — less verbose than JSON, simpler than YAML, and more expressive than INI.

A calm, predictable way to write configuration and structured data for real-world projects.

❓ What is YINI?

YINI is an INI-inspired text-based data format designed for humans first.

It combines:
  • the simplicity of INI
  • the structure of JSON
  • the flexibility people want from YAML

Example of YINI code:

YINI Config File Source file: config.yini

🧯 Why does YINI exist?

Most config formats fail as projects grow.
  • INI becomes flat and unstructured
  • JSON becomes noisy and hard to edit
  • YAML becomes fragile and unpredictable
YINI was created to fix that.

✨ What makes YINI different?

  • Clear structure without indentation rules

    No fragile whitespace semantics.

  • Readable nesting that scales

    Files remain easy to scan even when large.

  • Predictable parsing

    Defined by a formal grammar and spec.

  • Human-first design

    Comments, consistency, minimal noise.

  • Balanced design

    More structure than INI, less noise than JSON, fewer edge cases than YAML.

💡 What can I do with YINI?

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.

⚖️ Quick comparison

"YAML foot-gun" vs YINI predictability (tabs/indentation)

YAML:

# One stray indent changes the structure
app:
  name: My App
  server:
    host: 127.0.0.1
    port: 8080
   allowedOrigins:   # <- off by one indent (hard to spot)
    - https://myapp.com
    - "http://localhost:3000"

YAML uses indentation to define structure; YINI uses explicit section markers. This makes large configs easier to scan — and much harder to break accidentally.

YINI:

# Structure is defined by markers; indentation is optional
^ App
name = "My App"

^^ Server
host = "127.0.0.1"
port = 8080
allowedOrigins = ["https://myapp.com", "http://localhost:3000"]

Point: In YINI the hierarchy is signaled by markers, not whitespace.

Feature YINI INI JSON YAML TOML
Human-friendly by default
Readability at scale
Predictable parsing
Formal grammar / spec
Nested structure
Comments
Minimal syntax noise
Designed for configuration
Clear error diagnostics
Safe for large configs

⚡ Try YINI in under a minute

No build step. No installation. No setup.
  • Save the two lines below as config.yini:
    ^ App
    name = "Hello"
  • From your terminal, run this:

    npx yini-cli parse --pretty config.yini
  • Results in JSON:

    {
        "App": {
            "name": "Hello"
        }
    }
That's it.

You just parsed your first YINI file.

🧪 Real example

YINI code:

YINI Configuration File Source file: settings.yini

This example uses features from the official YINI specification.

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.


🔭 Next steps

  • Get Started

    Learn how to install and parse your first config in minutes.

  • Code Examples

    Real-world YINI examples showing common configuration patterns.

  • Specification

    Official YINI format rules with full technical details of the YINI format.

  • YINI on GitHub ↗

    Official GitHub page.

YINI is open-source and actively maintained.