Skip to main content

Installation

We provide a couple of different ways to install Scrut. Choose whatever fits best for you:

Install via Script (Linux, Mac)​

Execute the following from your shell:

Terminal
$ curl --proto '=https' --tlsv1.2 -sSf https://facebookincubator.github.io/scrut/install.sh | sh

This will

  • Download and unpack the latest Scrut binary
  • Install the binary in your local path (either ~/bin or ~/.local/bin, whichever exists)

The following parameters are supported:

NameDescriptionDefault
--verbose, -vExplicitly log everything that is executed (set -x)-
--owner-repo, -rGithub owner and repository in format OWNER/REPOfacebookincubator/scrut
--installation-path, -pSet installation path$HOME/bin or $HOME/.local/bin

You can supply them by appending them like so:

Terminal
$ curl --proto '=https' --tlsv1.2 -LsSf https://facebookincubator.github.io/scrut/install.sh | sh -s -- -p /my/install/directory

Install via Pre-Build Binaries (Linux, Mac, Windows)​

Head over to https://github.com/facebookincubator/scrut/releases/latest and select the appropriate binary for your operating system.

Once downloaded and unpacked move the binary scrut (or scrut.exe on Windows) to a directory in your PATH.

Install via Cargo (Linux, Mac, Windows)​

You need to have a working Rust setup installed on your local machine. Then you can build and install the scrut binary as any other Rust binary:

$ cargo install scrut

This will install the scrut binary after building it in your local cargo binary folder (~/.cargo/bin on Linux and Mac, %USERPROFILE%\.cargo\bin on Windows).

If you want to install the binary manually then you need to check out the repository and then build it with:

$ cargo build --release --bin scrut

This will create target/release/scrut which you now can move to a directory in your PATH.

Install via Homebrew (Mac)​

Coming soon

Verify​

Now that you have downloaded the binary and stored it in your PATH verify that you can execute the following before proceeding:

Terminal
$ scrut --version
scrut v0.X.Y

(You will see the latest version here)

Shell Completions​

Scrut can generate shell completions for Bash, Zsh, Fish, PowerShell, and Elvish. Set the _SCRUT_COMPLETE environment variable to generate a completion script:

Bash
$ _SCRUT_COMPLETE=bash_source scrut > /usr/local/etc/bash_completion.d/scrut
Zsh
$ _SCRUT_COMPLETE=zsh_source scrut > /usr/local/share/zsh/site-functions/_scrut
Fish
$ _SCRUT_COMPLETE=fish_source scrut > /etc/fish/completions/scrut.fish
PowerShell
# Add to your PowerShell profile (run `echo $PROFILE` to find it)
$env:_SCRUT_COMPLETE = "powershell_source"; scrut | Out-String | Invoke-Expression
Elvish
# Add to ~/.config/elvish/rc.elv
eval (E:_SCRUT_COMPLETE=elvish_source scrut | slurp)

Valid values for _SCRUT_COMPLETE are: bash_source, elvish_source, fish_source, powershell_source, zsh_source.