YINI β€” Readable like INI. Structured like JSON. No indentation surprises.

πŸ“¦ 1,246 npm downloads last month   ⭐ 12 GitHub stars across YINI repos

If you find YINI interesting, consider ⭐ starring it on GitHub β†—

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.

Looks like INI, handles structure like JSON β€” without YAML's indentation pitfalls.

Example of YINI code:

File config.yini Source file: config.yini

Why YINI?

INI, JSON, YAML, XML, and TOML all solve configuration in different ways. YINI focuses on a practical middle ground: readable files, explicit structure, useful data types, and predictable parsing.

  • No indentation traps. Structure is defined by section markers, not whitespace.
  • Readable as files grow. Nested sections help larger configurations stay easy to scan.
  • Human-friendly editing. Comments, simple key-value pairs, and familiar syntax keep files approachable.
  • Predictable behavior. Clear rules and a formal grammar help tools parse YINI consistently.

More info: What is YINI and Why?

How YINI is used in practice

Use YINI wherever you need structured configuration β€” without the usual complexity.

  • πŸ›  Validate and convert YINI files from the command line with the YINI CLI tool.
    It can export parsed data as JSON, YAML, XML, or JavaScript.
  • πŸ“¦ Load YINI directly in TypeScript/JavaScript applications with the YINI Parser for TypeScript.
  • 🐍 Load YINI directly in Python scripts, tools, and applications with the YINI Parser for Python.
  • 🧩 Use YINI for configuration files, data files, tooling, and CI workflows.

🌐 The YINI Ecosystem

A high-level overview of the main YINI specification, tooling, implementation, and adoption pieces.

🧠 Core πŸ›  Implementation 🌍 Adoption
βœ” Language Specification (RC)
βœ” Parsing Rules (Lenient & Strict) (RC)
βœ” TypeScript Parser (Primary)
βœ” Formal Grammar (ANTLR) (RC)
βœ” CLI Tool (Parse & Convert YINI)
βœ” Homepage & Docs
βœ” Editor Syntax Highlighting Grammar (VS Code / TextMate)
βœ” Cheat Sheet (Quick Syntax Guide)
βœ” YINI Test Suite / Parser Compatibility Tests
◐ Example Projects
◐ Python Parser (Alpha)
βœ” Complete   ◐ In progress   β—‹ Planned
RC  =  Release Candidate

Who is YINI for?

YINI configuration files are a good fit for:

  • Human-edited configuration files and internal tooling where you control the stack.
  • Developers who want readable, structured configuration without relying on indentation-sensitive syntax.
  • Teams that want comments, useful data types, and nested sections without JSON workarounds or flat INI-style sections.
  • Projects that benefit from predictable parsing in tools, CI, and application configuration.

YINI is early-stage: tooling is growing, community is small β€” However the specification is in release-candidate state, and the official parsers, CLI, and test suite are suitable to try in projects where you control the stack.

Real YINI configuration used by this site

This site uses site-config.yini as a real YINI configuration file in the yini-homepage repository.

During the build workflow, yini-cli converts it to JSON:

npx yini-cli parse site-config.yini --output src/config/site-config.json

This generates src/config/site-config.json, which is read by config.ts and used by this Astro site.

Repository: github.com/YINI-lang/yini-homepage

πŸ“ Example

YINI code:

File settings.yini 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 learn the YINI format.

🧩 Key Features

  1. 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 <.

  2. Predictable and well-defined

    Defined by a formal, versioned specification and grammar (ANTLR4) to ensure consistent behavior across tools.

  3. Simple key–value pairs

    Inside a section, configuration is written as:

    key = value

    This keeps files readable and familiar, inspired by classic INI.

  4. 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
  5. Comments where you expect them

    Supports both line comments (#, //, ; and block/multi-line comments /* ... */), making it easy to document configuration directly in the file.

  6. Reduced syntax noise

    Keeps files readable by avoiding excessive brackets, quotes, and long dotted key paths such as server.database.advanced.param.

  7. Free and open source

    YINI is open-source software, free to use, inspect, and build upon.

πŸ’‘ For syntax & quick reference: See YINI Cheat Sheet

βš–οΈ How YINI compares to other config formats

This is a high-level comparison focused on configuration-file use cases.

YINI supports both lenient and strict parsing modes, depending on how much enforcement you need. Lenient mode is the default.

Feature YINI (lenient) YINI (strict) INI JSON YAML TOML
Human readability by default βœ… βœ… βž– βž– βœ… βž–
Readability at scale βœ… βœ… ❌ ❌ βž– βž–
Predictable parsing βœ… βœ… ❌ βœ… ❌ βœ…
Formal specification / grammar βœ… βœ… ❌ βœ… βœ… βœ…
Nested sections / structured data βœ… βœ… βž– βœ… βœ… βœ…
Nested structure without dotted keys or indentation rules (*) βœ… βœ… βž– βœ… ❌ βž–
Comments βœ… βœ… βœ… ❌ βœ… βœ…
Syntax overhead βœ… βœ… βœ… ❌ βž– βž–
Configuration-oriented design βœ… βœ… βœ… βž– βœ… βœ…
Diagnostic clarity βœ… βœ… βž– βœ… ❌ βœ…
Tolerance for incomplete or hand-edited input βœ… ❌ βž– ❌ βž– ❌
Strength of structural validation βž– βœ… ❌ βœ… βž– βœ…
Suitability for larger configurations βœ… βœ… ❌ βž– βž– βž–
Industry familiarity Low Low Very strong Very strong Very strong Moderate
Native tooling availability Limited / growing Limited / growing Moderate Very strong Very strong Strong
Ecosystem maturity Limited / growing Limited / growing Mature but fragmented Very strong Very strong Strong

Lenient = flexibility & convenience Β· Strict = safety & predictability

βœ… Strong support Β· βž– Partial / debated Β· ❌ Poor or not supported

*) YINI keeps hierarchy visible through nested sections while remaining indentation-insensitive and predictable.


About

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 starring 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.


Project status

CLI tool: yini-cli npm version All Test Suites status
Parser (Node.js) library: yini-parser npm version All Test Suites status