The problem: Claude Code is powerful (file ops, bash, code editing, subagents, MCP) but it's a CLI tool. If you want to use those capabilities from a web app, there wasn't a clean PHP interface.
This SDK communicates with Claude Code via subprocess, parses the streaming JSON output, and provides a fluent PHP API with full type safety.
Technical highlights: - Generator-based streaming (memory efficient) - Full message/content block parsing with typed classes - Subagent orchestration (delegate tasks to specialized agents) - MCP server integration (stdio + SSE) - JSON schema structured output - Session resume and fork for multi-turn conversations - PHP 8.1+ with readonly properties, enums, named args
It's MIT licensed. Would love feedback on the architecture and API design.