Cargo (Rust)#
cargo install scythe-cliOr use cargo-binstall to download a prebuilt binary without compiling:
cargo binstall scythe-clinpm (Node.js)#
npm install --save-dev scythe-cliA postinstall step downloads and verifies the correct binary for your platform automatically. Supported platforms: Linux (x64/arm64, glibc only), macOS (x64/arm64), and Windows (x64, with x64 emulation on ARM64).
pip (Python)#
pip install scythe-sqlThe binary downloads on first use and is cached for subsequent invocations. In Docker, warm the cache during the build step so the first real invocation isn't the one paying the download cost:
RUN pip install scythe-sql && scythe --versionHomebrew (macOS/Linux)#
brew install Goldziher/tap/scytheInstalls a prebuilt binary — no Rust toolchain required.
From Source#
git clone https://github.com/Goldziher/scythe
cd scythe
cargo install --path crates/scythe-cliPre-commit Integration#
Add scythe to .pre-commit-config.yaml to lint and format SQL on every commit:
- repo: https://github.com/Goldziher/scythe
rev: v0.15.0
hooks:
- id: scythe-fmt
- id: scythe-lintVerify the Install#
scythe --versionNext Steps#
- Follow the Quickstart to generate your first typed code.
- Already using sqlc? Migrate your project automatically.