v2 SDK entry point. Re-exports the v2 client/server factories and the data helpers, and provides createOpencode to boot a server and return a client already connected to it.

Methods

(static) createOpencode(optionsopt) → {Promise.<{client: OpencodeClient, server: {url: string, close: function()}}>}

Start a closedcode server and return a v2 client connected to it.

Parameters:
NameTypeAttributesDescription
optionsObject<optional>

Server options forwarded to module:sdk/v2/server.createOpencodeServer (hostname, port, timeout, config, signal).

Returns:

The connected client and the running server handle.

Type: 
Promise.<{client: OpencodeClient, server: {url: string, close: function()}}>