Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 31 Dec 07:44
· 75 commits to main since this release

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

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