diff --git a/README.md b/README.md index a1995f4c3..5ce418d42 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,15 @@ Open the [playground](https://playground.quary.dev) to try out the linter and fo ### Installation +#### Cargo + +You can install the tool locally with `cargo`. + +```bash +cargo install sqruff #compiles locally +cargo binstall sqruff #downloads prebuilt binary +``` + #### macOS You can use [brew](https://brew.sh/) to install sqruff easily on macOS. diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 15243adaf..efc7e1da3 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -8,6 +8,11 @@ license.workspace = true default-run = "sqruff" rust-version = "1.81.0" +[package.metadata.binstall] +pkg-url = "{ repo }/releases/download/v{ version }/sqruff-{ target }{ archive-suffix }" +pkg-fmt = "tgz" +bin-dir = "sqruff{ binary-ext }" + [lints] workspace = true diff --git a/editors/code/README.md b/editors/code/README.md index a1995f4c3..5ce418d42 100644 --- a/editors/code/README.md +++ b/editors/code/README.md @@ -48,6 +48,15 @@ Open the [playground](https://playground.quary.dev) to try out the linter and fo ### Installation +#### Cargo + +You can install the tool locally with `cargo`. + +```bash +cargo install sqruff #compiles locally +cargo binstall sqruff #downloads prebuilt binary +``` + #### macOS You can use [brew](https://brew.sh/) to install sqruff easily on macOS.