Skip to content

A .NET tool ecosystem for visualizing and analyzing project dependencies within solutions. It provides both a CLI for manual analysis and an MCP server for AI-assisted exploration of your codebase architecture.

License

Notifications You must be signed in to change notification settings

HandyS11/ProjGraph

Repository files navigation

ProjGraph

CI CD

ProjGraph.Cli NuGet ProjGraph.Cli Downloads ProjGraph.Mcp NuGet ProjGraph.Mcp Downloads

ProjGraph is a .NET tool ecosystem for visualizing and analyzing project dependencies within solutions. It provides both a CLI for manual analysis and an MCP server for AI-assisted exploration of your codebase architecture.

🚀 Quick Start

CLI Tool

Install and use the command-line tool for immediate visualization:

# Install
dotnet tool install -g ProjGraph.Cli

# Visualize project dependencies
projgraph visualize ./MySolution.slnx

# Generate Entity Relationship Diagram
projgraph erd ./Data/MyDbContext.cs

# Generate Class Diagram for a class and its hierarchy
projgraph classdiagram ./Models/User.cs

📖 Full CLI Documentation

MCP Server

Configure your MCP client (e.g., GitHub Copilot, Claude) with the following settings:

Find the latest version number on NuGet

{
  "servers": {
    "ProjGraph.Mcp": {
      "type": "stdio",
      "command": "dnx",
      "args": ["[email protected]", "--yes"]
    }
  }
}

📖 Full MCP Documentation

✨ Key Features

  • 📊 Multiple Output Formats: ASCII tree and Mermaid.js diagrams
  • 🗄️ Entity Relationship Diagrams: Generate ERDs from EF Core DbContext files
  • 🏗️ Class Hierarchies: Visualize class diagrams with inheritance and dependencies
  • 🔄 Circular Dependency Detection: Automatically identifies problematic cycles
  • 📁 Modern .NET Support: Full support for .slnx, .sln, and .csproj files
  • 🤖 AI Integration: MCP server for GitHub Copilot, Claude, and other AI assistants
  • ⚡ Fast & Reliable: Efficient parsing and graph algorithms

🛠️ Development

Prerequisites

Run Locally

# CLI
dotnet run --project src/ProjGraph.Cli -- visualize ./ProjGraph.sln

# MCP Server
dotnet run --project src/ProjGraph.Mcp

📝 Usage Examples

Analyze Project Dependencies

# Tree format (default)
projgraph visualize ./MySolution.sln

# Mermaid format for documentation
projgraph visualize ./MySolution.slnx --format mermaid > docs/dependencies.mmd

Generate Database Diagrams

# Generate ERD from DbContext
projgraph erd ./Data/MyDbContext.cs

# Save to documentation
projgraph erd ./Data/MyDbContext.cs > docs/database-schema.md

Visualize Class Hierarchies

# Generate diagram for a class and its dependencies
projgraph classdiagram ./Models/Admin.cs

# Control discovery depth (default: 3)
projgraph classdiagram ./Models/Admin.cs --depth 5

With AI Assistants

Once the MCP server is configured:

You: "Analyze the dependencies in my solution"
AI: [Generate the architecture diagram]

You: "Generate a class diagram for the User class"
AI: [Generates the class hierarchy]

You: "Show me the entity relationships in my DbContext"
AI: [Generates the database schema]

🔗 Links

About

A .NET tool ecosystem for visualizing and analyzing project dependencies within solutions. It provides both a CLI for manual analysis and an MCP server for AI-assisted exploration of your codebase architecture.

Topics

Resources

License

Stars

Watchers

Forks

Packages