feat: Add OpenCode CLI integration instructions to READMEs and provide an example configuration file.

This commit is contained in:
CJACK committed 2026-02-17 13:44:14 +08:00
1 parent 7dcddef91f
commit d0549c27c7
3 files changed
+54

No files matched your search

+16
View File
@@ -148,6 +148,22 @@ cp config.example.json config.json
./ds2api
```
### Option 5: OpenCode CLI
1. Copy the example config:
```bash
cp opencode.json.example opencode.json
```
2. Edit `opencode.json`:
- Set `baseURL` to your DS2API endpoint (for example, `https://your-domain.com/v1`)
- Set `apiKey` to your DS2API key (from `config.keys`)
3. Start OpenCode CLI in the project directory (run `opencode` using your installed method).
> Recommended: use the OpenAI-compatible path (`/v1/*`) via `@ai-sdk/openai-compatible` as shown in the example.
## Configuration
### `config.json` Example