diff --git a/LICENSE b/LICENSE index 16c1933..07388c0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 yukifoo +Copyright (c) 2024 Exafunction Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index c755370..9d4e363 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Claude Code SDK for Go -[![Go Reference](https://pkg.go.dev/badge/github.com/yukifoo/claude-code-sdk-go.svg)](https://pkg.go.dev/github.com/yukifoo/claude-code-sdk-go) -[![Go Report Card](https://goreportcard.com/badge/github.com/yukifoo/claude-code-sdk-go)](https://goreportcard.com/report/github.com/yukifoo/claude-code-sdk-go) +[![Go Reference](https://pkg.go.dev/badge/github.com/Exafunction/claude-code-sdk-go.svg)](https://pkg.go.dev/github.com/Exafunction/claude-code-sdk-go) +[![Go Report Card](https://goreportcard.com/badge/github.com/Exafunction/claude-code-sdk-go)](https://goreportcard.com/report/github.com/Exafunction/claude-code-sdk-go) A Go SDK for Claude Code that provides programmatic access to Claude's agentic coding capabilities. This SDK wraps the Claude Code CLI and provides a Go-native interface compatible with the TypeScript and Python SDKs. @@ -25,7 +25,7 @@ A Go SDK for Claude Code that provides programmatic access to Claude's agentic c ## Installation ```bash -go get github.com/yukifoo/claude-code-sdk-go +go get github.com/Exafunction/claude-code-sdk-go ``` ## Quick Start @@ -40,7 +40,7 @@ import ( "fmt" "log" - claudecode "github.com/yukifoo/claude-code-sdk-go" + claudecode "github.com/Exafunction/claude-code-sdk-go" ) func main() { @@ -86,7 +86,7 @@ import ( "fmt" "log" - claudecode "github.com/yukifoo/claude-code-sdk-go" + claudecode "github.com/Exafunction/claude-code-sdk-go" ) func main() { @@ -409,4 +409,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file - [Claude Code Documentation](https://docs.anthropic.com/en/docs/claude-code) - [Claude Code CLI](https://www.npmjs.com/package/@anthropic-ai/claude-code) - [Claude Code TypeScript SDK](https://www.npmjs.com/package/@anthropic-ai/claude-code) -- [Claude Code Python SDK](https://pypi.org/project/claude-code-sdk/) \ No newline at end of file +- [Claude Code Python SDK](https://pypi.org/project/claude-code-sdk/) diff --git a/examples/advanced/main.go b/examples/advanced/main.go index 6f7e43b..0327c0a 100644 --- a/examples/advanced/main.go +++ b/examples/advanced/main.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - claudecode "github.com/yukifoo/claude-code-sdk-go" + claudecode "github.com/Exafunction/claude-code-sdk-go" ) func main() { @@ -210,4 +210,4 @@ func boolPtr(b bool) *bool { func outputFormatPtr(format claudecode.OutputFormat) *claudecode.OutputFormat { return &format -} \ No newline at end of file +} diff --git a/examples/basic/main.go b/examples/basic/main.go index ee4a0da..cf12c36 100644 --- a/examples/basic/main.go +++ b/examples/basic/main.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - claudecode "github.com/yukifoo/claude-code-sdk-go" + claudecode "github.com/Exafunction/claude-code-sdk-go" ) func main() { @@ -69,4 +69,4 @@ func stringPtr(s string) *string { func outputFormatPtr(format claudecode.OutputFormat) *claudecode.OutputFormat { return &format -} \ No newline at end of file +} diff --git a/examples/go.mod b/examples/go.mod index d258d78..10fe3bd 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -1,5 +1,7 @@ -module github.com/yukifoo/claude-code-sdk-go/examples +module github.com/Exafunction/claude-code-sdk-go/examples go 1.21 -require github.com/yukifoo/claude-code-sdk-go v0.0.0-20250618104949-578ca6b454e8 +require github.com/Exafunction/claude-code-sdk-go v0.0.0-00010101000000-000000000000 + +replace github.com/Exafunction/claude-code-sdk-go => ../ diff --git a/examples/quick_start.go b/examples/quick_start.go index 486517e..0fd8804 100644 --- a/examples/quick_start.go +++ b/examples/quick_start.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - claudecode "github.com/yukifoo/claude-code-sdk-go" + claudecode "github.com/Exafunction/claude-code-sdk-go" ) // basicExample demonstrates a simple question @@ -88,8 +88,8 @@ func withToolsExample(ctx context.Context) { } } case *claudecode.ResultMessage: - if msg.CostUSD > 0 { - fmt.Printf("\nCost: $%.4f\n", msg.CostUSD) + if msg.TotalCostUSD != nil && *msg.TotalCostUSD > 0 { + fmt.Printf("\nCost: $%.4f\n", *msg.TotalCostUSD) } } } @@ -115,4 +115,4 @@ func intPtr(i int) *int { func stringPtr(s string) *string { return &s -} \ No newline at end of file +} diff --git a/examples/streaming/main.go b/examples/streaming/main.go index dbc261e..9228055 100644 --- a/examples/streaming/main.go +++ b/examples/streaming/main.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - claudecode "github.com/yukifoo/claude-code-sdk-go" + claudecode "github.com/Exafunction/claude-code-sdk-go" ) func main() { @@ -114,4 +114,4 @@ func boolPtr(b bool) *bool { func outputFormatPtr(format claudecode.OutputFormat) *claudecode.OutputFormat { return &format -} \ No newline at end of file +} diff --git a/go.mod b/go.mod index 561b78b..8218df6 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/yukifoo/claude-code-sdk-go +module github.com/Exafunction/claude-code-sdk-go go 1.21