Skip to main content

OpenCode Plugins

tip

Plugins extend OpenCode with community-built tools, integrations, and workflows. Install via npm or local files.

How Plugins Work

Plugins hook into OpenCode's event system to add custom capabilities. They can:

  • Add custom tools that the LLM can call during a session.
  • Intercept tool calls to modify behavior before or after execution.
  • Inject environment variables into shell sessions.
  • Subscribe to events like session creation, file edits, and permission requests.
  • Modify context during compaction to preserve important state.

Installation Methods

From npm

Specify npm packages in your opencode.json:

{
"plugin": ["opencode-wakatime", "@my-org/custom-plugin"]
}

OpenCode installs npm plugins automatically using Bun at startup, cached in ~/.cache/opencode/node_modules/.

From Local Files

Place JavaScript or TypeScript files in the plugin directory:

ScopePath
Project.opencode/plugins/
Global~/.config/opencode/plugins/

Files in these directories are auto-loaded at startup.

Top 10 Community Plugins by GitHub Stars

#PluginStarsCategory
1Daytona72,467Workspace
2Oh My OpenCode59,187Orchestration
3Plannotator5,561Plan Review
4Dynamic Context Pruning2,975Context
5Supermemory1,234Memory
6OpenCode Notifier592Notifications
7OpenCode Worktree563Workspace
8OpenCode Workspace450Orchestration
9OpenCode PTY435Shell
10MiCode399Workflow

Plugin Types by Category

Workspace / Environment

PluginPurpose
DaytonaIsolated sandboxes for safe code execution
OpenCode WorktreeGit worktree automation for parallel agent work

Agent Workflow / Orchestration

PluginPurpose
Oh My OpenCodeFull agent harness with bundled tools and agents
PlannotatorVisual plan and diff review with team sharing
OpenCode WorkspaceMulti-agent orchestration in one install
MiCodeStructured brainstorm-to-implement pipeline

Context / Memory

PluginPurpose
Dynamic Context PruningToken optimization by pruning stale context
SupermemoryPersistent memory across sessions

Notifications / Session UX

PluginPurpose
OpenCode NotifierDesktop alerts for events

Shell / Runtime

PluginPurpose
OpenCode PTYInteractive terminal management for agents

See individual plugin pages for installation, configuration, and usage details.