opencode/packages/sdk/js/example/test.ts
2025-08-27 11:51:40 -04:00

11 lines
274 B
TypeScript

import { createOpencodeClient, createOpencodeServer } from "../src/index"
const client = createOpencodeClient({
baseUrl: "http://localhost:4096",
})
await client.event.subscribe().then(async (event) => {
for await (const e of event.stream) {
console.log(e)
}
})