kdlfmt is a code formatter for KDL documents, wrapping the official kdl-rs Rust parser. Current stable version is 0.1.7, released periodically on npm, Cargo, Homebrew, and via precompiled binaries. Supports both KDL v1 and v2 specifications; by default tries v2 then v1. Key differentiators: thin CLI wrapper with lint-style check subcommand, config file support, and stdin/stdout piping. Unlike general document formatters, kdlfmt is purpose-built for KDL and leverages the canonical Rust parser for correctness.
npm install kdlfmtNo compatibility data collected yet for this library.
Installs kdlfmt globally via npm and demonstrates format, check, stdin/stdout, and version selection.
Specify --kdl-version v1 explicitly when formatting KDL v1 documents to avoid unintended changes.
Use: cat file.kdl | kdlfmt format -
Use 'kdlfmt check PATH' instead of 'kdlfmt --check PATH'
Run 'npm install -g kdlfmt' or install via cargo/brew/precompiled binary.
No dependency data recorded yet.