opencode-morph-fast-apply plugin

An OpenCode plugin that uses the Morph cloud service to merge partial edits into a file with no exact string search.

  • 170 ★ on the repository
  • Last commit
  • MIT
Plugin

Extended access

Why this level

  • Code snippets go to the external Morph service, and the API key sits in the environment.
  • The plugin writes changes to project files.
All reasons and checks

jredeker/opencode-morph-fast-apply

Install

Works in

Manual install

"plugins": ["github:JRedeker/opencode-morph-fast-apply#v1.12.0"]

The entry for `~/.config/opencode/opencode.json` under `plugins` (V2). On V1 from 1.18.29 the key is `plugin`.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Code snippets go to the external Morph service, and the API key sits in the environment.
  • The plugin writes changes to project files.

This is third-party code. Review the repository files before installing.

What it does

The plugin registers a `morph_edit` tool in OpenCode. The agent passes a code snippet with `// ... existing code ...` markers, and Morph Fast Apply merges it into the file with no exact string match required. Before writing, the plugin checks that the markers are present and the file will not lose content. The result comes back as a unified diff with context, and when the API fails the agent is pointed to the built-in `edit` tool. In the OpenCode interface the edit gets a label with added and removed line counts and the run time.

Who it is for. OpenCode users whose agents edit large files and trip over exact string matching for replacements.

Good fit when

  • The agent makes scattered edits in a long file and the regular `edit` often misses.
  • The file has many whitespace differences that break exact string matches.
  • The team already pays for Morph and wants its API inside OpenCode.
  • Edits should be reviewed as a diff with line counts and timing in the interface.

Not a fit when

  • Code cannot go to an external service, since snippets are sent to the Morph API.
  • OpenCode is older than 1.18.29, where the plugin silently fails to load.
  • The agent profile disables `morph_edit`, so the model cannot pick the tool.

Example request

Add empty-token handling to `src/auth.ts` through `morph_edit` and leave the rest of the code alone.

Limitations

You need a `MORPH_API_KEY` from Morph, and edit contents go to their server. The plugin works with OpenCode V2 (the `plugins` key) and V1 from 1.18.29 (the `plugin` key); on older V1 it silently fails to load. For reliable tool selection the README advises loading the `morph-tools.md` instruction file. Speed and accuracy figures (10,500 tokens per second, 98 percent) come from the author and refer to the Morph service. The official Morph MCP server with WarpGrep search is a separate package and this plugin does not replace it.

How to disable. Remove the plugin entry from `opencode.json` and restart OpenCode. Drop `MORPH_API_KEY` from the environment.

FAQ

Which config key do I use?

Use `plugins` for OpenCode V2 and `plugin` for V1 from 1.18.29. With the wrong key the plugin does not load and no error appears.

Where do I get the key?

In the Morph dashboard under API keys. Then run `export MORPH_API_KEY="..."` in the environment that launches OpenCode.

What if the API is down?

The plugin returns an error and suggests the built-in `edit`. The file stays unchanged.

What are the existing-code markers?

`// ... existing code ...` lines inside `code_edit`. They mark which parts of the file stay unchanged.

Does the plugin replace the Morph MCP server?

No. The official server with WarpGrep search lives in `@morphllm/morphmcp`, while this plugin wraps Fast Apply only.

Discussion

No questions or reviews yet.

Plugins

A Windows plugin for OpenCode Desktop that sets edit boundaries, screens commands and ties test results to the current code.

PluginExtended access113Repository stars

An OpenCode plugin where hooks on tool and subagent calls are declared in config and command output flows into context.

PluginBroad access64Repository stars

An OpenCode plugin that searches conversation history across all projects by keyword, regex, with typos, and by touched files.

PluginMinimal access132Repository stars

A Claude Code plugin with seven specialized subagents and approval gates: the agent proposes a plan and waits for confirmation before touching code

PluginExtended access5KRepository stars

A plugin for OpenCode and Pi that swaps read, edit and grep for structure-aware versions and adds semantic search and PTY

PluginBroad access340Repository stars
Official

The MCP server finds definitions and meaningful code fragments through a local index with vector and full-text search.

MCP serverExtended access349Repository stars

README in short

The README covers OpenCode version support, two ways to load the instruction file and an example `morph_edit` call with markers. It notes that the Morph MCP server lives in another package.

README badge

Report a problem