Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/web/src/content/docs/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -777,12 +777,12 @@ You can configure MCP servers you want to use through the `mcp` option.

[Plugins](/docs/plugins) extend OpenCode with custom tools, hooks, and integrations.

Place plugin files in `.opencode/plugins/` or `~/.config/opencode/plugins/`. You can also load plugins from npm through the `plugin` option.
Place plugin files in `.opencode/plugins/` or `~/.config/opencode/plugins/`. You can also load plugins through the `plugin` option with npm package specs, git-backed package specs, or `file://` URLs.

```json title="opencode.json"
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-helicone-session", "@my-org/custom-plugin"]
"plugin": ["opencode-helicone-session", "@my-org/custom-plugin", "file:///absolute/path/to/my-plugin.ts"]
}
```

Expand Down
18 changes: 16 additions & 2 deletions packages/web/src/content/docs/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,30 @@ Place JavaScript or TypeScript files in the plugin directory.

Files in these directories are automatically loaded at startup.

You can also reference a specific local plugin file from your config with a `file://` URL.

```json title="opencode.json"
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["file:///absolute/path/to/my-plugin.ts"]
}
```

---

### From npm

Specify npm packages in your config file.
Specify npm packages in your config file. Bun package specifiers are supported, including scoped packages and git-backed packages.

```json title="opencode.json"
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-helicone-session", "opencode-wakatime", "@my-org/custom-plugin"]
"plugin": [
"opencode-helicone-session",
"opencode-wakatime",
"@my-org/custom-plugin",
"opencode-scheduler@git+https://github.com/different-ai/opencode-scheduler.git"
]
}
```

Expand Down
Loading