Skip to content

Installation

macOS and Linux:

Terminal window
curl -fsSL https://sql-splitter.dev/install.sh | sh

Downloads the pre-built binary for your platform from the latest GitHub Release and installs it to $CARGO_HOME/bin (or $HOME/.cargo/bin). Override the location with SQL_SPLITTER_INSTALL_DIR.

Terminal window
git clone https://github.com/helgesverre/sql-splitter
cd sql-splitter
make install # Installs binary + shell completions + man pages

Or straight from the repository without cloning:

Terminal window
cargo install --git https://github.com/helgesverre/sql-splitter

For maximum performance, build with CPU-specific optimizations:

Terminal window
RUSTFLAGS="-C target-cpu=native" cargo build --release
Terminal window
sql-splitter --version

This should output sql-splitter followed by the version number.

Shell completions are automatically installed with make install. For manual installation:

Terminal window
# Bash (user)
sql-splitter completions bash >> ~/.bashrc
# Zsh (oh-my-zsh)
sql-splitter completions zsh > ~/.oh-my-zsh/completions/_sql-splitter
# Fish
sql-splitter completions fish > ~/.config/fish/completions/sql-splitter.fish

See the completions command for more options.

View documentation with man sql-splitter or man sql-splitter-diff.

For cargo install users, install man pages manually:

Terminal window
git clone https://github.com/helgesverre/sql-splitter
cd sql-splitter
make install-man

sql-splitter is also published as a crate. See Library Usage for the API.