Disclaimer: This is an unofficial community-driven project. It is not affiliated with, maintained, or endorsed by the OpenCode team or opencode.ai.
Opencodian is an Obsidian plugin that embeds OpenCode as a sidebar chat interface. By treating your Obsidian vault as the working directory, it provides full agentic capabilities, including file reading/writing, bash command execution, and complex multi-step workflows.
Its functionality is proven effective on Windows, not yet on MacOS or Linux. Ideally, change the OpenCode binary to that on MacOS or Linux should work.
Opencodian ships with a dedicated OpenCode runtime and does not use any system-wide OpenCode installation.
To start successfully, the plugin must contain:
-
Bundled OpenCode binary (platform-specific)
- Windows:
.obsidian/plugins/opencodian/bin/win/opencode.exe - macOS:
.obsidian/plugins/opencodian/bin/mac/opencode - Linux:
.obsidian/plugins/opencodian/bin/linux/opencode
- Windows:
-
Plugin-local OpenCode config directory
.obsidian/plugins/opencodian/.opencode/opencode.jsonor.obsidian/plugins/opencodian/.opencode/opencode.jsonc
For now, please copy your existing OpenCode config from ~/.config/opencode/ into .obsidian/plugins/opencodian/.opencode/.
In a future release, configuration will be managed directly inside the Opencodian settings UI.
OpenCode supports JSON and JSONC config. See the official docs for format and schema:
Opencodian uses a plugin-local config directory instead of the default global/project locations. It sets OPENCODE_CONFIG_DIR to .obsidian/plugins/opencodian/.opencode and disables project config discovery so your vault is not scanned.
The bundled runtime is pinned to OpenCode v1.1.56 from the reference repository tag. Use the OpenCode release artifacts for that version and place the binary in the paths above.
You can find official install and release information here:
- Embedded AI Agent: Integrate OpenCode directly into your Obsidian sidebar.
- Vault Context: The agent operates with your vault as its working directory.
- Agentic Capabilities: Supports file operations, terminal commands, and autonomous workflows.
- Custom system prompts
- MCP server integration
- Subscription-aware model selection
- Cross-conversation memory
- Download the latest release from the Releases page.
- Navigate to your Obsidian vault's plugin directory:
<YourVaultPath>/.obsidian/plugins/. - Create a new folder named
opencodian. - Extract the downloaded files into this new folder.
- copy your existing OpenCode config from
~/.config/opencode/into.obsidian/plugins/opencodian/.opencode/. - Restart Obsidian or reload plugins.
- Enable "Opencodian" in Settings > Community plugins.
- Clone this repository.
- Install dependencies:
npm install
- Build the plugin:
npm run build
- Run the release script to build and package the plugin:
This creates a zip file in release-temp/
.\scripts\package-release.ps1 - Extract the generated zip (opencodian-windows-opencode-*.zip) into your vault's plugin directory:
<YourVaultPath>/.obsidian/plugins/opencodian/ - Copy your global OpenCode configuration to the plugin folder:
<YourVaultPath>\.obsidian\plugins\opencodian\.opencode\ - Enable the plugin in Obsidian settings.
- Build:
npm run build - Dev Mode:
npm run dev - Lint:
npm run lint
Special thanks to: