{"id":30046714,"url":"https://github.com/yini-lang/yini-cli","last_synced_at":"2026-04-12T02:02:07.528Z","repository":{"id":307731497,"uuid":"1025824155","full_name":"YINI-lang/yini-cli","owner":"YINI-lang","description":"Command-line tool for working with YINI files (clean, type-safe config format with nested sections). Validate, inspect, and convert to JSON with pretty output.","archived":false,"fork":false,"pushed_at":"2025-09-05T19:14:21.000Z","size":126,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-05T21:16:37.739Z","etag":null,"topics":["cli","config","config-file","config-files","config-parser","configuration","converter","ini","ini-alternative","oss","structured-data","typescript","yaml","yini"],"latest_commit_sha":null,"homepage":"https://github.com/YINI-lang","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YINI-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-24T21:32:31.000Z","updated_at":"2025-09-05T19:14:25.000Z","dependencies_parsed_at":"2025-08-01T22:30:33.663Z","dependency_job_id":"1ebe95cf-bd59-447b-a82f-ca8feb17df10","html_url":"https://github.com/YINI-lang/yini-cli","commit_stats":null,"previous_names":["yini-lang/yini-cli"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/YINI-lang/yini-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YINI-lang%2Fyini-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YINI-lang%2Fyini-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YINI-lang%2Fyini-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YINI-lang%2Fyini-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YINI-lang","download_url":"https://codeload.github.com/YINI-lang/yini-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YINI-lang%2Fyini-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273993046,"owners_count":25203793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","config","config-file","config-files","config-parser","configuration","converter","ini","ini-alternative","oss","structured-data","typescript","yaml","yini"],"created_at":"2025-08-07T08:53:31.463Z","updated_at":"2026-04-12T02:02:07.509Z","avatar_url":"https://github.com/YINI-lang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YINI CLI\n\u003e **Readable configuration without indentation pitfalls or JSON verbosity.**  \n\n**The official CLI for validating, inspecting, and converting YINI configuration files to JSON or JavaScript, built by the YINI-lang project.**\n\n*YINI is an INI-inspired, human-friendly configuration format with real structure, nested sections, comments, and predictable parsing.*\n\n[![npm version](https://img.shields.io/npm/v/yini-cli.svg)](https://www.npmjs.com/package/yini-cli) [![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/) [![All Test Suites](https://github.com/YINI-lang/yini-cli/actions/workflows/run-all-tests.yml/badge.svg)](https://github.com/YINI-lang/yini-cli/actions/workflows/run-all-tests.yml) [![Regression Tests](https://github.com/YINI-lang/yini-cli/actions/workflows/run-regression-tests.yml/badge.svg)](https://github.com/YINI-lang/yini-cli/actions/workflows/run-regression-tests.yml) [![CLI Test CI](https://github.com/YINI-lang/yini-cli/actions/workflows/run-cli-test.yml/badge.svg)](https://github.com/YINI-lang/yini-cli/actions/workflows/run-cli-test.yml) [![npm downloads](https://img.shields.io/npm/dm/yini-cli)](https://www.npmjs.com/package/yini-cli)\n\nDesigned for developers and teams who want human-edited configuration with explicit structure and no indentation-based semantics.\n\n## Quick Start\n\n### Requirements\nYINI CLI requires Node.js **v20 or later**.  \n\n### Installation\n\n1. **Install globally from npm — (requires Node.js)**  \n    Open your terminal and run:\n    ```\n    npm install -g yini-cli\n    ```\n\n2. **Verify installation**  \n    Run this in your terminal:\n    ```bash\n    yini --version\n    ```\n    This should print the installed version.\n\n    Then try:\n    ```bash\n    yini --help\n    ```\n    This should show the CLI help.\n\n3. **Test functionality**  \n    Create a simple test file, for example: `config.yini`:\n    ```yini\n    ^ App\n    name = \"My App Title\"\n    version = \"1.2.3\"\n    pageSize = 25\n    darkTheme = off\n    ```\n\n    Then run:\n    ```bash\n    yini parse config.yini\n    ```\n\n    Expected output:\n    ```json\n    {\n        \"App\": {\n            \"name\": \"My App Title\",\n            \"version\": \"1.2.3\",\n            \"pageSize\": 25,\n            \"darkTheme\": false\n        }\n    }    \n    ```\n\n### Typical use cases\n\n- Validating configuration files during development or CI.\n- Inspecting and debugging structured configuration.\n- Converting YINI files to JSON for tooling and automation.\n\n---\n\n## What YINI looks like\n\u003e A basic YINI configuration example, showing a section, nested section, comments:  \n![YINI Config Example](./samples/basic.yini.png)\nSource: [basic.yini](./samples/basic.yini)\n\n### A larger example\n\u003e A real-world YINI configuration example, showing sections, nesting, comments, and multiple data types:  \n![YINI Config Example](./samples/config.yini.png)\nSource: [config.yini](./samples/config.yini)\n\n---\n\n## 🙋‍♀️ Why YINI?\n- **Indentation-independent structure:** YINI is indentation-independent — whitespace never alters structural meaning.\n- **Explicit nesting:** It uses clear header markers (`^`, `^^`, `^^^`) to define hierarchy, making large configurations easier to scan and refactor.\n- **Multiple data types:** Supports booleans (`true` / `false`, `yes` / `no`, etc.), numbers, lists, and inline objects, with explicit string syntax.\n- **Comment support:** YINI supports multiple comment styles (`#`, `//`, `/* ... */`, and `;`), making it easier to document configuration directly in the file.\n- **Predictable parsing:** Well-defined rules with optional strict and lenient modes for different use cases.\n\n---\n\n## Usage\n\n### Quick Examples\n\n```bash\nyini parse config.yini\n```\n→ Parse and print formatted JSON (default).\n\n```bash\nyini parse config.yini --compact\n```\n→ Output compact JSON (no whitespace).\n\n```bash\nyini parse config.yini --js\n```\n→ Output as JavaScript-style object.\n\n```bash\nyini parse config.yini -o out.json\n```\n→ Write formatted JSON to a file.\n\n```bash\nyini validate --strict config.yini\n```\n→ Validate using strict mode.\n\nFor help with a specific command:\n\n```bash\nyini parse --help\n```\n\n---\n\n## A closer look at YINI\n\nHere's a small example showing YINI structure and comments:\n```yini\n    // This is a comment in YINI\n\n    ^ App                      // Defines section (group) \"App\" \n      name     = 'My Title'    // Keys and values are written as key = value\n      items    = 25\n      darkMode = true          // \"ON\" and \"YES\" works too\n\n        // Sub-section of the \"App\" section\n        ^^ Special\n           primaryColor = #336699   // Hex number format\n           isCaching    = false     // \"OFF\" and \"NO\" works too\n    \n    # This is a comment too.\n```\n\n**The above YINI as a JavaScript object:**\n```js\n{\n    App: {\n        name: 'My Title',\n        items: 25,\n        darkMode: true,\n        Special: { \n            primaryColor: 3368601,\n            isCaching: false\n        }\n    }\n}\n```\n\n**In JSON:**\n```json\n{\n   \"App\":{\n      \"name\":\"My Title\",\n      \"items\":25,\n      \"darkMode\":true,\n      \"Special\":{\n         \"primaryColor\":3368601,\n         \"isCaching\":false\n      }\n   }\n}\n```\n\nThat's it!\n\n- ▶️ See more on [YINI Homepage](https://yini-lang.org/?utm_source=github\u0026utm_medium=referral\u0026utm_campaign=yini_cli\u0026utm_content=readme_middle).\n- ▶️ Link to [Demo Apps](https://github.com/YINI-lang/yini-demo-apps/tree/main) with complete basic usage.\n\n---\n\n## 📤 Output Modes for `yini parse`\n\nThe `parse` command supports multiple output formats:\n\n| Command Example                         | Output Format       | Description |\n|------------------------------------------|----------------------|------------|\n| `yini parse config.yini`                | Pretty JSON (default) | Formatted JSON with indentation (4 spaces). |\n| `yini parse config.yini --json`         | Pretty JSON          | Explicit pretty JSON output. |\n| `yini parse config.yini --compact`      | Compact JSON         | Minified JSON (no whitespace). |\n| `yini parse config.yini --js`           | JavaScript object    | JavaScript-style object (unquoted keys, single quotes). |\n| `yini parse config.yini -o out.json`    | File output          | Writes formatted JSON to file (default format). |\n\n\u003e💡 `--js` and `--compact` are mutually exclusive.  \n\u003e💡 Tip: You can combine --output with any style flag to control both formatting and destination.\n\n### Output File Handling\n\nWhen using `-o, --output \u003cfile\u003e`, YINI CLI applies safe write rules:\n\n| Scenario | Result |\n|----------|--------|\n| File does not exist | File is written |\n| File exists and is **older** than the input YINI file | File is overwritten |\n| File exists and is **newer** than the input YINI file | Skipped by default |\n| File exists and output content is unchanged | Skipped |\n| `--overwrite` is used | File is always overwritten |\n| `--no-overwrite` is used | Command fails if file exists |\n\nThis helps avoid overwriting newer generated files and avoids rewriting unchanged output unnecessarily.\n\nUse `--overwrite` to force replacement.\n\n---\n\n## Links\n- ➡️ [YINI Homepage](https://yini-lang.org)  \n  *Tutorials, guides, and examples.*\n\n- ➡️ [Read the YINI Specification](https://yini-lang.org/refs/specification)  \n  *Full syntax and format reference.*\n\n- ➡️ [YINI Parser on npm](https://www.npmjs.com/package/yini-parser)  \n  *The TypeScript/Node.js parser used by this CLI.*\n\n- ➡️ [Demo Apps](https://github.com/YINI-lang/yini-demo-apps/tree/main)  \n  *Complete basic usage examples.*\n\n- ➡️ [YINI-lang Project](https://github.com/YINI-lang)  \n  *Repositories and related ecosystem projects.*\n\n---\n\n## Contributing\nContributions, bug reports, and feedback are welcome. Even small improvements or suggestions are appreciated.  \n\nIf this tool is useful to you, a GitHub star helps more people discover the project and supports future development.\n\n---\n\n## License\nThis project is licensed under the Apache-2.0 license — see the [LICENSE](./LICENSE) file for details.\n\nIn this project on GitHub, the `libs` directory contains third party software and each is licensed under its own license which is described in its own license file under the respective directory under `libs`.\n\n---\n\n**^YINI ≡**  \n\u003e Readable like INI. Structured like JSON. No indentation surprises.  \n\n[yini-lang.org](https://yini-lang.org/?utm_source=github\u0026utm_medium=referral\u0026utm_campaign=yini_cli\u0026utm_content=readme_footer) · [YINI-lang on GitHub](https://github.com/YINI-lang)  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyini-lang%2Fyini-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyini-lang%2Fyini-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyini-lang%2Fyini-cli/lists"}