Ferret 0.5.0

dotnet add package Ferret --version 0.5.0
                    
NuGet\Install-Package Ferret -Version 0.5.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="Ferret" Version="0.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ferret" Version="0.5.0" />
                    
Directory.Packages.props
<PackageReference Include="Ferret" />
                    
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 Ferret --version 0.5.0
                    
#r "nuget: Ferret, 0.5.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 Ferret@0.5.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=Ferret&version=0.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Ferret&version=0.5.0
                    
Install as a Cake Tool

Ferret

Lexical (BM25), semantic and hybrid file search for .NET. Point it at some folders and search: it ranks whole files, best first, with excerpts, and keeps a persisted index so later searches are fast.

Install

dotnet add package Ferret

Use

open Ferret

use ferret = new FerretClient(FerretOptions(Roots = [| "docs" |]))
for doc in ferret.Search("how do I install it", 10, Hybrid).Docs do
    printfn "%.3f %s" doc.Score doc.File

Search takes Lexical, Semantic or Hybrid and returns a SearchResult: the ranked Docs and a Truncated flag that is true when more files ranked than the limit. Semantic and hybrid use a small local model that downloads on first use; EnsureModel() fetches it ahead of time. BuildIndex indexes ahead of the first search, Search and BuildIndex take a CancellationToken and have SearchAsync/BuildIndexAsync variants, and Grep does regex search like rg. FerretOptions sets the roots, cache directory, model directory, default mode, offline mode, extra ignore patterns and a progress callback.

The cache is shared with the ferret command (Ferret.Tool).

Docs and source: https://github.com/dburriss/ferret

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.0 40 11/30/2026
0.4.0 145 11/7/2026
0.3.0 140 11/1/2026
0.2.0 116 11/1/2026
0.1.0 115 11/1/2026

`--fuz`, ranked lexical search that tolerates typos: a query word found in no file stands for the indexed words within a few edits of it. A query whose words are all indexed ranks as `--lex` does. Corrections go to stderr, or into an `expansions` field on every `--jsonl` line. `--prefix` (with `--fuz` only) also lets the last word match indexed words that start with it.
`SearchMode.Fuzzy` and `FerretClient.SearchFuzzy(query, limit, prefix)`, which returns a `FuzzyResult`: the ranked files and the corrections made (`Expansion`: term, matched term, edit distance, kind).
`eval-relevance.fsx --ranker fuz|fuz-prefix` and an `entities` relevance dataset for identifier, typo and prefix queries.
The tokenizer splits camelCase and PascalCase words and also indexes the pieces, so `PaymentService` finds `PaymentsApi` through `payment`. The whole word is kept, so exact names still match. Existing lexical indexes rebuild on first use, and they grow by up to about a quarter on identifier-heavy code (a few percent on prose).