![]() |
VOOZH | about |
dotnet add package Aiursoft.NugetNinja.GitServerBase --version 10.0.41
NuGet\Install-Package Aiursoft.NugetNinja.GitServerBase -Version 10.0.41
<PackageReference Include="Aiursoft.NugetNinja.GitServerBase" Version="10.0.41" />
<PackageVersion Include="Aiursoft.NugetNinja.GitServerBase" Version="10.0.41" />Directory.Packages.props
<PackageReference Include="Aiursoft.NugetNinja.GitServerBase" />Project file
paket add Aiursoft.NugetNinja.GitServerBase --version 10.0.41
#r "nuget: Aiursoft.NugetNinja.GitServerBase, 10.0.41"
#:package Aiursoft.NugetNinja.GitServerBase@10.0.41
#addin nuget:?package=Aiursoft.NugetNinja.GitServerBase&version=10.0.41Install as a Cake Addin
#tool nuget:?package=Aiursoft.NugetNinja.GitServerBase&version=10.0.41Install as a Cake Tool
👁 MIT licensed
👁 NuGet version (Aiursoft.NugetNinja)
👁 NuGet version (Aiursoft.NugetNinja.PrBot)
Nuget Ninja is a tool for detecting dependencies of .NET projects. It analyzes the dependency structure of .NET projects in a directory and builds a directed acyclic graph. And will give some modification suggestions for Nuget packages, so that the dependencies of the project are as concise and up-to-date as possible.
Requirements:
Run the following command to install this tool:
dotnet tool install --global Aiursoft.NugetNinja
After getting the binary, run it directly in the terminal.
C:\workspace> ninja.exe
Description:
A tool for detecting dependencies of .NET projects.
Usage:
ninja [command] [options]
Options:
-p, --path <path> (REQUIRED) Path of the projects to be changed.
-d, --dry-run Preview changes without actually making them
-v, --verbose Show detailed log
--allow-preview Allow using preview versions of packages from Nuget.
--nuget-server <nuget-server> If you want to use a customized nuget server instead of the official nuget.org, you can set it with a value like: https://nuget.myserver/v3/index.json
--token <token> The PAT token which has privilege to access the nuget server. See:
https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate
--allow-package-version-cross-microsoft-runtime Allow using NuGet package versions for different Microsoft runtime versions. For example, when using runtime 6.0, it will avoid upgrading packages to 7.0.
--version Show version information
-?, -h, --help Show help and usage information
Commands:
all, all-officials The command to run all officially supported features.
fill-properties The command to fill all missing properties for .csproj files.
remove-deprecated The command to replace all deprecated packages to new packages.
upgrade-pkg The command to upgrade all package references to possible latest and avoid conflicts.
clean-pkg The command to clean up possible useless package references.
clean-prj The command to clean up possible useless project references.
visualize The command to visualize the dependency relationship, with mermaid markdown.
expect-files The command to search for all expected files and add patch the content.
Beyond managing NuGet packages, NugetNinja can also enforce repository structure by ensuring common files (like .gitignore, LICENSE, or .editorconfig) are present and up-to-date.
This feature is configured by placing a ninja.yaml file in the root of your repository.
This YAML file defines a list of files you expect to be in your repository. For each file, you must specify its name and can optionally provide a contentUri pointing to the raw content that file should have.
Here is a sample ninja.yaml:
configVersion: 1
files:
- name: .editorconfig
contentUri: https://gitlab.aiursoft.com/aiursoft/tracer/-/raw/master/.editorconfig
- name: .gitignore
contentUri: https://gitlab.aiursoft.com/aiursoft/tracer/-/raw/master/.gitignore
- name: .gitlab-ci.yml
contentUri: https://gitlab.aiursoft.com/aiursoft/tracer/-/raw/master/.gitlab-ci.yml
- name: LICENSE
contentUri: https://gitlab.aiursoft.com/aiursoft/tracer/-/raw/master/LICENSE
- name: CODE_OF_CONDUCT.md
contentUri: https://gitlab.aiursoft.com/aiursoft/tracer/-/raw/master/CODE_OF_CONDUCT.md
- name: ninja.yaml
contentUri: https://gitlab.aiursoft.com/aiursoft/tracer/-/raw/master/ninja.yaml
- name: nuget.config
contentUri: https://gitlab.aiursoft.com/aiursoft/tracer/-/raw/master/nuget.config
- name: README.md
When you run the expect-files command, NugetNinja will read this configuration and perform the following actions:
Create Missing Files: If a file specified in files (e.g., LICENSE) does not exist in your project's root directory, NugetNinja will create it.
contentUri is provided, the tool will download the content from that URL and write it to the new file.contentUri is provided, an empty file will be created.Patch Existing Files: If a file already exists, NugetNinja will compare its content with the content at the specified contentUri.
Correct File Casing: The tool performs a case-insensitive search for the file. If it finds a file with a matching name but different casing (e.g., your repo has license but the YAML specifies LICENSE), it will rename the file to match the exact casing in the name property.
Generate suggestions for the current workspace without modifying local files:
C:\workspace> ninja.exe all --path . --dry-run
Fill missing properties for current workspace:
C:\workspace> ninja.exe fill-properties --path .
Run all plugins under the current folder:
C:\workspace> ninja.exe all --path .
Requirements about how to run
dotnet run to run the app.sln file in the project path.F5.There are many ways to contribute to the project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.
Even if you with push rights on the repository, you should create a personal fork and create feature branches there when you need them. This keeps the main repository clean and your workflow cruft out of sight.
We're also interested in your feedback on the future of this project. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly.
Nuget Ninja provides two bots for automating dependency management:
You can run the Nuget Ninja bots using Docker. The image includes both bots and runs them periodically via cron.
docker run -d \
--name nuget-ninja \
-e "PrBot__Servers__0__Provider=GitHub" \
-e "PrBot__Servers__0__Token=YOUR_GITHUB_TOKEN" \
-e "PrBot__Servers__0__UserName=YOUR_GITHUB_USERNAME" \
-e "PrBot__Servers__0__UserEmail=your-email@example.com" \
-e "PrBot__Servers__0__DisplayName=Nuget Ninja Bot" \
-e "PrBot__Servers__0__EndPoint=https://api.github.com" \
-e "PrBot__Servers__0__PushEndPoint=https://{0}@github.com" \
-e "PrBot__Servers__0__ContributionBranch=users/nugetninja/evergreen" \
-e "MergeBot__Servers__0__Provider=GitLab" \
-e "MergeBot__Servers__0__EndPoint=https://gitlab.aiursoft.com" \
-e "MergeBot__Servers__0__UserName=nuget-ninja" \
-e "MergeBot__Servers__0__Token=YOUR_GITLAB_TOKEN" \
hub.aiursoft.com/aiursoft/nugetninja
The bots support full configuration via environment variables. This is the recommended way to provide secrets and server information. PrBot and MergeBot have their own configuration sections to avoid conflicts.
To configure servers for PrBot, use the PrBot__Servers__N__Property pattern:
PrBot__Servers__N__Provider: The git provider (e.g., GitHub, GitLab, Gitea).PrBot__Servers__N__EndPoint: The API endpoint of the server.PrBot__Servers__N__Token: Your Personal Access Token (PAT).PrBot__Servers__N__UserName: Your username on the server.PrBot__Servers__N__UserEmail: Your email for git commits.PrBot__Servers__N__DisplayName: The name used for git commits.PrBot__Servers__N__ContributionBranch: The branch name used for creating PRs.PrBot__Servers__N__OnlyUpdate: (Optional) Set to true to only run the update plugin.To configure servers for MergeBot, use the MergeBot__Servers__N__Property pattern:
MergeBot__Servers__N__Provider: The git provider (only GitLab is currently supported for MergeBot).MergeBot__Servers__N__EndPoint: The API endpoint of the server.MergeBot__Servers__N__UserName: Your username on the server.MergeBot__Servers__N__Token: Your Personal Access Token (PAT).You can also configure PR Bot specific options:
PrBot__LocalizationEnabled: Set to true to enable automatic localization.PrBot__OllamaApiEndpoint: The Ollama API endpoint for localization.PrBot__OllamaModel: The Ollama model to use.PrBot__OllamaApiKey: The API key for the localization service.PrBot__LocalizationConcurrentRequests: Maximum concurrent requests for localization (default 8).PrBot__LocalizationTargetLanguages__0: Target language for localization (e.g. en-GB). Use __0, __1 for multiple languages.| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.41 | 87 | 6/10/2026 |
| 10.0.40 | 89 | 6/10/2026 |
| 10.0.37 | 100 | 6/10/2026 |
| 10.0.36 | 95 | 6/10/2026 |
| 10.0.35 | 94 | 5/25/2026 |
| 10.0.34 | 98 | 5/25/2026 |
| 10.0.33 | 94 | 5/15/2026 |
| 10.0.32 | 95 | 5/15/2026 |
| 10.0.31 | 94 | 5/13/2026 |
| 10.0.30 | 93 | 5/13/2026 |
| 10.0.29 | 109 | 4/22/2026 |
| 10.0.28 | 96 | 4/22/2026 |
| 10.0.27 | 105 | 4/22/2026 |
| 10.0.26 | 102 | 4/15/2026 |
| 10.0.25 | 104 | 4/15/2026 |
| 10.0.24 | 107 | 4/15/2026 |
| 10.0.23 | 112 | 4/6/2026 |
| 10.0.22 | 116 | 3/14/2026 |
| 10.0.21 | 122 | 3/11/2026 |
| 10.0.20 | 109 | 3/11/2026 |