Reesql is part of the Reepolee toolchain and under active development. Formatting output may change between releases.
Reedable SQL,
automatically.
Reesql is a fast MySQL formatter written in Rust. Pipe SQL in on stdin or pass a file, and it returns consistently formatted SQL - uppercased keywords, aligned column definitions, indented subqueries, and preserved comments.
Statement-aware
Dedicated formatters for SELECT, CREATE TABLE, CREATE VIEW, INSERT, UPDATE and DELETE, with recursive subquery indentation.
Native speed
A single Rust binary with prebuilt releases for macOS, Linux and Windows. Reads stdin or files, writes to stdout or in place.
Comment-safe
Line, block and hash comments are preserved and repositioned, and line endings are normalised across platforms.
Quick start
Install the binary, then format a file in place or pipe SQL through it.
cat query.sql | reesql
Head to Installation to get the binary on your PATH, then browse the formatting examples to see it in action.
Explore the ecosystem
Reepolee is a small family of tools that work together. Explore the others - each has its own documentation.