Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

OpenCode

krisspykrisspy12k downloads

Use OpenCode CLI without leaving your vault.

Add to Obsidian
OpenCode screenshot
  • Overview
  • Scorecard
  • Updates25

A plugin that embeds the OpenCode CLI directly into Obsidian. Browse conversation history and resume work without leaving your vault.

Features

  • Native OpenCode Execution: Runs the OpenCode CLI directly inside Obsidian using an integrated terminal, ensuring smooth performance for long sessions.
  • Vault-Centric Workflow: Automatically spawns the agent in your vault's root, ensuring it has immediate access to your notes and project files.
  • Drag and Drop Context: Drop notes from Obsidian's file explorer directly into the terminal to insert them as @path/to/file.md#1 mentions for OpenCode.
  • Session Manager:
    • History Browser: View a list of all your past OpenCode sessions with timestamps.
    • Conversation Preview: Inspect message history, token usage and model details.
    • One-Click Restore: Instantly resume a previous session in the embedded terminal.
    • Export to Markdown: Save entire conversation threads as formatted notes in your vault for documentation or review.

Platform Support

  • Linux: stable on my daily driver, not tested on all distros.
  • Windows: Beta support on Windows 10 version 1809 and later through ConPTY. Node.js must be available on PATH for the isolated PTY helper.
  • macOS: Experimental.

Installation

From Obsidian Community Plugins (Recommended)

  1. Open Obsidian and go to Settings → Community plugins
  2. Click Browse and search for OpenCode
  3. Click Install, then Enable

Manual Installation

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Create a folder named opencode in your vault's .obsidian/plugins/ directory
  3. Copy the downloaded files into that folder
  4. Reload Obsidian and enable the OpenCode plugin in Community Plugins settings

Usage

  • Terminal: Use the command palette (Ctrl/Cmd + P) and select "OpenCode: Open Terminal" to launch the CLI.
  • Sessions View: Use the command palette to select "OpenCode: Open conversations" to browse, restore, or export past conversations, or start a new session from the panel header.
  • Settings: Configure the full absolute path to your opencode executable, default CLI arguments, per-vault environment variables, and terminal styling preferences (font size/family) in the Obsidian settings under the "OpenCode" tab. Environment values are passed literally. Do not rely on a command name from your shell PATH, because desktop-launched Obsidian may not inherit your shell environment.

Development

To develop the plugin, you can run the development script which automatically rebuilds the plugin when files change:

npm run dev

Unit tests run with npm test. To create a fresh isolated vault and test the built plugin inside a sandboxed Obsidian instance, run:

npm run test:obsidian

Use npm run test:obsidian:smoke for the smaller baseline suite. Windows contributors can also run npm run test:obsidian:windows-ui to exercise the installed OpenCode CLI and native terminal interactions.

See Testing in Obsidian for setup, coverage, evidence, and limitations.

Known Issues

  • large session preview: While the buffer size for exporting sessions has been increased (up to 100MB), exceptionally large or deeply complex OpenCode sessions with massive token counts may still occasionally fail to preview or load properly.

  • not tested on all Linux distros: While the plugin should work on major distros, it's only tested on manjaro, ubuntu, and fedora.

  • Experimental Windows pty: It's usable but far from linux and macos experience.

  • shortcuts conflicts:: Default opencode shortcuts like Ctrl+P could conflict with obsidian shortcuts. A solution for now is to always use leader key for opencode shortcuts.

Acknowledgements

  • Terminal integration approach inspired by polyipseity/obsidian-terminal — the Python PTY proxy with pty.fork() and 4-pipe stdio for resize control (FD 3).

License

MIT License

HealthExcellent
ReviewCaution
About
Embed the OpenCode CLI in Obsidian and run native coding sessions in a WebGL-accelerated terminal with direct access to your vault files. Browse and restore past sessions with timestamps and working directories, preview conversation history, and export threads to Markdown. Windows support in beta.
AIDevelopersFiles
Details
Current version
1.5.2
Last updated
4 days ago
Created
4 months ago
Updates
25 releases
Downloads
12k
Compatible with
Obsidian 1.7.2+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
krisspykrisspykriss-spy
GitHubkriss-spy
  1. Community
  2. Plugins
  3. AI
  4. OpenCode

Related plugins

Claudian

Embeds Claude Code/Codex and other local Agents as AI collaborators in your vault.

Local REST API with MCP

Unlock your automation needs by interacting with your notes over a secure REST API.

ChatGPT MD

A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama into your notes.

Gemini Scribe

Allows you to interact with Gemini and use your notes as context.

Claude Code IDE

Connect your vault to Claude Code and share editor context with the CLI.

AI Agent

Lend your vault to an AI agent. It can read, write, and search your notes.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

BRAT

Easily install a beta version of a plugin for testing.

Smart Connections

Find related notes and excerpts while writing. Your AI link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.

Advanced URI

Control everything with URI.