#config-file #yaml #toml #markdown #sql #json #formatting

app metafmt

A CLI for formatting configuration files

5 releases

0.1.6 Jun 14, 2023
0.1.4 Jun 8, 2023
0.1.2 Jun 8, 2023
0.1.1 Jun 8, 2023
0.1.0 Jun 4, 2023

#2965 in Parser implementations

34 downloads per month

MIT license

630 lines


metafmt is a highly performant and opinionated formatter for the following configuration and text formats:

  • json (.json, .jsonc, .hjson, .jwcc)
  • markdown (.md)
  • sql (.sql)
  • toml (.toml)
  • yaml (.yaml, .yml)

Install from source


  • Go >= 1.20
  • Rust >= 1.70
cargo install metafmt --locked --force


> metafmt -h

A CLI for formatting configuration files

Usage: metafmt [OPTIONS] [PATH]

  [PATH]  A file or directory to format [default: ./]

  -d, --diff                 Show a diff for each non-formatted file
  -g, --glob <GLOB>          Include or exclude files to format
  -., --hidden               Include hidden files and directories
  -l, --list-all             List all files processed, including formatted ones
      --no-ignore            Disable all ignore-related filtering
  -p, --parallel <PARALLEL>  The approximate number of threads to use
  -q, --quiet                Do not print info to stderr
  -w, --write                Rewrite files in-place
  -h, --help                 Print help
  -V, --version              Print version


~460K SLoC