YINI CLI

Validate, inspect, and convert YINI files from the command line.

The YINI CLI is the official command-line tool for working with YINI files. It is designed to make everyday configuration work simple and predictable β€” whether you want to quickly inspect a file, validate it, or convert it to JSON or JavaScript.

If you prefer configuration that stays readable without depending on indentation, YINI CLI gives you a straightforward way to work with it from your terminal.


Why use YINI CLI?

YINI CLI is useful when you want to:

  • Validate configuration files before running an app or deploying.
  • Inspect YINI files quickly from the terminal.
  • Convert YINI into JSON or JavaScript for tooling and automation.
  • Work with configuration that stays explicit, structured, and easy to read.

It is especially helpful for developer workflows, scripts, CI checks, and local debugging.


Install

You can either run YINI CLI directly with npx or install it globally.

Try it instantly with npx

npx yini-cli --help

This is the quickest way to try the CLI without installing it globally.

Install globally with npm

Install the CLI globally with npm:

npm install -g yini-cli

After installation, you can verify that it works with:

yini --version
yini --help

Quick example

Suppose you have a file called config.yini:

^ App
name = "My App Title"
version = "1.2.3"
pageSize = 25
darkTheme = off

You can parse it like this:

yini parse config.yini

Output:

{
    "App": {
        "name": "My App Title",
        "version": "1.2.3",
        "pageSize": 25,
        "darkTheme": false
    }
}

Common commands

Parse a YINI file

yini parse config.yini

Output compact JSON

yini parse config.yini --compact

Output JavaScript-style object syntax

yini parse config.yini --js

Write output to a file

yini parse config.yini -o out.json

Validate a file

yini validate config.yini

Validate in strict mode

yini validate --strict config.yini

A quick look at YINI

YINI is a human-friendly configuration format with explicit structure, nested sections, comment support, and predictable parsing.

// This is a comment in YINI

^ App
name = 'My Title'
items = 25
darkMode = true

    ^^ Special
    primaryColor = #336699
    isCaching = false

That becomes:

{
    App: {
        name: 'My Title',
        items: 25,
        darkMode: true,
        Special: {
            primaryColor: 3368601,
            isCaching: false
        }
    }
}

When YINI CLI is a good fit

YINI CLI is a good fit if you want:

  • A simple command-line tool for structured configuration.
  • Human-readable config files without indentation-based structure.
  • Easy conversion to JSON or JavaScript.
  • A clear way to validate configuration during development or deployment.

Learn more

If you want to try the CLI or explore the project further, these links are a good place to continue.