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.
Install the CLI
Section titled “Install the CLI”Pick your operating system. Each block installs the latest release.
Mac/Linux
Section titled “Mac/Linux”Homebrew works on both macOS and Linux. The direct downloads below it are for macOS.
# Install:brew install nvsecurity/taps/nightvision
# Upgrade to the latest version:brew update && brew upgrade nightvisioncurl -L https://downloads.nightvision.net/binaries/latest/nightvision_latest_darwin_amd64.tar.gz | tar -xz; mv nightvision /usr/local/bin/curl -L https://downloads.nightvision.net/binaries/latest/nightvision_latest_darwin_arm64.tar.gz -q | tar -xz; mv nightvision /usr/local/bin/curl -L https://downloads.nightvision.net/binaries/latest/nightvision_latest_linux_amd64.tar.gz -q | tar -xz; sudo mv nightvision /usr/local/bin/curl -L https://downloads.nightvision.net/binaries/latest/nightvision_latest_linux_arm64.tar.gz -q | tar -xz; sudo mv nightvision /usr/local/bin/Windows Subsystem for Linux
Section titled “Windows Subsystem for Linux”On Windows Subsystem for Linux (WSL), install xdg-utils first. The login command uses it to open your browser.
sudo apt install xdg-utilsWindows (PowerShell)
Section titled “Windows (PowerShell)”- Open the Start menu and search for PowerShell.
- Right-click Windows PowerShell and select Run as administrator.
- Paste the block for your processor.
# Open a new Admin Powershell console
# Create the folder and add the new location into the PATH for the first time onlyNew-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 appInvoke-WebRequest -Uri https://downloads.nightvision.net/binaries/latest/nightvision_latest_windows_amd64.tar.gz -OutFile nightvision_latest_windows_amd64.tar.gztar xf .\nightvision_latest_windows_amd64.tar.gz -C "C:\Program Files\Nightvision\bin"rm .\nightvision_latest_windows_amd64.tar.gz# Open a new Admin Powershell console
# Create the folder and add the new location into the PATH for the first time onlyNew-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 appInvoke-WebRequest -Uri https://downloads.nightvision.net/binaries/latest/nightvision_latest_windows_arm64.tar.gz -OutFile nightvision_latest_windows_arm64.tar.gztar xf .\nightvision_latest_windows_arm64.tar.gz -C "C:\Program Files\Nightvision\bin"rm .\nightvision_latest_windows_arm64.tar.gzCheck the install
Section titled “Check the install”nightvision versionThe command prints the version, the commit and the build date.
Sign in
Section titled “Sign in”From a browser
Section titled “From a browser”nightvision loginThe 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:
nightvision login --port 15000 --timeout 3mWith an API token
Section titled “With an API token”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.
export NIGHTVISION_TOKEN=<your token>nightvision whoamiCreate a token under Settings > Integrations > API tokens, or with nightvision token create. See API tokens.
Check who you are
Section titled “Check who you are”nightvision whoamiwhoami 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.
Network access
Section titled “Network access”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.
Update the CLI
Section titled “Update the CLI”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.
Download links
Section titled “Download links”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.
CLI usage
Section titled “CLI usage”Add --help to any command to see its arguments and flags.
nightvision --helpnightvision scan --helpnightvision openapi extract --helpThe command map lists every command by task. These guides walk through the common ones: