Norbert.Codex.Cli
0.1.0
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Norbert.Codex.Cli --version 0.1.0
NuGet\Install-Package Norbert.Codex.Cli -Version 0.1.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="Norbert.Codex.Cli" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Norbert.Codex.Cli" Version="0.1.0" />
<PackageReference Include="Norbert.Codex.Cli" />
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 Norbert.Codex.Cli --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Norbert.Codex.Cli, 0.1.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 Norbert.Codex.Cli@0.1.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=Norbert.Codex.Cli&version=0.1.0
#tool nuget:?package=Norbert.Codex.Cli&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Norbert
Lightweight .NET library for bridging applications with AI agents through pluggable connectors.
What is Norbert?
Norbert provides a clean abstraction layer between your .NET application and AI agents like Claude, Codex, or any future provider. Instead of coupling your code to a specific AI service, you program against Norbert's interfaces and swap connectors as needed.
Your App → Norbert → Claude CLI
→ Claude API (future)
→ OpenAI (future)
→ Your own connector
Quick Start
Install
dotnet add package Norbert
dotnet add package Norbert.Claude.Cli
dotnet add package Norbert.Codex.Cli
Configure
builder.Services.AddNorbert(norbert =>
{
norbert.UseClaudeCli(cli =>
{
cli.DefaultModel = "claude-sonnet-4-20250514";
});
});
Use
public class ChatService
{
private readonly IAgentConnector _connector;
public ChatService(IAgentConnector connector)
{
_connector = connector;
}
public async Task<string> AskAsync(string question)
{
var request = new AgentRequest { Prompt = question };
var response = await _connector.SendAsync(request);
return response.Content;
}
}
Stream
var request = new AgentRequest { Prompt = "Write a poem about .NET" };
await foreach (var chunk in connector.StreamAsync(request))
{
if (chunk.Type == ChunkType.Text)
{
Console.Write(chunk.Content);
}
}
Sessions (conversation with history)
await session.SendAsync("What is CQRS?");
await session.SendAsync("How does it relate to Event Sourcing?");
// The agent remembers the first question
// Export for persistence
SessionSnapshot snapshot = session.Export();
string json = JsonSerializer.Serialize(snapshot);
Packages
| Package | Description |
|---|---|
Norbert |
Core library: interfaces, models, DI, sessions |
Norbert.Claude.Cli |
Connector for Claude CLI (claude -p ...) |
Norbert.Codex.Cli |
Connector for Codex CLI (codex exec --json ...) |
Key Features
- Pluggable connectors — swap AI providers without changing application code
- Streaming —
IAsyncEnumerable<StreamingChunk>with typed chunks (Text, Thinking, Command, Error, etc.) - Session management — in-memory conversation history with export/restore for persistence
- Dependency injection — standard
IServiceCollectionintegration with fluent builder - Thread-safe — concurrent session management via
ConcurrentDictionary
Documentation
Full documentation with examples, usage patterns, and API reference:
| English | Espanol | |
|---|---|---|
| Getting Started | Read | Leer |
| Core Concepts | Read | Leer |
| Models Reference | Read | Leer |
| Sessions In-Depth | Read | Leer |
| Dependency Injection | Read | Leer |
| Error Handling | Read | Leer |
| Claude CLI Connector | Read | Leer |
| Codex CLI Connector | Read | Leer |
Project Structure
src/
├── Norbert/ # Core library
│ ├── Abstractions/ # IAgentConnector, IAgentSession
│ ├── Constants/ # Internal constants
│ ├── Exceptions/ # NorbertException, ConnectorException
│ ├── Extensions/ # NorbertBuilder, DI extensions
│ ├── Internal/ # AgentSession, SessionManager
│ ├── Models/ # Request, Response, Chunk, Message, etc.
│ └── Options/ # ConnectorOptions
├── Norbert.Claude.Cli/ # Claude CLI connector
│ ├── Constants/ # ClaudeCliConstants
│ ├── Extensions/ # UseClaudeCli() builder extension
│ ├── Internal/ # ProcessManager, Executor, JsonParser
│ └── Options/ # ClaudeCliOptions
├── Norbert.Codex.Cli/ # Codex CLI connector
│ ├── Constants/ # CodexCliConstants
│ ├── Extensions/ # UseCodexCli() builder extension
│ ├── Internal/ # ProcessManager, Executor, JsonParser
│ └── Options/ # CodexCliOptions
tests/
├── Norbert.Tests/
├── Norbert.Claude.Cli.Tests/
├── Norbert.Codex.Cli.Tests/
samples/
├── Norbert.Sample.Api/ # ASP.NET example with SSE streaming
Requirements
- .NET 9.0+
- Claude CLI installed and in PATH (for
Norbert.Claude.Cli) - Codex CLI installed and in PATH (for
Norbert.Codex.Cli)
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Norbert (>= 0.1.0)
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.1.1-preview.0.2 | 52 | 4/10/2026 |
| 0.1.1-preview.0.1 | 61 | 4/10/2026 |
| 0.1.0 | 105 | 4/10/2026 |
| 0.0.0-preview.0.6 | 52 | 4/10/2026 |
| 0.0.0-preview.0.5 | 50 | 4/10/2026 |