Give your notes AI capability by embedding Opencode OpenCode AI assistant directly in Obsidian:
Use cases:
This plugin uses OpenCode's web view that can be embedded directly into Obsidian window. Usually similar plugins would use the ACP protocol, but I want to see how how much is possible without having to implement (and manage) a custom chat UI - I want the full power of OpenCode in my Obsidian.
Note: plugin author is not afiliated with OpenCode or Obsidian - this is a 3rd party software.
The easiest way to install this plugin during beta is via BRAT (Beta Reviewer's Auto-update Tool):
mtymek/opencode-obsidianBRAT will automatically check for updates and notify you when new versions are available.
If you want to contribute or develop the plugin:
.obsidian/plugins/obsidian-opencode subdirectory under your vault's root:
git clone https://github.com/mtymek/opencode-obsidian.git .obsidian/plugins/obsidian-opencode
bun install && bun run build
Cmd/Ctrl+Shift+O to toggle the panelEnable "Use custom command" when you need more control over how OpenCode starts—for example, to add extra CLI flags, use a custom wrapper script, or run OpenCode through a container or virtual environment.
When using custom command:
--cors app://obsidian.md to allow Obsidian to embed the OpenCode interfaceExample:
opencode serve --port 14096 --hostname 127.0.0.1 --cors app://obsidian.md
Other settings (port, hostname, auto-start, view location, context injection) are available through the settings UI and are self-explanatory.
This plugin can automatically inject context to the running OC instance: list of open notes and currently selected text.
Currently, this is work-in-progress feature with some limitations - it won't work when creating new session from OC interface.
If you see "Executable not found at 'opencode'" despite opencode being installed:
Find your opencode.cmd path:
where opencode.cmd
Configure the full path in plugin settings:
C:\Users\{username}\AppData\Roaming\npm\opencode.cmd
This is due to Electron/Obsidian not fully inheriting PATH on Windows.
TypeScript
94.5%
CSS
4.3%
JavaScript
1.2%
Give your notes AI capability by embedding Opencode OpenCode AI assistant directly in Obsidian:
Use cases:
This plugin uses OpenCode's web view that can be embedded directly into Obsidian window. Usually similar plugins would use the ACP protocol, but I want to see how how much is possible without having to implement (and manage) a custom chat UI - I want the full power of OpenCode in my Obsidian.
Note: plugin author is not afiliated with OpenCode or Obsidian - this is a 3rd party software.
The easiest way to install this plugin during beta is via BRAT (Beta Reviewer's Auto-update Tool):
mtymek/opencode-obsidianBRAT will automatically check for updates and notify you when new versions are available.
If you want to contribute or develop the plugin:
.obsidian/plugins/obsidian-opencode subdirectory under your vault's root:
git clone https://github.com/mtymek/opencode-obsidian.git .obsidian/plugins/obsidian-opencode
bun install && bun run build
Cmd/Ctrl+Shift+O to toggle the panelEnable "Use custom command" when you need more control over how OpenCode starts—for example, to add extra CLI flags, use a custom wrapper script, or run OpenCode through a container or virtual environment.
When using custom command:
--cors app://obsidian.md to allow Obsidian to embed the OpenCode interfaceExample:
opencode serve --port 14096 --hostname 127.0.0.1 --cors app://obsidian.md
Other settings (port, hostname, auto-start, view location, context injection) are available through the settings UI and are self-explanatory.
This plugin can automatically inject context to the running OC instance: list of open notes and currently selected text.
Currently, this is work-in-progress feature with some limitations - it won't work when creating new session from OC interface.
If you see "Executable not found at 'opencode'" despite opencode being installed:
Find your opencode.cmd path:
where opencode.cmd
Configure the full path in plugin settings:
C:\Users\{username}\AppData\Roaming\npm\opencode.cmd
This is due to Electron/Obsidian not fully inheriting PATH on Windows.
TypeScript
94.5%
CSS
4.3%
JavaScript
1.2%