Install
WithNav has two parts: the nav binary and the VS Code extension. Most people want the
extension, which can bring its own nav.
Requirements
- Linux x64 or arm64, or native Windows x64. On macOS, build from source and use the universal VSIX.
- VS Code 1.91 or later, if you use the extension.
- The extension is not on the VS Code Marketplace yet. Install it from a file.
VS Code extension
Download a package from the GitHub Releases page and install it:
code --install-extension withnav-linux-x64-<version>.vsix
Pick the package that matches your machine:
| File | Use it when | nav |
|---|---|---|
withnav-linux-x64-<version>.vsix | Linux on x64 | Bundled (static binary). Nothing else to install. |
withnav-linux-arm64-<version>.vsix | Linux on arm64 | Bundled (static binary). Nothing else to install. |
withnav-win32-x64-<version>.vsix | Native Windows x64 | Bundled nav.exe; no global nav needed. |
withnav-<version>.vsix (universal) | macOS, Nix, development | Not included. Put nav on your PATH, or set withnav.serverPath. |
A path you set in withnav.serverPath always wins over the bundled binary. Set it to the
absolute path of nav. Do not add lsp to it; the extension adds that itself.
To check which binary the extension runs, open the WithNav output channel. Its first line is
Using nav binary (...): setting, bundled or path.
nav without the extension
Each release also publishes Linux nav binaries as tarballs, a Windows x64 ZIP, and a
SHA256SUMS file for all release files. Unpack the archive and put nav (or nav.exe) on your
PATH, for example in ~/.local/bin/ on Linux.
Nix
The flake at the repository root builds both parts:
nix build .#withnav .#vscode-withnav
In a system flake, add this repository as an input and apply overlays.default. It provides:
pkgs.withnav: thenavcommand.pkgs.vscode-withnav: the extension, for Home Manager’sprograms.vscode.profiles.<name>.extensions.
From source
You need Rust 1.89 or later, and Node.js 18 or later for the extension.
cargo build --release --bins
install -m755 target/release/nav ~/.local/bin/
(cd vscode-withnav && npm ci && npm run package)
code --install-extension vscode-withnav/withnav-*.vsix
npm run package makes a universal package. It needs nav on your PATH or
withnav.serverPath. To build the release packages with a bundled binary, see
the extension page.
Check it works
nav --version
Then follow the Quick start.
Native Windows x64
The release pipeline builds x86_64-pc-windows-msvc, without a WSL or MSYS runtime dependency
for nav.exe itself. The CLI archive is nav-<version>-x86_64-pc-windows-msvc.zip, containing
nav.exe and the MIT/Apache license files. Extract it into a user-owned tools directory and add
that directory to PATH, or configure withnav.serverPath with its absolute path. In JSON, for
example: "withnav.serverPath": "C:\\My Tools\\WithNav\\nav.exe". Do not add shell quotes around
the path, even when it contains spaces: the extension starts the LSP directly, without a shell.
Explicit settings still take precedence over the bundled executable, then PATH.
Install the Microsoft Visual C++ v14 x64 Redistributable if the executable reports missing MSVC runtime DLLs on a clean machine. Redistributables are not bundled.
The bash tool runs Git Bash from Git for Windows. WithNav finds it
through the Git for Windows registry entry, then %ProgramFiles%\Git, then PATH; it never uses
the WSL bash.exe launcher, and PowerShell or cmd are not substitutes. Without Git for Windows,
the other tools, the clients and the LSP still work; nav doctor shows which bash.exe was found.
Bash calls follow the same permission rules as on Linux and macOS, and commands use Git Bash
spellings such as /c/Users/.... Child processes run in a Windows job object, so cancelling a call
also stops what it started.
Settings, auth.json, the permission database and session data live in your profile:
configuration under %APPDATA%\withnav\config, data under %APPDATA%\withnav\data. auth.json
is created with an access list limited to your account, SYSTEM and Administrators; API keys in
environment variables work as on other platforms. Paths are shown in their usual form
(C:\Users\...); network shares (\\server\share), alternate data streams and device names are
refused by the file tools.
Build on Windows with the MSVC Rust toolchain and Visual Studio C++ build tools. The existing packaging script can run under Git Bash with a prebuilt binary:
cargo build --release --locked --bin nav --target x86_64-pc-windows-msvc
NAV_BINARY="$PWD/target/x86_64-pc-windows-msvc/release/nav.exe" scripts/package-vsix.sh win32-x64
On Linux, cargo-xwin can check the MSVC code and native dependencies when its SDK/CRT and C toolchain are installed:
cargo xwin check --workspace --all-targets --locked --target x86_64-pc-windows-msvc
cargo xwin clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings
Cross-checking is not runtime validation: the test suite also runs natively on Windows in CI. Windows ARM64, MSI/winget packages, signing and a native PowerShell tool are not provided yet.