Scrubkit 1.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Scrubkit --version 1.0.0
                    
NuGet\Install-Package Scrubkit -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Scrubkit" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Scrubkit" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Scrubkit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Scrubkit --version 1.0.0
                    
#r "nuget: Scrubkit, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Scrubkit@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Scrubkit&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Scrubkit&version=1.0.0
                    
Install as a Cake Tool

Scrubkit

Point it at a folder — get back a clean table of file text + metadata, fully offline.

Scrubkit walks a directory, pulls text and metadata out of common file types, and scrubs common sensitive values (emails, phone numbers, card- and SSN-like numbers, IPs) as it goes. You keep what matters about each file without carrying the raw values downstream — ideal for RAG ingestion, search indexing, and on-device data prep.


Highlights

  • Offline — no network calls, no telemetry.
  • Small, fast core — PDF, Office, text, and image metadata out of the box.
  • Built-in scrubbing — best-effort redaction of common sensitive values.
  • Pluggable — add formats with IFileExtractor, swap redaction with IRedactor.
  • Scales — stream results and process files in parallel for large trees.
  • Multi-targetnet8.0 and netstandard2.0.

Install

dotnet add package Scrubkit

Quick start

using Scrubkit;

var scrubber = new FolderScrubber(new ReadOptions
{
    Recursion = Recursion.AllNested,
    Redaction = RedactionLevel.Standard,
});

IReadOnlyList<FileRecord> table = await scrubber.ReadAsync(@"C:\Docs");

foreach (var r in table)
    Console.WriteLine($"{r.Name} — {r.TypeBucket} — {r.Text.Length} chars");

Each FileRecord gives you the file's Text, Metadata, TypeBucket, a per-category Redactions count, and any Warnings.


Supported formats

Category Extensions
Documents PDF, DOCX, RTF
Spreadsheets XLSX, CSV
Presentations PPTX
Text TXT, MD, LOG, JSON, XML, HTML
Images EXIF metadata (make / model / software)

Unknown types return a metadata-only row. Extraction never throws to the caller — per-file problems land in FileRecord.Warnings.


Large folders: stream & parallelize

ReadAsync buffers the whole table. For big trees, stream records as they're produced and process files concurrently:

var options = new ReadOptions { MaxDegreeOfParallelism = 4 };

await foreach (var r in new FolderScrubber(options).ReadStreamAsync(@"C:\Docs"))
    Index(r);

Output order is preserved. Above a degree of 1, custom extractors and redactors should be thread-safe (the built-ins are).


Recipe: prepare a folder for RAG

Stream a document folder straight into a vector store — sensitive values already scrubbed, rows with no text skipped:

var scrubber = new FolderScrubber(new ReadOptions
{
    Redaction     = RedactionLevel.Standard,
    MaxTextLength = 8_000,   // keep chunks index-friendly
});

await foreach (var doc in scrubber.ReadStreamAsync(@"C:\Docs"))
{
    if (doc.Text.Length == 0) continue;   // skip metadata-only rows

    await index.UpsertAsync(
        id: doc.Path,
        text: doc.Text,                   // clean text, ready to embed
        metadata: doc.Metadata);
}

Extend it

Add a format by implementing IFileExtractor — it's tried before the built-ins, so you can also override one:

public sealed class MyExtractor : IFileExtractor
{
    public bool CanHandle(string ext) => ext == ".xyz";
    public ExtractedContent Extract(string path) => new(metadata, text);
}

options.Extractors.Add(new MyExtractor());

For different redaction, implement IRedactor and set ReadOptions.Redactor.

Shipping an add-on as its own package? Reference Scrubkit.Abstractions (contracts only) to stay lightweight.


A note on scrubbing

The built-in redactor is best-effort pattern matching. It reduces incidental exposure of common sensitive values, but it will miss things and is not a guarantee. For stronger redaction, plug in your own IRedactor.

100% offline — no network calls, no telemetry.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Scrubkit:

Package Downloads
Scrubkit.Extensions.DependencyInjection

Microsoft.Extensions.DependencyInjection integration for Scrubkit. Call services.AddScrubkit(...) to register a configured FolderScrubber for constructor injection in ASP.NET Core, worker services, and other generic hosts. Configure recursion, limits, add-on extractors, and an optional redactor via the ReadOptions hook.

Scrubkit.All

Convenience meta-package that references the entire Scrubkit family: the core (PDF/Office/text/image EXIF + CSV/JSON output), the extractor add-ons (.eml, OpenDocument, .epub), the AddScrubkit dependency-injection integration, and — on net8.0 — Parquet output. Install this to read everything out of the box; install the individual packages instead if you want a lean footprint. No code of its own.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.0 0 7/21/2026
1.4.0 46 7/20/2026
1.3.0 64 7/19/2026
1.2.0 54 7/18/2026
1.1.0 57 7/17/2026
1.0.0 88 7/15/2026
0.1.0-preview.1 53 7/12/2026