Registry / devops / cli-sql-formatter

cli-sql-formatter

JSON →
library1.3.4jsnpmunverified

A command-line interface for sql-formatter-plus, providing SQL formatting from terminals and shell scripts. Version 1.3.4 is current with stable release cadence. Supports multiple dialects: Standard SQL, Couchbase N1QL, IBM DB2, Oracle PL/SQL. Read input via pipe, file, or stdin; output to stdout or file. Indentation, uppercase, and line break options. Differentiates by being a dedicated CLI tool, not a library, with no Node.js programmatic API.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

This package is CLI-only and has no programmatic API; do not import via require/import.

cli-sql-formatter --help

Install globally for terminal usage; local install also works but requires npx.

npm install -g cli-sql-formatter @1.3.4

SQL must be passed via stdin pipe or -f file option, not as command argument.

echo 'SELECT 1' | cli-sql-formatter

Format SQL from a pipe with uppercase keywords and 2-space indentation.

echo "SELECT a, b, c FROM my_table WHERE x = 1" | cli-sql-formatter --dialect sql --indent 2 --uppercase
Debug
Known footguns
breakingVersion 1.0.0 switched from sql-formatter to sql-formatter-plus; some formatting options changed.
deprecatedCLI flag --tabs (plural) deprecated in favor of --tab (singular) since v1.2.0
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources