OpenCode SDK
OpenCode AI agents official node SDK which you can use build custom workflows which leverages the OpenCode under the hood.
How to get started?
Just install the package
npm install @opencode-ai/sdk
import { createOpencode } from "@opencode-ai/sdk"
const opencode = await createOpencode({
hostname: "127.0.0.1",
port: 4096,
config: {
model: "anthropic/claude-3-5-sonnet-20241022",
},
})
console.log(`Server running at ${opencode.server.url}`)
opencode.server.close()