navi/docs/installation/README.md
alexis-opolka 205fc755d5 Fixes typos
Signed-off-by: alexis-opolka <53085471+alexis-opolka@users.noreply.github.com>
2025-03-29 23:09:38 +01:00

3.7 KiB

Installation of navi

This is a reference of all known methods to install navi.

Caution

Navi, as of now, has only two official builds, the released binaries on GitHub and the published package on brew.

All the other packages are community-maintained.

Using package managers

Homebrew

brew install navi

Note

See brew.sh for more details.

Using Gentoo

Warning

You need to enable the GURU overlay for the instructions below to work correctly.

For more details see:

emerge -a app-misc/navi

Note

See Gentoo.org for more details.

Using Pacman

pacman -S navi

Note

See wiki.archlinux.org/title/Pacman for more details.

Using nix

nix-env -iA nixpkgs.navi

Note

See nixos.org for more details

Using Cargo

cargo install --locked navi

Note

See @rust-lang/cargo for more details.

Using Chocolatey

choco install navi

Caution

You currently need to create the config file $env:USERPROFILE\AppData\Roaming\navi\config.yaml and define the shell.command directive as powershell for navi to work correctly.

shell:
  command: powershell

Note

See community.chocolatey.org for more details.

Using the installation script

Navi has an installation script ready for you to use, you can call it like this:

bash <(curl -sL https://raw.githubusercontent.com/denisidoro/navi/master/scripts/install)

If you need to define the directory for the binary, you can call it like this:

BIN_DIR=/usr/local/bin bash <(curl -sL https://raw.githubusercontent.com/denisidoro/navi/master/scripts/install)

Downloading pre-compiled binaries

With each release, we try our best to build and publish a binary for each supported platform, you can find them here: @denisidoro/navi/releases/latest

What you need to do is:

  • to download the binary corresponding to the version you want to install
  • to extract the content of the archive to your $PATH

Building from source

You can also build navi from source, it's mainly used by contributors to test their modifications but can be used by end users who want to build their own version.

  • You need to clone the repository:

    git clone https://github.com/denisidoro/navi && cd navi
    
  • Call make

    make install
    

You can specify the binary directory with:

make BIN_DIR=/usr/local/bin install

Compile time environment variables

navi supports environment variables at compile time that will modify the behavior of navi at runtime, they are:

Environment variable Description
NAVI_PATH This defines the default path used by navi for cheatsheets.
NAVI_CONFIG This defines the default configuration file used by navi.

Other package managers

You can find navi for more package managers by clicking on the image below:

Packaging status

Feel free to be the maintainer of navi for any package manager you'd like!