Skip to main content

YAML-Doctor 🩺📄

PyPI version CI

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)

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!

Metadata

Release files for yaml-doctor 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yaml-doctor 0.1.2
File Size Uploaded Provenance
yaml_doctor-0.1.2.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for yaml-doctor 0.1.2
File Interpreter ABI Platform
yaml_doctor-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / yaml_doctor-0.1.2.tar.gz

Download URL yaml_doctor-0.1.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fc6cf4af1cec9d12edb0ad337ab9fe04874432df337e1c7215de6dd515153bca
BLAKE2b-256 checksum
How to use checksums
5330f1a8160efe34fc6536422b5637ce8f7bd7dc0ba64aab9af62bc21b024681
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / yaml_doctor-0.1.2-py3-none-any.whl

Download URL yaml_doctor-0.1.2-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ae08cce08c85346d06dbe578e64ffc9ecb9400f41bf755279e1c0de3b55f04a
BLAKE2b-256 checksum
How to use checksums
fd940e64c5894df4b0c27cae04b7413c92666b019b3059a03cb3dfd469a1bc19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Security for yaml-doctor 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page