Corfedo.Client 0.0.2

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

Corfedo.Client

CI .NET 10 License: Apache-2.0 Documentation

Search and read code across every repository your Corfedo workspace indexes, and ask Corfedo AI, from .NET.

Corfedo is a self-hosted code search and AI service. It indexes the repositories you choose across your code hosts and answers searches and questions across them, for people and coding agents. Corfedo.Client is the typed, framework-neutral client for its public HTTP API: code search, file, tree and symbol reads, saved contexts, dependency and security reads, Corfedo AI runs, and API-key or browser sign-in. It is NativeAOT-compatible and has no framework dependencies.

To give your own model Corfedo's tools, or to use Corfedo AI as an IChatClient, add Corfedo.Extensions.AI.

Install

dotnet add package Corfedo.Client

The package targets .NET 10.

Quick start

Create an API key in your Corfedo workspace and download its key file. The key file holds the API address and the key's connection binding (API keys).

using Corfedo.Client;
using Corfedo.Client.Models;

using var corfedo = await CorfedoClient.FromApiKeyFileAsync("/run/secrets/corfedo.key.json");

var page = await corfedo.Search.SearchAsync(new SearchCode { Query = "where are search requests parsed" });
foreach (var hit in page.Results.OfType<CodeFileSearchResult>())
    Console.WriteLine($"{hit.Repository} {hit.Path} @{hit.Revision}");

Bare words find the most relevant files, text in double quotes matches exactly, /…/ is a regular expression, and filters such as repo:, file: and lang: narrow the search. The sample application adds coverage and continuation handling.

Sign in as a person

Local tools can sign a person in through the browser instead of using an API key:

using Corfedo.Client;
using Corfedo.Client.Authentication;

var credentials = await CorfedoAuthentication.SignInAsync(new()
{
    ApiBaseUri = new Uri("https://corfedo.example.com/")
});
using var proofKey = credentials.ProofKey;   // the session's proof key; the caller owns it
using var corfedo = new CorfedoClient(credentials);

Ask Corfedo AI

With the Ask Corfedo AI permission, corfedo.Ai sends a message to Corfedo AI and streams its run. Corfedo keeps the conversation and answers with links to the lines it used. Sending a message needs the scopes corfedo:ai:invoke and corfedo:repositories:code:read. Browser sign-in requests corfedo:ai:invoke only when HumanAuthenticationOptions.Scopes lists it, and a custom scope list keeps offline_access.

The example continues either setup above and needs using Corfedo.Client.Models; at the top of the file, which the API-key quick start already has.

var run = corfedo.Ai.Stream(new() { Text = "How does shard selection work?" });
await foreach (var item in run)
    if (item is AiTextDeltaEvent delta) Console.Write(delta.Text);   // provisional text
Console.WriteLine(run.Answer?.GetString());                          // the final Markdown answer

Your own functions can join a run as client-owned tools.

Documentation

License

Apache-2.0, see LICENSE and NOTICE. The bundled API contract has its own notice in contracts/NOTICE. Corfedo names, logos and brand assets are reserved and not covered by these licenses.

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 (1)

Showing the top 1 NuGet packages that depend on Corfedo.Client:

Package Downloads
Corfedo.Extensions.AI

Corfedo search and read functions for Microsoft.Extensions.AI.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.2 46 11/29/2026
0.0.1 65 11/29/2026