pg-formatter
JSON →A PostgreSQL SQL syntax beautifier that is a thin Node.js wrapper around the Perl-based pgFormatter (https://github.com/darold/pgFormatter). Version 2.0.8 is current stable; released via npm, maintained by Gajus Kuizinas. Requires Perl on the host system. Ships TypeScript type definitions. Supports customizable formatting options like keyword/function case, indentation spaces/tabs, comma breaking, anonymization, placeholder regex, and comment stripping. Provides both programmatic API and CLI tool. Key differentiators: leverages the mature pgFormatter Perl engine, supports all PostgreSQL-specific syntax, configurable via options map matching pgFormatter flags.
Resources
packagepg-formatter ↗