ATProtoNet.Server.EntityFrameworkCore 0.4.0

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

ATProto.NET

CI

A comprehensive .NET 10 SDK for the AT Protocol. Build custom AT Protocol applications with your own Lexicon schemas, interact with Bluesky, or host your own PDS — all from clean, modern .NET APIs.

Source: Forgejo (canonical) · GitHub (mirror — issues & PRs welcome here)

⚠️ This repository was mainly built by a coding agent. Thorough testing has been conducted, and the maintainer (Grandiras) is a human.

Why ATProto.NET?

The AT Protocol isn't just Bluesky — it's an open protocol where one account works across many apps. Each app defines its own Lexicon schemas and stores records in the user's Personal Data Server (PDS). ATProto.NET makes it easy to build these custom applications in .NET.

The SDK is in 0.* because, while it's near feature-complete, it's mostly vibe-coded and won't be called "stable" until it has been put through real use. There's no fixed timeline for 1.0 — the more this project gets exercised, the sooner it happens.

At a glance

  • Custom Lexicon supportRecordCollection<T> for typed CRUD on your own record schemas, plus QueryAsync<T> / ProcedureAsync<T> for custom XRPC methods.
  • OAuth & identity — full AT Protocol OAuth (DPoP, PAR, PKCE), did:plc / did:web resolution, type-safe Did / Handle / AtUri / Nsid / Tid / RecordKey / Cid.
  • Bluesky, Chat, Ozoneapp.bsky.* (actors, feeds, graph, notifications, rich text, video), chat.bsky.* (conversations, DMs), tools.ozone.* (moderation).
  • Hosting — ASP.NET Core DI + JWT auth, Blazor components with cookie-based OAuth, .NET Aspire integration, and host your own PDS in-process via ATProtoNet.Pds.
  • Repository internals — typed firehose consumer with CID/signature verification, MST, CAR v1 parsing, DAG-CBOR, PLC directory client, P-256/K-256 crypto.
  • Lexicon toolingatproto-lexgen dotnet tool for bidirectional Lexicon JSON ↔ C#, schema diffing, and publishing.

Install

dotnet add package ATProtoNet

Additional packages (ATProtoNet.Server, ATProtoNet.Blazor, ATProtoNet.Aspire, ATProtoNet.Pds, ATProtoNet.Server.EntityFrameworkCore) and the atproto-lexgen dotnet tool are documented in the full package matrix.

A 30-second taste

The headline feature is RecordCollection<T> — strongly-typed CRUD on your own Lexicon schemas, stored in the user's PDS:

using ATProtoNet;
using System.Text.Json.Serialization;

// 1. Define your record type
public class TodoItem : AtProtoRecord
{
    public override string Type => "com.example.todo.item";

    [JsonPropertyName("title")]     public string Title { get; set; } = "";
    [JsonPropertyName("completed")] public bool Completed { get; set; }
}

// 2. Connect and authenticate
var client = new AtProtoClientBuilder()
    .WithInstanceUrl("https://bsky.social")
    .Build();
await client.LoginAsync("alice.bsky.social", "app-password");

// 3. Get a typed collection and do CRUD
var todos = client.GetCollection<TodoItem>("com.example.todo.item");

var created = await todos.CreateAsync(new TodoItem { Title = "Buy groceries" });

await foreach (var record in todos.EnumerateAsync())
    Console.WriteLine($"[{(record.Value.Completed ? "x" : " ")}] {record.Value.Title}");

One AT Protocol account can power many such apps — todos, bookmarks, recipes, whatever — each with its own Lexicons, all stored in the same user's PDS.

Where to go next

If you want to… Read
Install, configure the client, and authenticate Getting Started
Build your own AT Protocol app with custom records Custom Lexicon Records
Use OAuth (recommended for user-facing apps) OAuth Authentication
Wire AT Proto into an ASP.NET / Blazor backend ASP.NET Core, Blazor
Consume the firehose with typed events Firehose Streaming
Host your own PDS PDS Hosting
Understand how the packages compose Architecture
Everything else docs/index.md

Contributing

Issues and pull requests are welcome on GitHub (mirrored from Forgejo). See CONTRIBUTING.md for the dev setup, test workflow, and conventions.

License

MIT.

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.4.0 81 5/26/2026