Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Declaw Go SDK

Go client SDK for Declaw — security-first sandboxing for AI agents.

Installation

go get github.com/declaw-ai/declaw-go

Requires Go 1.22+.

Quick start

package main

import (
    "context"
    "fmt"
    "log"

    declaw "github.com/declaw-ai/declaw-go"
)

func main() {
    ctx := context.Background()

    sbx, err := declaw.Create(ctx, declaw.WithTimeout(300))
    if err != nil {
        log.Fatal(err)
    }
    defer sbx.Kill(ctx)

    result, err := sbx.Commands.Run(ctx, "echo hello from declaw")
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println(result.Stdout)
}

Set your API key via environment variable:

export DECLAW_API_KEY=your-api-key

Documentation

Full reference: docs.declaw.ai/sdks/go

License

Apache 2.0 — see LICENSE for details.

Releases

Packages

Used by

Contributors

Languages