Claude CLI is not just a widely used vibe coding tool, but also the engine powering pretty much every client side tools Anthropic made available, sdk, Claude Cowork, you name it.
Claude CLI exposes a JSON/RPC interface over stdio/stdout. But the protocol is largely undocumented. Fortunately, the python sdk is open source.
By asking Claude to write code to exercise the SDK and capture the messages, we can establish a much better understanding of the protocol.
So here comes this repo https://github.com/mzhaom/claude-cli-protocol
With that, I hope efforts like building the SDK in a new language, creating another UI for Claude CLI becomes much easier.
Feedback and PRs are welcome!