MoonBit SDKs for OpenCode CLI execution and managed Server lifecycle
///|
async test "CLI usage - requests a repository explanation" {
let client = @opencode.Client::Client()
let turn = client.start_thread().run(
@opencode.Input::Prompt("Explain this repository in one paragraph"),
)
println(turn.final_response)
}moon add totto2727/opencode-sdk@0.4.2///|
import {
"totto2727/opencode-sdk/cli" @opencode,
}moon add moonbitlang/async@0.21.0///|
import {
"moonbitlang/async",
"totto2727/opencode-sdk/server" @opencode,
}Install
Download zipMoonBit SDKs for OpenCode CLI execution and managed Server lifecycle