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
- Your app creates a
Codexclient and aThread. - The SDK spawns the
codexCLI and sends your prompt over stdin. - The CLI emits JSONL events over stdout.
- 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).