Product

NSG CLI

Visualize private projects locally. Scan projects, generate .nsg.json, preview graphs locally, and create visual diffs without uploading source code.

Installation

Terminal
npm install -g @nsg/cli

Commands

Scan a project
nsg scan ./my-project --out project.nsg.json
Start local viewer
nsg serve project.nsg.json
Generate diff
nsg diff ./before ./after --out diff.nsg.json
Local-only mode
nsg scan ./project --privacy local_only

Why CLI Matters

Some projects should never leave your machine. NSG CLI gives developers and teams a local-first path to generate graph files and explore private systems safely.

Local repo scanning
ZIP/project folder scanning
.nsg.json export
Local viewer
Diff generation
Ignore rules
Preset overrides
Sanitized graph output

Configuration

.nsgrc.json
{
  "ignore": ["legacy/**", "generated/**"],
  "preset": "dag_runtime_stack",
  "entry": "lib/dag/index.ts",
  "theme": "quantum",
  "maxNodesPerLayer": 180
}

Get started locally

Install the CLI and start visualizing your private projects.

View CLI Docs