---
title: "Install and update the CLI"
---

# Install and update the CLI

Install the CLI with npm, as a standalone binary or as a container image, check the installation, and keep it up to date.

The CLI is installed on its own, separately from the Editor and the Agents app. Two commands are installed: `neuralinverse` and its short alias `ni`. Neural Inverse is available by request: when your organisation has access, your administrator gives you the installers, the package registry and any internal mirror to use.

## Choose a method

| Method | Needs | Updates with |
|---|---|---|
| npm package `@neuralinverse/cli`, from the registry your administrator gives you | Node.js 22.19 or newer | `/update`, or npm |
| Standalone binary | Nothing else | `/update`, or the install script again |
| Container image `ghcr.io/neuralinverse/neuralinverse-cli` | Docker or another container runtime | A new image tag |

## Install with npm

```bash
npm install -g @neuralinverse/cli
```

The package declares `"engines": { "node": ">=22.19" }`. `neuralinverse doctor` reports an older Node.js as a failure.

## Install the standalone binary

The binary needs no Node.js. The install script downloads the binary for your platform from the release, verifies it against the release's `SHA256SUMS` file, and refuses to install when the checksum is missing or does not match.

| Platform | Architectures | Asset |
|---|---|---|
| macOS | x64, arm64 | `neuralinverse-darwin-<arch>` |
| Linux | x64, arm64 | `neuralinverse-linux-<arch>` |
| Linux with musl | x64 only | `neuralinverse-linux-x64-musl` |
| Windows | x64 | `neuralinverse-windows-x64.exe` |

On Apple silicon, the script installs the native arm64 build even from an x64 shell running under Rosetta 2. On musl-based Linux other than x64, install with npm instead.

macOS and Linux:

```bash
curl -fsSL <installer-url>/install.sh | sh
curl -fsSL <installer-url>/install.sh | sh -s -- --version <version>
```

Windows (PowerShell):

```powershell
irm <installer-url>/install.ps1 | iex
```

Replace `<installer-url>` with the address your administrator gives you, and `<version>` with a release.

### Installer options

| Option (shell) | Option (PowerShell) | Environment variable | Meaning |
|---|---|---|---|
| `--version <X>` | `-Version` | `NI_VERSION` | Install release X instead of the latest |
| `--dir <path>` | `-InstallDir` | `NI_INSTALL_DIR` | Install directory. Default `~/.neuralinverse/bin`, or `%USERPROFILE%\.neuralinverse\bin` on Windows |
| `--no-modify-path` | | | Accepted for compatibility; the shell script never edits shell profiles |
| | `-AddToPath` | | Also add the install directory to the user `PATH` (HKCU). Without it, the script prints guidance |
| | | `NI_DOWNLOAD_BASE` | Download from a mirror instead of GitHub Releases |
| | | `GITHUB_TOKEN` | Optional token for the GitHub API lookup of the latest release |

Add the install directory to your `PATH` yourself on macOS and Linux. The script creates `ni` next to `neuralinverse`.

### Install from an internal mirror

Without access to GitHub, host the release assets and `SHA256SUMS` on an internal server and set `NI_DOWNLOAD_BASE`. The script then fetches `$NI_DOWNLOAD_BASE/cli-v<version>/<asset>` and `$NI_DOWNLOAD_BASE/cli-v<version>/SHA256SUMS`. The comment at the top of the script describes the path as `v<ver>`; the code uses the release tag, `cli-v<version>`.

### The checks engine in standalone binaries

The [checks](https://neuralinverse.com/docs/cli/checks/) engine needs its tree-sitter WASM files. Release binaries embed them. If you run a binary without them, put them in a `tree-sitter-wasm/` folder next to the executable or point `NEURALINVERSE_TREE_SITTER_WASM` at them; otherwise the engine reports an error in its coverage.

## Run the container image

The image is published as `ghcr.io/neuralinverse/neuralinverse-cli:<version>` and `:latest`. It contains git, ripgrep, bubblewrap for the shell sandbox, and tini so that Ctrl+C and `docker stop` interrupt the agent cleanly. Mount your project at `/workspace` and pass the provider key:

```bash
docker run --rm -it -e ANTHROPIC_API_KEY -v "$PWD:/workspace" ghcr.io/neuralinverse/neuralinverse-cli
docker run --rm -e OPENAI_API_KEY -v "$PWD:/workspace" ghcr.io/neuralinverse/neuralinverse-cli -p "explain this repo" --mode read-only
```

The sandbox inside the container needs user namespaces; on some hosts that means `--security-opt seccomp=unconfined`.

## Check the installation

```bash
neuralinverse doctor
neuralinverse --version
```

`doctor` (also `/doctor` in a session) reports:

| Group | Checks |
|---|---|
| System | Node.js version (22.19 or newer needed), platform, CLI version, terminal (size, colours, Unicode, links) |
| Config | Config directory, settings source, model, permission mode |
| Tools | git, ripgrep, the shell sandbox |
| MCP | Configured servers |
| Network | Proxy settings, with credentials hidden |
| Keystone | Sign-in state, when you use Govern |

## Update

Inside a session, `/update` checks for a newer version and installs it after you confirm:

- **npm install:** it runs `npm install -g @neuralinverse/cli@<version>`.
- **Standalone binary** in `~/.neuralinverse/bin` (or `NI_INSTALL_DIR`): it downloads the release asset for your platform, verifies it against `SHA256SUMS`, checks that it runs, keeps the old binary as `<name>.bak` and swaps the new one in. On macOS the new binary is signed ad hoc so that Gatekeeper does not stop it.
- **Anything else:** it explains how to update by hand, for example by running the install script again.

`NI_UPDATE_REGISTRY` and `NI_UPDATE_RELEASES` override the npm registry and the release download address, for mirrors.

### The daily version check

Besides your model providers, MCP servers and the services you configure, the CLI makes one request of its own: a daily check of the npm registry for a newer version. Set `NEURALINVERSE_DISABLE_UPDATE_CHECK=1` to turn it off. It is also off when `CI` is set.

## Next steps

- [Sign in to Govern](https://neuralinverse.com/docs/cli/sign-in/), if your organisation uses it.
- [Set up a model provider](https://neuralinverse.com/docs/cli/models/).
- [Start your first session](https://neuralinverse.com/docs/cli/interface/).
