A formatter for your kdl files
Published on: 2025-07-12 14:25:22
kdlfmt
A formatter for kdl documents.
kdlfmt is a thin cli wrapper built on-top of the official kdl parser for Rust ( kdl-rs ), so any formatting/parsing issues should be reported there.
kdlfmt 0.0.16 A code formatter for kdl documents. Mads Hougesen Usage: kdlfmt Commands: format Format kdl files check Validate files are formatted init Initialize formatter config completions Generate shell completions help Print this message or the help of the given subcommand(s) Options: -h, --help Print help -V, --version Print version
Installation
Using Cargo
kdlfmt can be installed using Cargo, the package manager for Rust (crates.io).
cargo install kdlfmt
Using Homebrew
If you're on macOS or Linux, you can install kdlfmt using Homebrew:
# Tap and install brew tap hougesen/tap brew install kdlfmt # Or install directly in one command brew install hougesen/tap/kdlfmt
Using npm/npx
You can install kdlfmt using npm:
npm install -g kdlfmt kdlfmt format .
Or run
... Read full article.