npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nemo-cli/deps

v0.1.2

Published

Dependency analysis CLI for Next.js App Router projects

Readme

@nemo-cli/deps

Dependency analysis CLI for Next.js App Router projects

Install

$ pnpm add @nemo-cli/deps --global

Usage

# Analyze a Next.js project
nd analyze <path>

# Analyze src folder (still writes ai-docs under project root)
nd analyze ./src

# Query page component tree
nd page <route>

# Output as Graphviz DOT
nd analyze <path> --format dot --output deps.dot

# Output as JSON
nd analyze <path> --format json

# Output AI-friendly JSON (page map + node map)
nd analyze <path> --format ai --output ./ai-docs/deps.ai.json

# Run AI analysis with progress UI and per-component files
nd ai --input ./ai-docs/deps.ai.json

# Analyze specific route
nd analyze <path> --route /dashboard

# Show only leaf nodes
nd analyze <path> --leaves

# Show only orphan nodes
nd analyze <path> --orphans

# Highlight cycles in output
nd analyze <path> --cycles

# Limit analysis depth
nd analyze <path> --max-depth 3

# Follow external dependencies
nd analyze <path> --external

# Verbose output
nd analyze <path> --verbose

Features

  • Next.js App Router Support: Automatically detects and analyzes Next.js App Router routes
  • Multiple Output Formats: Tree (default), JSON, Graphviz DOT
  • AI Output: Page map + node map + cycle groups (tree output stays in --format tree)
  • AI Analysis Runner: Interactive route selector + progress view + per-component outputs
  • Cycle Detection: Identifies circular dependencies
  • Leaf/Orphan Detection: Finds unused or terminal dependencies
  • Configurable Depth: Limit analysis to specific depth levels
  • Module System Detection: Supports ES6 modules, CommonJS, and dynamic imports

Output Formats

Tree

Hierarchical tree visualization with emoji markers for different node types:

  • 🚀 Entry points (routes/pages)
  • 🍃 Leaf nodes (no dependencies)
  • ⚠️ Dynamic imports
  • Dashed lines: CommonJS modules

JSON

Structured JSON output with full graph data, statistics, and route metadata.

DOT

Graphviz DOT format for generating visual dependency graphs:

nd analyze . --format dot --output deps.dot
dot -Tsvg deps.dot -o deps.svg

Commands

analyze [options] <path>

Analyzes dependencies of a Next.js project.

Options:

  • --format <type> - Output format: tree, json, dot, or ai (default: tree)
  • --output <file> - Output file path
  • --route <path> - Analyze specific route only
  • --leaves - Show only leaf nodes (no dependencies)
  • --orphans - Show only orphan nodes (no importers)
  • --cycles - Highlight circular dependencies
  • --max-depth <number> - Limit analysis depth
  • --external - Follow external dependencies
  • --no-ai-json - Disable default ai-docs/deps.ai.json side output
  • --verbose - Enable verbose output

Default behavior:

  • nd analyze always writes ai-docs/deps.ai.json under project root
  • nd analyze --format ai writes main output to ai-docs/deps.ai.json by default

page [options] <route>

Queries page component tree from generated JSON.

Options:

  • --input <file> - Input JSON file path (default: deps.json)
  • --format <type> - Output format: tree or json (default: tree)

Examples

# Basic analysis
nd analyze ./my-nextjs-app

# Generate SVG visualization
nd analyze ./my-nextjs-app --format dot --output deps.dot
dot -Tsvg deps.dot -o deps.svg

# Analyze specific route
nd analyze ./my-nextjs-app --route /dashboard

# Find circular dependencies
nd analyze ./my-nextjs-app --cycles

# Quick check for leaf nodes
nd analyze ./my-nextjs-app --leaves --format tree

# Query page component tree
nd page /dashboard --input deps.json

License

ISC © gaozimeng

ai [options]

Runs AI analysis for a selected page route and stores per-component results.

Options:

  • --input <file> - Input AI JSON file (default: ai-docs/deps.ai.json)
  • --output <dir> - Output directory (default: /ai-docs)
  • --route <path> - Analyze a specific route (skip selector)
  • --engine <engine> - AI engine: openai, google, zhipu, none
  • --model <name> - Model name
  • --max-source-chars <number> - Max source chars per component (default: 12000)
  • --fresh - Ignore existing analysis results

Output:

  • Component files: ai-docs/components/**
  • Page index: ai-docs/pages/<route>/page.json

AI Keys:

  • OPENAI_API_KEY for OpenAI
  • GOOGLE_API_KEY for Google Gemini
  • ZHIPU_API_KEY for Zhipu (glm) If no --engine is provided, the runner will auto-detect based on available API keys. Optional:
  • ZHIPU_BASE_URL for custom Zhipu endpoint