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 --helpThis 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-cliAfter installation, you can verify that it works with:
yini --version
yini --helpQuick example
Suppose you have a file called config.yini:
^ App
name = "My App Title"
version = "1.2.3"
pageSize = 25
darkTheme = offYou can parse it like this:
yini parse config.yiniOutput:
{
"App": {
"name": "My App Title",
"version": "1.2.3",
"pageSize": 25,
"darkTheme": false
}
}Common commands
Parse a YINI file
yini parse config.yiniOutput compact JSON
yini parse config.yini --compactOutput JavaScript-style object syntax
yini parse config.yini --jsWrite output to a file
yini parse config.yini -o out.jsonValidate a file
yini validate config.yiniValidate in strict mode
yini validate --strict config.yiniA 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 = falseThat 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
- β‘οΈ YINI format overview
What YINI is and why it exists. - β‘οΈ Learn the YINI syntax
A simple introduction to sections, values, nesting, and comments. - β‘οΈ Examples
See YINI examples from simple to more advanced. - β‘οΈ YINI Specification
The formal specification for the YINI format.
Links
If you want to try the CLI or explore the project further, these links are a good place to continue.
