Releases: severity1/claude-agent-sdk-go
v0.6.3
Claude Agent SDK for Go v0.6.3
Go library for Claude Code CLI integration with Query and Client APIs.
Installation
go get github.com/severity1/[email protected]Usage
import "github.com/severity1/claude-agent-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
Bug fixes
- 10432a7: fix: Improve session management example output and add WithResume demo (Issue #69) (#76) (@severity1)
SDK Release Notes
This Go SDK provides 100% Python SDK parity with Go-native patterns.
Full Changelog: v0.6.2...v0.6.3
Resources
v0.6.2
Claude Agent SDK for Go v0.6.2
Go library for Claude Code CLI integration with Query and Client APIs.
Installation
go get github.com/severity1/[email protected]Usage
import "github.com/severity1/claude-agent-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
Documentation
- ca09c25: docs: Add examples for SDK features (Issue #67) (#68) (@severity1)
Highlights
New Examples for Advanced SDK Features (Issue #67)
Added 6 new examples demonstrating advanced SDK capabilities:
15. Programmatic Subagents
Define specialized agents programmatically:
claudecode.WithAgent("code-reviewer", claudecode.AgentDefinition{
Description: "Reviews code for best practices",
Prompt: "You are a code reviewer...",
Tools: []string{"Read", "Grep"},
Model: claudecode.AgentModelSonnet,
})16. Structured Output
Constrain responses to JSON schemas:
schema := map[string]any{
"type": "object",
"properties": map[string]any{
"tasks": map[string]any{"type": "array"},
},
}
claudecode.WithJSONSchema(schema)
// Access: resultMsg.StructuredOutput17. Plugin Configuration
Load custom plugins:
claudecode.WithLocalPlugin("/path/to/plugin")
claudecode.WithPlugins([]claudecode.SdkPluginConfig{...})18. Sandbox Security
Configure sandboxed bash execution:
claudecode.WithSandboxEnabled(true)
claudecode.WithAutoAllowBashIfSandboxed(true)
claudecode.WithSandboxNetwork(&claudecode.SandboxNetworkConfig{
AllowUnixSockets: []string{"/var/run/docker.sock"},
})19. Partial Streaming
Real-time streaming updates:
claudecode.WithPartialStreaming()
// Handle StreamEvent messages for typing indicators20. Debugging and Diagnostics
Debug output and health monitoring:
claudecode.WithDebugStderr()
claudecode.WithStderrCallback(func(line string) { ... })
info, _ := client.GetServerInfo(ctx)
stats := client.GetStreamStats()README Updates
- Added Learning Path section 6 (examples 13-20)
- Added Expert Level example descriptions
- Added Tools Presets documentation
SDK Release Notes
This Go SDK provides 100% Python SDK parity with Go-native patterns.
Full Changelog: v0.6.1...v0.6.2
Resources
v0.6.1
Claude Agent SDK for Go v0.6.1
Go library for Claude Code CLI integration with Query and Client APIs.
Installation
go get github.com/severity1/[email protected]Usage
import "github.com/severity1/claude-agent-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
Chores
- a112689: chore: Rename project to claude-agent-sdk-go (#66) (@severity1)
Highlights
Project Rename (Issue #66)
The SDK has been renamed from claude-code-sdk-go to claude-agent-sdk-go to better reflect its purpose as an agent development toolkit.
New import path:
import "github.com/severity1/claude-agent-sdk-go"Migration: Update your go.mod and imports:
go get github.com/severity1/[email protected]SDK Release Notes
This Go SDK provides 100% Python SDK parity with Go-native patterns.
Full Changelog: v0.6.0...v0.6.1
Resources
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/[email protected]Usage
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
Resources
v0.5.3
Claude Code SDK for Go v0.5.3
Go library for Claude Code CLI integration with Query and Client APIs.
Installation
go get github.com/severity1/[email protected]Usage
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
- 924759f: feat: Add Hook System for Lifecycle Events (Issue #9) (#63) (@severity1)
- 4fb08ad: feat: Add Permission Callback System (Issue #8) (#62) (@severity1)
- 726eca3: feat: Add SetModel and SetPermissionMode methods (Issues #51, #52) (#61) (@severity1)
Bug Fixes
- 5844bd8: fix: Initialize control protocol when hooks are configured (@severity1)
Documentation
- 84bd0cf: docs: Add hook system example (12_hooks) (@severity1)
SDK Release Notes
This Go SDK provides 100% Python SDK parity with Go-native patterns.
Full Changelog: v0.5.2...v0.5.3
Resources
v0.5.2
Claude Code SDK for Go v0.5.2
Go library for Claude Code CLI integration with Query and Client APIs.
Installation
go get github.com/severity1/[email protected]Usage
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
- 14d1274: feat: Add GetServerInfo method for diagnostics (Issue #13) (#60) (@severity1)
SDK Release Notes
This Go SDK provides 100% Python SDK parity with Go-native patterns.
Full Changelog: v0.5.1...v0.5.2
Resources
v0.5.1
Claude Code SDK for Go v0.5.1
Go library for Claude Code CLI integration with Query and Client APIs.
Installation
go get github.com/severity1/[email protected]Usage
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
- 0b326514ebcb86ea4f2fd0e91a95afd22b80cdef: feat: Add stderr callback for CLI output streaming (Issue #53) (#59) (@severity1)
SDK Release Notes
This Go SDK provides 100% Python SDK parity with Go-native patterns.
New in v0.5.1
- Stderr Callback Support: New
WithStderrCallback()option for receiving CLI stderr output line-by-line via callback function - Matches Python SDK's
stderrcallback behavior with 100% parity - Precedence: StderrCallback > DebugWriter > temp file (default)
Full Changelog: v0.5.0...v0.5.1
Resources
v0.5.0
Claude Code SDK for Go v0.5.0
Go library for Claude Code CLI integration with Query and Client APIs.
Installation
go get github.com/severity1/[email protected]Usage
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
- c238033: feat: Add control protocol infrastructure (Issue #10) (#56) (@severity1)
- 3082282: feat: Add partial message streaming support (Issue #30) (#58) (@severity1)
SDK Release Notes
This Go SDK provides 100% Python SDK parity with Go-native patterns.
Full Changelog: v0.4.0...v0.5.0
Resources
v0.4.0
Claude Code SDK for Go v0.4.0
Go library for Claude Code CLI integration with Query and Client APIs.
Installation
go get github.com/severity1/[email protected]Usage
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
- 0e0eaa0: feat: Add debug writer support with io.Writer interface (Issue #12) (#47) (@severity1)
- 39811ad: feat: Add plugins configuration support (Issue #34) (#48) (@severity1)
- 1c7a81e: feat: Add programmatic subagents support (Issue #31) (#50) (@severity1)
- 77c2cea: feat: Add sandbox settings support (Issue #33) (#49) (@severity1)
- 68d2524: feat: Add structured output support (Issue #29) (#46) (@severity1)
SDK Release Notes
This Go SDK provides 100% Python SDK parity with Go-native patterns.
Full Changelog: v0.3.3...v0.4.0
Resources
v0.3.3
Claude Code SDK for Go v0.3.3
Go library for Claude Code CLI integration with Query and Client APIs.
Installation
go get github.com/severity1/[email protected]Usage
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
- 6491bbf: feat: Add session management options (Issue #28) (#45) (@severity1)
Bug fixes
- cc4eadc: fix: change ResultMessage.Result type from map to string (Issue #18) (#44) (@severity1)
SDK Release Notes
This Go SDK provides 100% Python SDK parity with Go-native patterns.
Full Changelog: v0.3.2...v0.3.3