Skip to content

logo

CodexNet

A simple, strongly typed SDK to run the Codex CLI from .NET and consume JSONL events as a structured stream. You can be running your first turn in minutes.

You do not need an OpenAI API key to use this SDK. It is enough to use a ChatGPT account with Codex access enabled.

Why use it

  • Fast to integrate: a few lines of code to start a thread.
  • Streaming-friendly: react to intermediate events and tool activity.
  • Flexible inputs: send text, images, and structured output schemas.
  • No aditional costs, you can just login with your ChatGPT account.

How it works

  1. Your app creates a Codex client and a Thread.
  2. The SDK spawns the codex CLI and sends your prompt over stdin.
  3. The CLI emits JSONL events over stdout.
  4. The SDK parses events into .NET types and returns the final turn.

Quick start

Ready to go? Start with Getting Started and follow the step-by-step setup.

Attribution and disclosure

  • This SDK is based on the official TypeScript SDK implementation: openai/codex.
  • A significant portion of the codebase and documentation was generated with Codex (AI-assisted).