gritHEAD → docs/install
Getting started / Install gritMarkdown

Install grit

Install the grit CLI on your machine, try nightly builds, and keep your copy up to date.

01

The script downloads the latest release from GitHub, installs the grit binary (by default into ~/.local/bin on Unix), and prints the version it installed.

On macOS and Linux
$ curl -fsSL https://grit-scm.com/install | sh
On Windows, run this in PowerShell
$ irm https://grit-scm.com/install.ps1 | iex
02

Shell completions

Tab completion helps you discover grit's subcommands and flags. Generate a script with grit completions and load it from your shell config, or copy the pre-generated files from a release tarball's completions/ directory.

After grit update, regenerate completions so new commands appear.

bash — add to ~/.bashrc
$ eval "$(grit completions bash)"
zsh — add to ~/.zshrc
$ eval "$(grit completions zsh)"
Or install once under a site-functions directory
$ grit completions zsh > ~/.local/share/zsh/site-functions/_grit
fish — write a completion file
$ mkdir -p ~/.config/fish/completions
$ grit completions fish > ~/.config/fish/completions/grit.fish
03

Nightly builds

CI publishes a rolling nightly prerelease when the release workflow is triggered manually. To install that build instead of the latest stable release:

Nightlies track recent main; use them when you want to test fixes before the next tagged release.

$ curl -fsSL https://grit-scm.com/install-nightly | sh
On Windows
$ irm https://grit-scm.com/install-nightly.ps1 | iex
04

Install with Cargo

This builds and installs the grit executable into Cargo's bin directory (usually ~/.cargo/bin). Make sure that directory is on your PATH.

If you already have a Rust toolchain
$ cargo install grit-cli
05

Keep grit up to date

After a script install, run grit update to re-run the same installer and replace the binary you're running. If you installed with Cargo, update with:

$ cargo install grit-cli
06

Build from source

The binary is target/release/grit. You can copy it anywhere on your PATH, or run it from the build tree.

Toolchain

The workspace pins a Rust version in rust-toolchain.toml (currently 1.99.0 with rustfmt and clippy). rustup picks this up automatically when you build in the repo.

To use grit-lib in your own crate, add it from crates.io — see the library quick start.

Clone the repository and build the CLI crate
$ cargo build --release -p grit-cli