{"id":16111012,"url":"https://github.com/nikiforovall/dependify","last_synced_at":"2025-03-16T08:32:44.472Z","repository":{"id":249436585,"uuid":"830700513","full_name":"NikiforovAll/dependify","owner":"NikiforovAll","description":"Explore project dependencies in .NET","archived":false,"fork":false,"pushed_at":"2024-08-13T10:42:52.000Z","size":20463,"stargazers_count":66,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T05:56:10.266Z","etag":null,"topics":["aspire","cli","dependency-management","msbuild","tool"],"latest_commit_sha":null,"homepage":"https://nikiforovall.github.io/dotnet/2024/08/03/dependify.html","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NikiforovAll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-18T19:58:13.000Z","updated_at":"2025-02-22T09:15:31.000Z","dependencies_parsed_at":"2024-08-06T20:07:34.450Z","dependency_job_id":null,"html_url":"https://github.com/NikiforovAll/dependify","commit_stats":null,"previous_names":["nikiforovall/dependify"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fdependify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fdependify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fdependify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikiforovAll%2Fdependify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NikiforovAll","download_url":"https://codeload.github.com/NikiforovAll/dependify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243807358,"owners_count":20350989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspire","cli","dependency-management","msbuild","tool"],"created_at":"2024-10-09T19:40:03.668Z","updated_at":"2025-03-16T08:32:39.459Z","avatar_url":"https://github.com/NikiforovAll.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dependify\n\n[![Build](https://github.com/NikiforovAll/dependify/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/NikiforovAll/dependify/actions/workflows/build.yml)\n[![NuGet](https://img.shields.io/nuget/dt/Dependify.Cli.svg)](https://nuget.org/packages/Dependify.Cli)\n[![contributionswelcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/nikiforovall/dependify)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nikiforovall/dependify/blob/main/LICENSE.md)\n\nDependify is a tool to visualize dependencies in your .NET application. You can start dependify in `serve` mode to visualize dependencies in a browser or use the `CLI` if you prefer the terminal.\n\n\n| Package                     | Version                                                                                                                      | Description    |\n| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -------------- |\n| `Dependify.Cli`             | [![Nuget](https://img.shields.io/nuget/v/Dependify.Cli.svg)](https://nuget.org/packages/Dependify.Cli)                       | CLI            |\n| `Dependify.Core`            | [![Nuget](https://img.shields.io/nuget/v/Dependify.Core.svg)](https://nuget.org/packages/Dependify.Core)                     | Core library   |\n| `Dependify.Aspire.Hosting` | [![Nuget](https://img.shields.io/nuget/v/Dependify.Aspire.Hosting.svg)](https://nuget.org/packages/Dependify.Aspire.Hosting) | Aspire support |\n\nBlogs:\n\n* [Explore .NET application dependencies by using Dependify tool](https://nikiforovall.github.io/dotnet/2024/08/03/dependify.html)\n* [Supercharge your Dependify tool with AI chat assistant](https://nikiforovall.github.io/dotnet/2024/08/09/dependify-ai.html)\n\n## Install\n\n```bash\ndotnet tool install -g Dependify.Cli\n```\n\n## Usage\n\n```bash\ndependify serve $dev/path-to-folder/\n```\n\nYou will see something like the following output in the terminal.\n\n![serve-terminal](./assets/serve-terminal.png)\n\n### Features\n\n-   Workbench ⚙️\n-   Dependency Explorer 🔎\n-   Chat (AI) 🤖\n\nWorkbench gives you high level overview of the dependencies in the solution.\n\n\u003cvideo src=\"https://github.com/user-attachments/assets/e3eecf59-864d-4a7b-9411-60ee7a364c57\" controls=\"controls\"\u003e\n\u003c/video\u003e\n\nYou can open the mermaid diagram right in the browser.\n\n![serve-graph-view](./assets/serve-graph-view.png)\n\nDependency Explorer allows you to select the dependencies you want to see.\n\n\u003cvideo src=\"https://github.com/user-attachments/assets/555df3ef-b0c3-4354-911f-81d4dfd07607\" controls=\"controls\"\u003e\n\u003c/video\u003e\n\nChat (AI) allows you to ask questions about the dependencies.\n\n![serve-graph-view](./assets/ai-chat.png)\n\nHere is how to run the Dependify with the OpenAI GPT-4 model.\n\n```bash\ndependify serve $dev/cap-aspire/ \\\n    --endpoint https://api.openai.azure.com/ \\\n    --deployment-name gpt-4o-mini \\\n    --api-key \u003capi-key\u003e\n```\n\n\u003cvideo src=\"https://github.com/user-attachments/assets/b07a8b53-d3d2-4ef8-9a8c-8c3dbd865350\" controls=\"controls\"\u003e\n\u003c/video\u003e\n\n### Aspire support\n\nYou can add `Dependify.Web` as resource to your Aspire project.\n\nAdd the package to AppHost:\n\n```bash\ndotnet add package Dependify.Aspire.Hosting\n```\n\nRegister via `IDistributedApplicationBuilder`. Add the following code to your `Program.cs`:\n\n```csharp\nvar builder = DistributedApplication.CreateBuilder(args);\n\nvar apiService = builder.AddProject\u003cProjects.aspire_project_ApiService\u003e(\"apiservice\");\n\nbuilder.AddProject\u003cProjects.aspire_project_Web\u003e(\"webfrontend\")\n    .WithExternalHttpEndpoints()\n    .WithReference(apiService);\n\nbuilder.AddDependify().ServeFrom(\"../../aspire-project/\"); // \u003c-- location of .sln file\n\nbuilder.Build().Run();\n```\n\nSee the [samples/aspire-project](./samples/aspire-project) for more details.\n\n### CLI\n\nYou can use the CLI for the automation or if you prefer the terminal.\n\n```bash\ndependify graph --help\n```\n\n```text\nUSAGE:\n    dependify graph [OPTIONS] \u003cCOMMAND\u003e\n\nEXAMPLES:\n    dependify graph scan ./path/to/folder --framework net8\n    dependify graph show ./path/to/project --framework net8\n\nOPTIONS:\n    -h, --help    Prints help information\n\nCOMMANDS:\n    scan \u003cpath\u003e    Scans for projects and solutions and retrives their dependencies\n    show \u003cpath\u003e    Shows the dependencies of a project or solution located in the specified path\n```\n\nThe command `scan` will scan the folder for projects and solutions and retrieve their dependencies. The ouput can be in `tui` or `mermaid` format. The `tui` or terminal user interface is the default output format.\n\n```bash\ndependify graph scan $dev/keycloak-authorization-services-dotnet/\n```\n\n![tui-demo1](./assets/tui-demo1.png)\n\nHere is how to change the output format to `mermaid`.\n\n```bash\ndependify graph scan \\\n    $dev/keycloak-authorization-services-dotnet/ \\\n    --exclude-sln \\\n    --format mermaid \\\n    --output ./graph.md\n```\n\n```mermaid\ngraph LR\n    Keycloak.AuthServices.Authentication.csproj:::project\n    Keycloak.AuthServices.Templates.csproj:::project\n    Blazor.Server.csproj:::project\n    GettingStarted.csproj:::project\n    AuthorizationGettingStarted.csproj:::project\n    AuthorizationAndCleanArchitecture.csproj:::project\n    Blazor.Client.csproj:::project\n    TestWebApi.csproj:::project\n    Keycloak.AuthServices.Authorization.csproj:::project\n    Keycloak.AuthServices.Common.csproj:::project\n    TestWebApiWithControllers.csproj:::project\n    Keycloak.AuthServices.Sdk.csproj:::project\n    WebApp.csproj:::project\n    Keycloak.AuthServices.Sdk.Tests.csproj:::project\n    AuthGettingStarted.csproj:::project\n    Keycloak.AuthServices.Common.Tests.csproj:::project\n    Keycloak.AuthServices.Authentication.Tests.csproj:::project\n    Keycloak.AuthServices.Aspire.Hosting.csproj:::project\n    ResourceAuthorization.csproj:::project\n    Keycloak.AuthServices.OpenTelemetry.csproj:::project\n    Keycloak.AuthServices.Authorization.Tests.csproj:::project\n    Keycloak.AuthServices.IntegrationTests.csproj:::project\n    Keycloak.AuthServices.Sdk.Kiota.csproj:::project\n    Blazor.Shared.csproj:::project\n    Keycloak.AuthServices.IntegrationTests.csproj --\u003e Keycloak.AuthServices.Sdk.csproj\n    Keycloak.AuthServices.Common.Tests.csproj --\u003e Keycloak.AuthServices.Common.csproj\n    AuthGettingStarted.csproj --\u003e Keycloak.AuthServices.Authorization.csproj\n    ResourceAuthorization.csproj --\u003e Keycloak.AuthServices.OpenTelemetry.csproj\n    Keycloak.AuthServices.Authorization.Tests.csproj --\u003e Keycloak.AuthServices.Authentication.csproj\n    AuthGettingStarted.csproj --\u003e Keycloak.AuthServices.Sdk.csproj\n    Keycloak.AuthServices.Authorization.csproj --\u003e Keycloak.AuthServices.Common.csproj\n    WebApp.csproj --\u003e Keycloak.AuthServices.Authorization.csproj\n    GettingStarted.csproj --\u003e Keycloak.AuthServices.Authentication.csproj\n    ResourceAuthorization.csproj --\u003e Keycloak.AuthServices.Sdk.Kiota.csproj\n    WebApp.csproj --\u003e Keycloak.AuthServices.Common.csproj\n    Keycloak.AuthServices.Sdk.Kiota.csproj --\u003e Keycloak.AuthServices.Common.csproj\n    AuthorizationGettingStarted.csproj --\u003e Keycloak.AuthServices.Authentication.csproj\n    Keycloak.AuthServices.Authorization.Tests.csproj --\u003e Keycloak.AuthServices.Authorization.csproj\n    ResourceAuthorization.csproj --\u003e Keycloak.AuthServices.Authentication.csproj\n    Keycloak.AuthServices.Authorization.Tests.csproj --\u003e Keycloak.AuthServices.Common.csproj\n    Keycloak.AuthServices.IntegrationTests.csproj --\u003e Keycloak.AuthServices.Sdk.Kiota.csproj\n    Keycloak.AuthServices.Sdk.csproj --\u003e Keycloak.AuthServices.Common.csproj\n    Blazor.Client.csproj --\u003e Blazor.Shared.csproj\n    Blazor.Server.csproj --\u003e Blazor.Shared.csproj\n    Keycloak.AuthServices.Authentication.Tests.csproj --\u003e Keycloak.AuthServices.Authentication.csproj\n    Blazor.Server.csproj --\u003e Keycloak.AuthServices.Authentication.csproj\n    AuthorizationAndCleanArchitecture.csproj --\u003e Keycloak.AuthServices.Authentication.csproj\n    AuthorizationGettingStarted.csproj --\u003e Keycloak.AuthServices.Authorization.csproj\n    Keycloak.AuthServices.Authentication.csproj --\u003e Keycloak.AuthServices.Common.csproj\n    Keycloak.AuthServices.Sdk.Tests.csproj --\u003e Keycloak.AuthServices.Sdk.csproj\n    ResourceAuthorization.csproj --\u003e Keycloak.AuthServices.Authorization.csproj\n    Keycloak.AuthServices.IntegrationTests.csproj --\u003e Keycloak.AuthServices.Authentication.csproj\n    AuthorizationGettingStarted.csproj --\u003e Keycloak.AuthServices.Sdk.csproj\n    ResourceAuthorization.csproj --\u003e Keycloak.AuthServices.Common.csproj\n    ResourceAuthorization.csproj --\u003e Keycloak.AuthServices.Sdk.csproj\n    Blazor.Server.csproj --\u003e Blazor.Client.csproj\n    Blazor.Server.csproj --\u003e Keycloak.AuthServices.Authorization.csproj\n    TestWebApi.csproj --\u003e Keycloak.AuthServices.Authorization.csproj\n    AuthGettingStarted.csproj --\u003e Keycloak.AuthServices.Authentication.csproj\n    AuthorizationAndCleanArchitecture.csproj --\u003e Keycloak.AuthServices.Authorization.csproj\n    Keycloak.AuthServices.Authentication.Tests.csproj --\u003e Keycloak.AuthServices.Common.csproj\n    Keycloak.AuthServices.IntegrationTests.csproj --\u003e TestWebApi.csproj\n    TestWebApiWithControllers.csproj --\u003e Keycloak.AuthServices.Authorization.csproj\n    Keycloak.AuthServices.IntegrationTests.csproj --\u003e Keycloak.AuthServices.Authorization.csproj\n    AuthorizationAndCleanArchitecture.csproj --\u003e Keycloak.AuthServices.Sdk.csproj\n    WebApp.csproj --\u003e Keycloak.AuthServices.Authentication.csproj\n    Keycloak.AuthServices.IntegrationTests.csproj --\u003e Keycloak.AuthServices.Common.csproj\n    Keycloak.AuthServices.IntegrationTests.csproj --\u003e TestWebApiWithControllers.csproj\n    classDef project fill:#74200154;\n    classDef package fill:#22aaee;\n```\n\n### API\n\nYou can use the API to build your own tools.\n\n```bash\ndotnet add package Dependify.Core\n```\n\n```csharp\nvar services = new ServiceCollection()\n    .AddLogging()\n    .AddSingleton\u003cProjectLocator\u003e()\n    .AddSingleton\u003cMsBuildService\u003e();\n\nvar provider = services.BuildServiceProvider();\n\nvar locator = provider.GetRequiredService\u003cProjectLocator\u003e();\nvar msBuildService = provider.GetRequiredService\u003cMsBuildService\u003e();\n\nvar nodes = locator.FullScan(\"C:\\\\Users\\\\joel\\\\source\\\\repos\\\\Dependify\");\n\nvar solution = nodes.OfType\u003cSolutionReferenceNode\u003e().FirstOrDefault();\n\nvar graph = msBuildService.AnalyzeReferences(solution, MsBuildConfig.Default);\n\nvar subgraph = graph.SubGraph(n =\u003e n.Id.Contains(\"AwesomeProjectName\"));\n```\n\n## Build and Development\n\n`dotnet cake --target build`\n\n`dotnet cake --target test`\n\n`dotnet cake --target pack`\n\n`dotnet tool install --global --add-source ./Artefacts Dependify.Cli --prerelease`\n\n`dotnet tool uninstall Dependify.Cli -g`\n\n```bash\ndotnet watch run --project ./src/Dependify.Cli/ -- \\\n    serve $dev/cap-aspire/ \\\n    --endpoint \"http://localhost:1234/v1/chat/completions\" \\\n    --model-id \"LM Studio Community/Meta-Llama-3-8B-Instruct-GGUF\" \\\n    --api-key \"lm-studio\" \\\n    --log-level \"Information\"\n```\n\n```bash\ndotnet watch run --project ./src/Dependify.Cli/ -- \\\n    serve $dev/cap-aspire/ \\\n    --endpoint \"\" \\\n    --deployment-name \"gpt-35-turbo\" \\\n    --api-key \"\" \\\n    --log-level \"Information\"\n```\nSet the API key for the AppHost with the following command:\n\n```bash\ndotnet user-secrets set \"Parameters:api-key\" \"\u003capi-key\u003e\"\ndotnet user-secrets set \"Parameters:endpoint\" \"\u003cendpoint\u003e\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikiforovall%2Fdependify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikiforovall%2Fdependify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikiforovall%2Fdependify/lists"}