summaryrefslogtreecommitdiffhomepage
path: root/packages/sdk/js/src/index.ts
blob: d133609f3017bada3fe321c6b5f9945a5cdcc5a3 (plain)
1
2
3
4
5
6
7
8
9
import { createClient } from "./gen/client/client"
import { type Config } from "./gen/client/types"
import { OpencodeClient } from "./gen/sdk.gen"
export * from "./gen/types.gen"

export function createOpencodeClient(config?: Config) {
  const client = createClient(config)
  return new OpencodeClient({ client })
}