MJmjibson·Sep 27, 2018
It's available as part of the cockroach binary (https://www.cockroachlabs.com/docs/releases/v2.1.0-beta.2018...) as a subcommand. And an external contributor has made a more standalone version at https://github.com/lopezator/sqlfmt.
In Sqlfmt: an opinionated online SQL formatter