Scrubkit NuGet version
CI NuGet Downloads License MPL 2.0

Scrubkit

Point at a folder, get a clean table of file text + metadata back — fully offline. Local-first data preparation for RAG and search pipelines, on .NET 8 and .NET Standard 2.0.

~12K

files/sec extracted

100%

offline · no telemetry

6

NuGet packages

2

target frameworks
net8.0 · netstandard2.0

Throughput from a BenchmarkDotNet run over a mixed text-file corpus, 4-way parallel — regenerate it from benchmarks/.

cloud_off

Offline

No network calls, no telemetry. Everything runs locally on your infrastructure for maximum privacy.

bolt

Fast Core

Extraction for PDF, Office, and text via PdfPig + MetadataExtractor — a small dependency set and streaming, bounded-parallel processing.

extension

Pluggable

Add or override formats via IFileExtractor. Opt into text transforms — redaction, masking — with an IRedactor you supply.

shield

Robust

A single unreadable file never crashes the batch. Problems surface as warnings on the specific row.

GET STARTED

Simple Installation

Add Scrubkit to your .NET project with a single command. Multi-targeted for net8.0 and netstandard2.0.

$ dotnet add package Scrubkit

Quick Start

Get up and running in a few lines. Point FolderScrubber at a directory and await one flat table of results.

using Scrubkit;

var scrubber = new FolderScrubber(new ReadOptions {
    Recursion = Recursion.AllNested
});

IReadOnlyList<FileRecord> table = await scrubber.ReadAsync(@"C:\Docs");
Playground output
Scrubkit playground output — a table of extracted files with type, size and text length

Recipe: Prepare for RAG

Stream document folders straight into a vector store. The async stream API keeps the memory footprint low even on massive directories.

  • check_circle Text + metadata ready to embed
  • check_circle Length-clipped, index-friendly chunks
  • check_circle Streaming, order-preserving I/O
var scrubber = new FolderScrubber(new ReadOptions
{
    MaxTextLength = 8_000,   // keep chunks index-friendly
});

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

    await index.UpsertAsync(
        id: doc.Path,
        text: doc.Text,
        metadata: doc.Metadata);
}

One core, a growing family of add-ons

Start with the core package — it reads PDF, Office, text, and image EXIF out of the box. Reach for an optional add-on when you need more formats. Every add-on references only Scrubkit.Abstractions, so it stays lightweight and pulls in no heavy dependencies.

Writing your own? Implement IFileExtractor, reference Scrubkit.Abstractions, and register it via ReadOptions.Extractors — it's tried before the built-ins, so you can add or override any format.

Try Without Installing

Run the playground demo to see the table output format immediately.

dotnet run --project samples/Scrubkit.Playground

Repository Layout

src/Scrubkit.Abstractions contracts only
src/Scrubkit core + built-in extractors
tests/Scrubkit.Tests xUnit suite