visualize

A command that turns a NervaPack knowledge graph into a self-contained interactive HTML file that can be opened and shared without a server.

In plain words
What is it for?
Use it to render the full graph or a scoped neighborhood, with optional search, shortest-path finding, and community colouring.
Why use it?
It makes relationships between files, names, and other graph items easier to explore visually instead of reading the graph data directly.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ramdhavepreetam/nervapack/visualize
Clone the repo
git clone --depth 1 https://github.com/ramdhavepreetam/NervaPack
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,238 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01238
Opus 5 $0.00000 $0.00619
Sonnet 5 $0.00000 $0.00248
Haiku 4.5 $0.00000 $0.00124

Measured 2d ago against content hash 7707b4cb5fdf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

visualize scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/user-guide/commands/visualize.md · 166 lines

How it starts

The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.

nervapack visualize

Render the knowledge graph as an interactive, standalone HTML file.


Synopsis

nervapack visualize [OPTIONS]

Description

visualize reads the graph from .nervapack/graph.graphml and generates a self-contained HTML file with no external dependencies — drag, zoom, search, and share it without any server.

Two rendering modes are available:

  • Basic (default) — spring-force physics layout, hover tooltips, node colours by type.
  • Enhanced (--enhanced, --communities) — adds real-time search, shortest-path finder, and Louvain community detection.

Options

Option Default Description
--output PATH .nervapack/graph.html Where to save the HTML file
--scope TARGET (none) Only render the neighborhood around a file/name/node (e.g. a program name). Physics stays on for these small, readable views.
--hops N 2 Neighborhood depth when --scope is given — follows both callers and callees
--enhanced off Enable real-time search + path finder
--communities off Enable Louvain community detection + colour coding
--no-browser off Generate without auto-opening the browser

Scoping large estates

For a big graph (thousands of nodes), rendering the whole thing is rarely readable — --scope is the way to navigate it. It extracts the N-hop neighborhood around the matched node(s), following both directions so you see what a program calls and who calls it:

# PAYROLL, its callers, and its callees (2 hops)
nervapack visualize --scope PAYROLL --hops 2

# Just the immediate neighbors of a copybook
nervapack visualize --scope EMPREC --hops 1

Scoped output defaults to .nervapack/scope_<TARGET>.html so it never clobbers the full-graph file. Because scoped views are small, physics stays enabled for a proper interactive layout.


Examples

# Basic visualization
nervapack visualize

# Enhanced — search + path finder
nervapack visualize --enhanced

# Enhanced + community detection (recommended)
nervapack visualize --enhanced --communities

# Custom output path
nervapack visualize --enhanced --output ~/graphs/myproject.html

# Generate without opening browser (server/CI)
nervapack visualize --no-browser

Read the full file on GitHub · 166 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 166 lines · 0 tokens per session scan A 7707b4cb5fdf

Subscribe to this mod's changes

visualize is a command published in the GitHub repository ramdhavepreetam/NervaPack (1 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,238 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.