Skip to content

Releases: severity1/claude-agent-sdk-go

v0.6.3

04 Jan 06:17

Choose a tag to compare

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

📦 View on pkg.go.dev

Changelog

Bug fixes

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

01 Jan 07:30
ca09c25

Choose a tag to compare

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

View on pkg.go.dev

Changelog

Documentation

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.StructuredOutput

17. 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 indicators

20. 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

01 Jan 07:00
a112689

Choose a tag to compare

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

View on pkg.go.dev

Changelog

Chores

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

31 Dec 07:44

Choose a tag to compare

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

View on pkg.go.dev

Changelog

Features

Tests

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

31 Dec 02:27

Choose a tag to compare

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

📦 View on pkg.go.dev

Changelog

Features

Bug Fixes

Documentation

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

29 Dec 11:36
14d1274

Choose a tag to compare

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

📦 View on pkg.go.dev

Changelog

Features

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

29 Dec 10:32
0b32651

Choose a tag to compare

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

📦 View on pkg.go.dev

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 stderr callback behavior with 100% parity
  • Precedence: StderrCallback > DebugWriter > temp file (default)

Full Changelog: v0.5.0...v0.5.1

Resources

v0.5.0

29 Dec 09:10
3082282

Choose a tag to compare

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

📦 View on pkg.go.dev

Changelog

Features

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

21 Dec 05:04
1c7a81e

Choose a tag to compare

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

📦 View on pkg.go.dev

Changelog

Features

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

20 Dec 09:44
6491bbf

Choose a tag to compare

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

📦 View on pkg.go.dev

Changelog

Features

Bug fixes

SDK Release Notes

This Go SDK provides 100% Python SDK parity with Go-native patterns.

Full Changelog: v0.3.2...v0.3.3

Resources