C3OSS.Codexcw 0.5.1

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

C3OSS.Codexcw

Run Codex, Claude Code, and Grok Build non-interactively from .NET. C3OSS.Codexcw wraps codex exec --json, Claude stream-json, and Grok streaming-messages-json with --no-auto-update. It spawns agent processes, decodes JSONL events, and exposes each run as async event streams, callbacks, results, and typed exceptions.

Codex defaults are automation-friendly: JSONL streaming, ephemeral sessions, read-only sandbox, approval policy never, color disabled, and the Git repository check skipped. New Grok runs use read-only sandboxing and dontAsk permissions, and Grok always persists sessions.

The selected agent's executable must be available on PATH, authenticated, and new enough for the wrapped mode: codex must support codex exec --json, claude must support --output-format stream-json, and grok must support streaming-messages-json.

Quickstart

using C3OSS.Codexcw;

var runner = new Runner();
var result = await runner.RunAsync(new Request { Prompt = "say hi" });
Console.WriteLine(result.FinalMessage);

Streaming

using var session = runner.Start(new Request { Prompt = "summarize this repo" });
await foreach (var evt in session.Events())
{
    if (evt.ItemCompleted?.Item is { Kind: ItemKind.AgentMessage } item)
    {
        Console.WriteLine(item.Text);
    }
}
var result = await session.WaitAsync();

Full recipes (resume, sandbox and approval modes, batches, structured output, the Claude and Grok agents, account usage, error handling) live in the repository: https://github.com/c3-oss/codexcw/blob/master/docs/examples/csharp.md.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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 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.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

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.1 105 8/31/2026
0.5.0 103 8/28/2026
0.4.1 162 7/17/2026
0.4.0 108 7/17/2026