Aiursoft.NiBot
10.0.36
dotnet tool install --global Aiursoft.NiBot --version 10.0.36
dotnet new tool-manifest
dotnet tool install --local Aiursoft.NiBot --version 10.0.36
#tool dotnet:?package=Aiursoft.NiBot&version=10.0.36
nuke :add-package Aiursoft.NiBot --version 10.0.36
Aiursoft NiBot
A cli tool helps you to de-duplicate images in a folder.
Overview
What is NiBot?
Compare and de-duplicate local images, or plan and apply incremental image archiving with optional local CLIP models.
NiBot also supports incremental archiving into existing category folders:
archive compares an incoming image folder against an existing library, skips exact
duplicates, and uses local CLIP image embeddings to recommend categories for new images.
Use --classification nearest to choose the closest existing category, or retain the
strict default for uncertain matches. Model installation uses the .NET archive-model
command with SHA-256 verification; no Python setup is required.
It produces a JSON plan and an HTML preview; archive-apply copies approved items without
overwriting old files. See incremental archive setup and usage.
Suppose you enjoy collecting images and intensively gather a large number of them from various websites to your hard drive every day. Soon, your hard drive accumulates tens of thousands of CG images with different sources and resolutions.
However, you discover that a significant portion of these downloaded CG images are duplicates, occupying precious disk space. Therefore, you urgently need a fast method to identify and remove duplicates from your CG directory. Since the sources of these downloads vary, traditional methods such as searching by file names are clearly inadequate for solving this problem; it's necessary to analyze the content of the images.
Installation
Install the CLI with the .NET 10 SDK:
dotnet tool install --global Aiursoft.NiBot
Update an existing installation:
dotnet tool update --global Aiursoft.NiBot
Remove the CLI:
dotnet tool uninstall --global Aiursoft.NiBot
Usage
Run the command to see available options:
nibot --help
After getting the binary, run it directly in the terminal.
$ nibot dedup
Option '--path' is required.
Description:
De-duplicate images in a folder.
Usage:
nibot dedup [options]
Options:
-p, --path <path> (REQUIRED) Path of the folder to dedup.
-ds, --duplicate-similar <duplicate-similar> Similarity bar. This value means two image are considered as duplicates if their similarity is greater than it. Setting too small may cause different images to be considered as
duplicates. Suggested values: [96-100] [default: 96]
-r, --recursive Recursively search for similar images in subdirectories. [default: False]
-k, --keep <keep> Preference for sorting images by quality to determine which to keep when duplicates are found. Available options:
Colorful|GrayScale|Newest|Oldest|Smallest|Largest|HighestResolution|LowestResolution. [default: Colorful|HighestResolution|Largest|Newest]
-a, --action <Delete|MoveToTrash|Nothing> Action to take when duplicates are found. Available options: Nothing, Delete, MoveToTrash. [default: MoveToTrash]
-y, --yes No interactive mode. Taking action without asking for confirmation. [default: False]
-e, --extensions <extensions> Extensions of files to dedup. [default: jpg|jpeg|png|jfif]
-t, --threads <threads> Number of threads to use for image indexing. Default is 32. [default: 32]
-v, --verbose Show detailed log
-?, -h, --help Show help and usage information
It will fetch all images in the folder and compare them with each other. If two images are similar enough, it will consider them as duplicates.
It will pick the best one based the --keep option. If the --action is set to Delete, it will delete the rest of the duplicates. If the --action is set to MoveToTrash, it will move the rest of the duplicates to the trash.
Without --yes, it will preview each photo and ask for confirmation before deleting files.
<a name="install-as-a-class-library"></a> <a name="use-as-a-library"></a>
Use as a library
You can also install this tool as a class library.
dotnet add package Aiursoft.NiBot.Core
Then you can use the DedupEngine class to de-duplicate images in your own code.
services.AddLogging(builder =>
{
builder.AddConsole();
builder.AddDebug();
});
services.AddTransient<DedupEngine>();
services.AddTransient<ImageHasher>();
services.AddTransient<BestPhotoSelector>();
services.AddTransient<FilesHelper>();
services.AddTaskCanon();
var sp = services.BuildServiceProvider();
var dedupEngine = sp.GetRequiredService<DedupEngine>();
That's it!
Configuration
Configuration is supplied through command-line options; no additional application settings file is required. Use nibot --help or nibot <command> --help for current options. The deduplication defaults and action choices are preserved in Usage.
Inspect the selected action before processing a real library: Delete removes duplicate files, MoveToTrash moves them to trash, and Nothing leaves them in place. Archiving uses its own model, plan and apply options; see the complete archive guide for model installation, digest verification and plan approval.
Development
Install the .NET 10 SDK.
From the repository root, restore and build:
dotnet restore Aiursoft.NiBot.sln
dotnet build Aiursoft.NiBot.sln --no-restore
<a name="run-locally"></a> <a name="local-run"></a> Run the tool from source, with the prerequisites and configuration above:
dotnet run --project src/Aiursoft.NiBot/Aiursoft.NiBot.csproj -- --help
<a name="run-in-microsoft-visual-studio"></a>
In Microsoft Visual Studio, open Aiursoft.NiBot.sln, select Aiursoft.NiBot as the startup project and press F5. Configure the arguments and environment for the task you want to run.
Run the existing tests:
dotnet test Aiursoft.NiBot.sln --no-restore
Documentation
How to contribute
There are many ways to contribute to the project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.
Even if you have 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.
License
Licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.36 | 58 | 11/28/2026 |
| 10.0.35 | 109 | 11/19/2026 |
| 10.0.34 | 110 | 11/15/2026 |
| 10.0.33 | 116 | 11/14/2026 |
| 10.0.31 | 110 | 11/11/2026 |
| 10.0.30 | 109 | 11/11/2026 |
| 10.0.29 | 119 | 11/7/2026 |
| 10.0.28 | 134 | 10/28/2026 |
| 10.0.26 | 123 | 10/26/2026 |
| 10.0.25 | 168 | 10/19/2026 |
| 10.0.24 | 128 | 10/19/2026 |
| 10.0.23 | 126 | 10/19/2026 |
| 10.0.22 | 138 | 10/16/2026 |
| 10.0.21 | 124 | 10/16/2026 |
| 10.0.20 | 137 | 10/16/2026 |
| 10.0.19 | 176 | 9/9/2026 |
| 10.0.18 | 218 | 8/14/2026 |
| 10.0.17 | 142 | 8/12/2026 |
| 10.0.16 | 147 | 8/12/2026 |
| 10.0.15 | 154 | 7/18/2026 |