yaml-doctor


Nameyaml-doctor JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryA CLI tool to detect and auto-fix common issues in Home Assistant YAML files.
upload_time2025-07-20 23:39:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # YAML-Doctor 🩺📄  
[![PyPI version](https://badge.fury.io/py/yaml-doctor.svg)](https://pypi.org/project/yaml-doctor/)
[![CI](https://github.com/thisguy022/yaml-doctor/actions/workflows/ci.yml/badge.svg)](https://github.com/thisguy022/yaml-doctor/actions/workflows/ci.yml)

Validate – and automatically **fix duplicate keys** – in Home-Assistant-style YAML files.  
No more mysterious “duplicated mapping key” errors breaking your automations!

---

## ✨ Features
- **Fast validation** of any YAML file (Home Assistant, ESPHome, CI pipelines, etc.)
- **Smart auto-fix** `--fix` flag renames duplicate keys in-place (optionally backs up originals)
- **Colorful Rich output** for quick at-a-glance feedback
- **Zero-config CLI** – just run `yaml-doctor your_file.yaml`
- Works on **Windows, macOS, and Linux** (Python ≥ 3.9)

---

## 📦 Installation

### User install (from PyPI – easiest)

```bash
pip install yaml-doctor

🚀 Usage
Goal	Command
Validate only	yaml-doctor ENTER YOUR FILE.yaml
Validate & auto-fix duplicates	yaml-doctor path/to/file.yaml --fix
Show full CLI help	yaml-doctor --help


## EXAMPLE
yaml-doctor secrets.yaml --fix
# 🔍 Running validation before fix…
# ❌ Duplicate key “sensor” found at line 12 – renaming to sensor_1
# 🎉 File fixed successfully.

📄 License
MIT © Jason Clark – use it, ship it, enjoy fewer YAML headaches!



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "yaml-doctor",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Jason Clark <your@email.com>",
    "download_url": "https://files.pythonhosted.org/packages/53/30/f1a8160efe34fc6536422b5637ce8f7bd7dc0ba64aab9af62bc21b024681/yaml_doctor-0.1.2.tar.gz",
    "platform": null,
    "description": "# YAML-Doctor \ud83e\ude7a\ud83d\udcc4  \n[![PyPI version](https://badge.fury.io/py/yaml-doctor.svg)](https://pypi.org/project/yaml-doctor/)\n[![CI](https://github.com/thisguy022/yaml-doctor/actions/workflows/ci.yml/badge.svg)](https://github.com/thisguy022/yaml-doctor/actions/workflows/ci.yml)\n\nValidate \u2013 and automatically **fix duplicate keys** \u2013 in Home-Assistant-style YAML files.  \nNo more mysterious \u201cduplicated mapping key\u201d errors breaking your automations!\n\n---\n\n## \u2728 Features\n- **Fast validation** of any YAML file (Home Assistant, ESPHome, CI pipelines, etc.)\n- **Smart auto-fix** `--fix` flag renames duplicate keys in-place (optionally backs up originals)\n- **Colorful Rich output** for quick at-a-glance feedback\n- **Zero-config CLI** \u2013 just run `yaml-doctor your_file.yaml`\n- Works on **Windows, macOS, and Linux** (Python \u2265 3.9)\n\n---\n\n## \ud83d\udce6 Installation\n\n### User install (from PyPI \u2013 easiest)\n\n```bash\npip install yaml-doctor\n\n\ud83d\ude80 Usage\nGoal\tCommand\nValidate only\tyaml-doctor ENTER YOUR FILE.yaml\nValidate & auto-fix duplicates\tyaml-doctor path/to/file.yaml --fix\nShow full CLI help\tyaml-doctor --help\n\n\n## EXAMPLE\nyaml-doctor secrets.yaml --fix\n# \ud83d\udd0d Running validation before fix\u2026\n# \u274c Duplicate key \u201csensor\u201d found at line 12 \u2013 renaming to sensor_1\n# \ud83c\udf89 File fixed successfully.\n\n\ud83d\udcc4 License\nMIT \u00a9 Jason Clark \u2013 use it, ship it, enjoy fewer YAML headaches!\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A CLI tool to detect and auto-fix common issues in Home Assistant YAML files.",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fd940e64c5894df4b0c27cae04b7413c92666b019b3059a03cb3dfd469a1bc19",
                "md5": "fb6a8f914f0aed85d2ecc087382d2c95",
                "sha256": "4ae08cce08c85346d06dbe578e64ffc9ecb9400f41bf755279e1c0de3b55f04a"
            },
            "downloads": -1,
            "filename": "yaml_doctor-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fb6a8f914f0aed85d2ecc087382d2c95",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 4283,
            "upload_time": "2025-07-20T23:39:03",
            "upload_time_iso_8601": "2025-07-20T23:39:03.302063Z",
            "url": "https://files.pythonhosted.org/packages/fd/94/0e64c5894df4b0c27cae04b7413c92666b019b3059a03cb3dfd469a1bc19/yaml_doctor-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5330f1a8160efe34fc6536422b5637ce8f7bd7dc0ba64aab9af62bc21b024681",
                "md5": "3eccf1bba528864d979aebf18056a7c9",
                "sha256": "fc6cf4af1cec9d12edb0ad337ab9fe04874432df337e1c7215de6dd515153bca"
            },
            "downloads": -1,
            "filename": "yaml_doctor-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3eccf1bba528864d979aebf18056a7c9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 4039,
            "upload_time": "2025-07-20T23:39:04",
            "upload_time_iso_8601": "2025-07-20T23:39:04.389693Z",
            "url": "https://files.pythonhosted.org/packages/53/30/f1a8160efe34fc6536422b5637ce8f7bd7dc0ba64aab9af62bc21b024681/yaml_doctor-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-20 23:39:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "yaml-doctor"
}
        
Elapsed time: 0.46354s