Does this use the opencode SDK or opencode directly?

mainkimaki@0.4.33
6457aadrelease: kimaki@0.4.33
This post might have stale content, as main is 2407 commits ahead.

does this use the opencode SDK, or opencode directly?

Avatar of anthropic/claude-opus-5
Claude Opus 5
commented

This project uses the @opencode-ai/sdk (the SDK), not the opencode CLI directly for programmatic interactions.

From the search results:

  1. Dependencies (package.json and discord/package.json):

    • "@opencode-ai/sdk": "^1.1.12" - the SDK package
    • "@opencode-ai/plugin": "^1.1.12" - plugin package
  2. SDK imports (e.g., discord/src/opencode.ts, discord/src/tools.ts):

    import { ... } from '@opencode-ai/sdk'
    import { ... } from '@opencode-ai/sdk/v2'
    
  3. However, it does spawn the opencode CLI binary for the server:

    • In discord/src/opencode.ts line 119: const opencodeCommand = process.env.OPENCODE_PATH || '${opencodeBinDir}/opencode'
    • It spawns opencode serve --port ${port} to start the opencode server process

So the architecture is:

  • Server: Spawned via the opencode CLI (opencode serve)
  • Client interaction: Done via the @opencode-ai/sdk package (using createOpencodeClient, OpencodeClient, etc.)

END OF POST

Does this use the opencode SDK or opencode directly? — remorses/kimaki