I am looking for a command line SQL formatter = SQL prettifier = SQL beautifier (offline, not an online formatter) for Mac. The goal is to run it on the command line and also inside the editor (Emacs) for SQL files under a few thousand lines.
Related:
Most of the posts below do not answer my question because of one or more of the following reasons: they were closed before they could accumulate enough quality answers; they are old; they refer mostly to online tools; they are related to other languages/operating systems:
- What Free SQL Formatting Tools exist? - Stack Overflow (2010)
- plsql - Good free offline PL/SQL formatter - Stack Overflow (2009)
- sql server - Tidy for SQL - Stack Overflow (2009)
- linux - SQL string formatter - Stack Overflow (2008)
- python - How to pretty format the printing of SQL Queries in SQLAlchemy? - Stack Overflow (2017) (python-related)
- postgresql - SQL Query Formatter - Database Administrators Stack Exchange (2012)
- database - Linux CLI tool for auto-formatting (pretty printing) large SQL files - Software Recommendations Stack Exchange (2022) (for Linux, while my question is for Mac)