Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/anomalyco/opencode
/ example.ts
File
example.ts
packages/sdk/js/example/example.ts:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
import
{ createOpencodeClient, createOpencodeServer } from
"@opencode-ai/sdk"
2
import
{ pathToFileURL } from
"bun"
3
4
const
server =
await
createOpencodeServer()
Callers
nothing calls this directly
Calls
7
createOpencodeServer
Function · 0.90
createOpencodeClient
Function · 0.90
push
Method · 0.80
create
Method · 0.65
prompt
Method · 0.65
log
Method · 0.45
all
Method · 0.45
Tested by
no test coverage detected