{"categories":[{"label":"Markup","url":"https://skillfed.io/packages/category/text-processing-markup"}],"enrichment":{"capability":"Modifies YAML documents in place with surgical precision, preserving all whitespace and formatting on unchanged lines to produce minimal diffs.","skillfed_tags":["yaml-editing","format-preserving","codemod-tool"],"use_cases":["Update version strings in CI/CD configuration files while keeping formatting intact for minimal git diffs.","Automate bulk changes to Kubernetes manifests or Helm values without reformatting the entire document.","Build codemods that modify application configuration YAML files as part of refactoring or migration workflows.","Programmatically edit Docker Compose or other YAML-based infrastructure-as-code files with surgical precision."],"what_it_does":"codemod-yaml is a library for making targeted edits to YAML files while preserving formatting. It uses tree-sitter to parse YAML and allows you to modify document structure programmatically, then write the result back with minimal changes to whitespace and layout on unmodified lines. This makes it suitable for automation tools and codemods that need to update YAML configuration files without introducing unnecessary formatting noise into version control diffs.\n\nThe library is inspired by tomlkit and pyupgrade, adopting their philosophy of format-preserving edits. It exposes a simple API where you parse a YAML file into a stream object, modify its contents like a Python dict, and serialize it back to bytes. The main constraint is Python version support: runtime usage works back to 3.9, but development and full mypy compatibility require 3.10-3.12.","worth_installing":"Yes. The package solves a real problem\u2014format-preserving YAML edits\u2014with low install friction, active maintenance, permissive licensing, and no known vulnerabilities. It is well-suited for automation and codemod tools where minimal diffs matter. The narrow Python version window for development is not a blocker for runtime use."},"id":"codemod-yaml","links":{"html":"https://skillfed.io/packages/codemod-yaml","md":"https://skillfed.io/packages/codemod-yaml.md","pypi":"https://pypi.org/project/codemod-yaml/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-03-25","license_spdx":null,"license_treatment":"permissive","name":"codemod-yaml","python_support":"supports_current","summary":"Lib to modify yaml inplace"},"popularity":{"monthly_downloads":183143,"position":10072,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.7.0"}
