CLI reference
banshee format [--write|--check] [files…|-]banshee lint [--format human|json|github|sarif] [--statistics] [--breaking] [files…|-]banshee fix [--diff] [--unsafe-fixes] [files…|-]banshee parse [--format tree|json] [files…|-]banshee complete --offset BYTE [--limit N] [file|-]banshee rules [--format human|json] [--group <category|prefix>]banshee explain <CODE>banshee initbanshee lspInputs are files, directories (walked for *.sql), or stdin (-).
Global flags
Section titled “Global flags”--config <FILE>— use thisbanshee.tomlinstead of discovery.--no-color— disable colored output (also honored viaNO_COLOR).
Commands
Section titled “Commands”format— print formatted SQL from one input. Use--writeto rewrite files in place or--checkto check files without writing.--checkexits1if a file needs formatting. A formatting error exits2before any SQL is printed or files are rewritten.--stdin-filename PATHsupplies the path for configuration discovery and diagnostics when reading stdin.lint— report findings.--formatselectshuman/json/github(PR annotations) /sarif(code scanning);--statisticsprints a per-rule count breakdown.--breakingruns the full pack but fails only on backward-incompatible changes (raised to errors); other findings stay advisory — the migration gate in one run; see backward-compatible migrations.fix— apply capitalization fixes.--unsafe-fixesincludes rewrites that can change behavior, and--diffpreviews the selected fixes.parse— print the concrete syntax tree (--format tree|json).complete— print suggestions at a UTF-8 byte offset.--limitoverrides the configured maximum and accepts0for an unlimited list.rules— list lint rules;--groupfilters by category or prefix.explain <CODE>— print a rule’s rationale and a before/after example.init— scaffold abanshee.toml.lsp— run the language server over stdio.
Exit codes
Section titled “Exit codes”0 clean · 1 findings or unformatted input · 2 error.