Parallel formatter for multiple languages: Deno (JS/TS/JSON/MD/CSS/HTML/YAML/etc), PostgreSQL, Go, Nix, Rust, and others.
- Multi-language support: Formats JavaScript, TypeScript, JSON, Markdown, CSS, HTML, YAML, Nix, Go, SQL, and Rust files
- Parallel execution: Runs all formatters simultaneously for faster formatting
- Check mode: Verify formatting without modifying files (useful for CI/CD)
- Respects .gitignore: Automatically skips files ignored by git
- Nix packaging: Reproducible builds with all dependencies included
With Nix and flakes enabled:
nix run github:BridgerB/fmtOr clone and run with Deno:
git clone https://github.com/BridgerB/fmt.git
cd fmt
deno run --allow-run --allow-read --allow-env main.tsnix run github:BridgerB/fmt
# or locally:
deno run --allow-run --allow-read --allow-env main.tsnix run github:BridgerB/fmt -- --check
# or locally:
deno run --allow-run --allow-read --allow-env main.ts --checknix run github:BridgerB/fmt -- --help- JavaScript, TypeScript, JSON, Markdown, CSS, HTML, YAML, etc.: via
deno fmt - Nix: via
alejandra - Go: via
goimports/gofmt - SQL: via
pg_format - Rust: via
rustfmt/cargo fmt
fmt automatically respects your .gitignore file. Any files or directories
ignored by git will be skipped during formatting.
The .gitignore is searched for starting from the current directory and walking
up the directory tree.
The flake provides several useful apps:
nix run- Format files in the current directorynix run .#check- Check formatting without modifying filesnix run .#type-check- Check TypeScript types without running
Enter the development shell with all dependencies:
nix developThis provides access to all formatters (deno, alejandra, go, gotools, pgformatter) and git.