Repository navigation
v0.6.0
Claude Code SDK for Go v0.6.0
Go library for Claude Code CLI integration with Query and Client APIs.
Installation
go get github.com/severity1/claude-code-sdk-go@v0.6.0Usage
import "github.com/severity1/claude-code-sdk-go"
// Query API (one-shot)
messages, err := claudecode.Query(ctx, "Hello!")
// Client API (streaming)
err := claudecode.WithClient(ctx, func(client claudecode.Client) error {
return client.Query(ctx, "Hello!")
})Documentation
Changelog
Features
- 833bd72: feat: Add File Checkpointing and Rewind Support (Issue #32) (#64) (@severity1)
- 2fd85b2: feat: Add In-Process SDK MCP Server Support (Issue #7) (#65) (@severity1)
Tests
- 3da448d: test: Add test coverage for WithSdkMcpServer option (@severity1)
Highlights
File Checkpointing (Issue #32)
Track file changes during sessions and rewind to any checkpoint:
client := claudecode.NewClient(claudecode.WithFileCheckpointing())
// ... capture UUID from UserMessage
err := client.RewindFiles(ctx, messageUUID)In-Process SDK MCP Server (Issue #7)
Define custom tools that run in-process (Go equivalent of Python's @tool decorator):
addTool := claudecode.NewTool("add", "Add two numbers", schema, handler)
calculator := claudecode.CreateSDKMcpServer("calc", "1.0.0", addTool)
client := claudecode.NewClient(claudecode.WithSdkMcpServer("calc", calculator))SDK Release Notes
This release achieves 100% Python SDK feature parity with Go-native patterns.
Full Changelog: v0.5.3...v0.6.0