Back to articles
ClaudeGate: wrapping Claude Code CLI as an async REST API in Go
How-ToSystems

ClaudeGate: wrapping Claude Code CLI as an async REST API in Go

via Dev.toOdilon HUGONNOT

Claude Code is a great CLI tool. You run it, it reads your codebase, it thinks, it writes code. But the moment you want to integrate it into a pipeline — a CI step, a backend service, a custom dashboard — you hit a wall. The CLI is a black box: you feed it via stdin, you read its stdout, and there is no HTTP interface, no job queue, no way to poll status, no streaming endpoint. Nothing. I built ClaudeGate to solve exactly that. It wraps the Claude Code CLI into a proper REST API with an async job queue, SSE streaming, webhook callbacks, and SQLite persistence. The whole thing ships as a single static Go binary. No CGO, no runtime dependencies, no surprise. Why Go, and why a gateway pattern Claude Code already knows how to run code. My job was not to reimplement intelligence — it was to build the plumbing around it. A gateway pattern is the right fit here: take an opaque subprocess, wrap it with a proper async API, add persistence and observability, expose clean HTTP endpoints. Go was t

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles