Skip to content
Open dashboard (opens in a new tab)

CLI

Install the CLI

The NightVision CLI is one binary named nightvision. You need it to:

  • Scan an application on localhost, in a pipeline or on a private network.
  • Record a login for authenticated scans.
  • Build an API specification from source code with Source Intelligence.
  • Export results as SARIF, CSV, a GitLab report or Jira tickets.

Everything else also works from the dashboard at app.nightviz.ai.

Pick your operating system. Each block installs the latest release.

Homebrew works on both macOS and Linux. The direct downloads below it are for macOS.

Homebrew (Mac/Linux)
# Install:
brew install nvsecurity/taps/nightvision
# Upgrade to the latest version:
brew update && brew upgrade nightvision
Mac (Intel)
curl -L https://downloads.nightvision.net/binaries/latest/nightvision_latest_darwin_amd64.tar.gz | tar -xz; mv nightvision /usr/local/bin/
Mac (ARM)
curl -L https://downloads.nightvision.net/binaries/latest/nightvision_latest_darwin_arm64.tar.gz -q | tar -xz; mv nightvision /usr/local/bin/
Linux (Intel)
curl -L https://downloads.nightvision.net/binaries/latest/nightvision_latest_linux_amd64.tar.gz -q | tar -xz; sudo mv nightvision /usr/local/bin/
Linux (ARM)
curl -L https://downloads.nightvision.net/binaries/latest/nightvision_latest_linux_arm64.tar.gz -q | tar -xz; sudo mv nightvision /usr/local/bin/

On Windows Subsystem for Linux (WSL), install xdg-utils first. The login command uses it to open your browser.

Terminal window
sudo apt install xdg-utils
  1. Open the Start menu and search for PowerShell.
  2. Right-click Windows PowerShell and select Run as administrator.
  3. Paste the block for your processor.
Windows (Intel)
# Open a new Admin Powershell console
# Create the folder and add the new location into the PATH for the first time only
New-Item -ItemType Directory -Path "C:\Program Files\Nightvision\bin" -Force
$env:Path = "$env:Path;C:\Program Files\Nightvision\bin"
[Environment]::SetEnvironmentVariable("Path", $env:Path, "Machine")
# Run this block to install or update the app
Invoke-WebRequest -Uri https://downloads.nightvision.net/binaries/latest/nightvision_latest_windows_amd64.tar.gz -OutFile nightvision_latest_windows_amd64.tar.gz
tar xf .\nightvision_latest_windows_amd64.tar.gz -C "C:\Program Files\Nightvision\bin"
rm .\nightvision_latest_windows_amd64.tar.gz
Windows (ARM)
# Open a new Admin Powershell console
# Create the folder and add the new location into the PATH for the first time only
New-Item -ItemType Directory -Path "C:\Program Files\Nightvision\bin" -Force
$env:Path = "$env:Path;C:\Program Files\Nightvision\bin"
[Environment]::SetEnvironmentVariable("Path", $env:Path, "Machine")
# Run this block to install or update the app
Invoke-WebRequest -Uri https://downloads.nightvision.net/binaries/latest/nightvision_latest_windows_arm64.tar.gz -OutFile nightvision_latest_windows_arm64.tar.gz
tar xf .\nightvision_latest_windows_arm64.tar.gz -C "C:\Program Files\Nightvision\bin"
rm .\nightvision_latest_windows_arm64.tar.gz
Terminal window
nightvision version

The command prints the version, the commit and the build date.

Terminal window
nightvision login

The CLI opens your browser. Sign in the same way you sign in to the dashboard, and the CLI stores the session on your machine. To sign out, run nightvision logout.

The CLI listens for the sign-in on local port 14404, or on any free port when 14404 is busy. It waits 10 minutes before giving up. Change either with a flag:

Terminal window
nightvision login --port 15000 --timeout 3m

In a pipeline, or anywhere a browser cannot open, set an API token instead. The CLI reads NIGHTVISION_TOKEN from the environment, and the variable takes precedence over a stored sign-in.

Terminal window
export NIGHTVISION_TOKEN=<your token>
nightvision whoami

Create a token under Settings > Integrations > API tokens, or with nightvision token create. See API tokens.

Terminal window
nightvision whoami

whoami prints your email, your role in each organization and the permissions you hold on the current project. Run it first when a command is refused.

The CLI makes outbound connections only. If your network filters outbound traffic through a firewall, proxy or web filter, allow these hosts from the machine that runs the CLI:

Host Port Used for
api.nightviz.ai TCP 443 Every command. The CLI loads its settings from the API when it starts.
relay.app.nightvision.net UDP 443 and TCP 443 Scans of private applications. The CLI tries QUIC over UDP first and falls back to TCP.
downloads.nightvision.net TCP 443 Installing and updating the CLI.

The browser you sign in with also needs app.nightviz.ai.

The simplest rule is to allow *.nightviz.ai and *.nightvision.net.

When the API is blocked, every command stops at startup with error getting configurations from apiService. If the response in that error is an HTML page from your own network, such as an access-restricted notice, your web filter is blocking api.nightviz.ai.

The CLI tells you when a newer release is available. To update:

  • Homebrew: brew update && brew upgrade nightvision
  • Direct download: run the install block for your operating system again. It replaces the binary.

Update the CLI before you update the MCP server, which needs a recent CLI.

To run scans from Visual Studio Code, see IDE plugins.

Use these when you cannot pipe a download into a shell, for example to mirror the archive inside your network. Each archive holds the single nightvision binary.

For hosts with no internet access, see Air-gapped installs.

Add --help to any command to see its arguments and flags.

Terminal window
nightvision --help
nightvision scan --help
nightvision openapi extract --help

The command map lists every command by task. These guides walk through the common ones: