{"library":"shandy-sqlfmt","title":"sqlfmt","description":"sqlfmt is an opinionated Python-based command-line tool that automatically formats your dbt SQL files and other SQL statements. Similar to `black` for Python, it enforces a consistent style with minimal configuration, primarily line length. It is currently at version 0.29.0 and maintains an active release cadence with frequent updates.","language":"python","status":"active","last_verified":"Sat Apr 11","install":{"commands":["pip install shandy-sqlfmt"],"cli":{"name":"sqlfmt","version":"sqlfmt, version 0.30.0"}},"imports":[],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# To format all .sql and .sql.jinja files in the current directory and subdirectories:\nsqlfmt .\n\n# To see a diff of changes sqlfmt would make (without modifying files):\nsqlfmt --diff .\n\n# To format SQL from stdin and print to stdout:\necho \"select 1,2,3 from my_table where a=1\" | sqlfmt -","lang":"bash","description":"sqlfmt is primarily a command-line tool. The most common usage is to format files in a directory. It will exit with a non-zero code if files are not formatted when using `--check` or `--diff`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}