Dev & Engineering neovimopencodeluaterminalai-pair-programmingeditor-integration

opencode.nvim

Connect Neovim to OpenCode within your existing editor workflow.

FollowAgents review · FARS-2.1
Not recommended
51/ 100 5-point scale 2.6 / 5
1 2 3 4 5 6
1Trust11 / 29 · 1.9/5

Evidence shows the plugin asks user approval for permission requests (user_confirmation=2), but least privilege is not explicitly addressed (least_privilege=1). Data flow transparency is limited; no detailed explanation of what data is sent to OpenCode server (data_flow_transparency=1). Sensitive data handling not specified (sensitive_data_handling=1). Dependency security not assessed, relies on external tools (dependency_security=1). External effects limited but not detailed (external_effects=1). Rollback mechanism not specified (rollback=1). Source attribution via README and license, but publisher unverified (source_attribution=1).

2Reliability6 / 14 · 2.1/5

Self-consistency is good; documentation and code examples align (self_consistency=2). Dependency availability not explicitly stated, relies on external OpenCode and Neovim (dependency_availability=1). Failure messages not detailed (failure_messages=1).

3Adaptability12 / 18 · 3.3/5

Target audience clear (Neovim users), scenarios well-defined (audience_and_scenarios=2). Capability boundaries clear, e.g., single OpenCode instance (capability_boundaries=2). Trigger precision high via commands and keymaps (trigger_precision=2). Environment fit good with multiple installation methods (environment_fit=2).

4Convention10 / 18 · 2.8/5

Information architecture clear, well-structured docs (information_architecture=2). Install notes detailed (install_notes=2). Naming stable, consistent API (naming_stability=2). Examples and FAQ sufficient (examples_and_faq=2). Known limitations mentioned but sparse (known_limitations=1). License clear MIT (license=2). Versioning and changelog not explicit (versioning_changelog=1). Maintenance responsibility not clear (maintenance_responsibility=1).

5Effectiveness9 / 13 · 3.5/5

Output usability high with multiple interaction modes (output_usability=2). Marginal value clear, integrates existing tools (marginal_value=2). Cost-benefit reasonable, free and open source (cost_benefit=2).

6Verifiability3 / 8 · 1.9/5

Claim traceability moderate; some features not detailed (claim_traceability=1). Cross-source corroboration limited, relies on single repo (cross_source_corroboration=1). Fact-inference separation not explicit (fact_inference_separation=1).

Evidence confidence: Low Reviewed Aug 12, 2026 Reviewed revision 41622312d5d8
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
Before you use it
  • Publisher identity unverified; use with caution.
  • Permission handling details limited; review code for least privilege.
  • Data flow transparency insufficient; understand what data is sent to OpenCode server.
  • Relies on external OpenCode and Neovim; ensure environment compatibility.
Review evidence [1][2][3][4]
See the full review method →

What does this agent do, and when should you use it?

opencode.nvim is a Neovim plugin that integrates with OpenCode's TUI and server to bring AI pair programming into the standard Neovim interface. It enables injecting editor context (cursor, selection, buffers) into prompts, supports prompt input with completions and highlighting, selection from built-in or custom prompts, execution of OpenCode commands, accepting/rejecting/reloading edits, and handling OpenCode events as autocmds. The plugin can connect to any OpenCode server or start an integrated instance. It prioritizes focused pairing with a single OpenCode instance and provides simple, Vim-centric defaults. Setup is straightforward via vim.pack, lazy.nvim, or nixvim.

opencode.nvim exposes a Lua API via require("opencode"), including ask() for prompting, select() for choosing prompts/commands/servers, prompt() for sending prompts with context injection, operator() for operator-style usage, and command() for executing OpenCode commands like session.new or session.undo. It replaces context placeholders (@this, @buffer, @diagnostics) in prompts. When OpenCode edits a file, the plugin reloads the buffer and shows the diff using Neovim's :diffpatch for review. It also forwards Server-Sent Events as OpencodeEvent autocmds for custom handling. Server discovery and startup are controlled via vim.g.opencode_opts.server, defaulting to starting term://opencode --port. Permissions requests trigger interactive approval dialogs.

  1. Neovim users who want to leverage OpenCode without leaving their editor.
  2. Developing features that benefit from sending specific code regions or buffers as context for AI suggestions.
  3. Teams that want to standardize AI prompts (e.g., code review, testing) across their editor setup.
  4. Power users who need to automate or react to OpenCode session events, such as status updates or permission requests.
  5. Developers who prefer to review and accept AI-generated edits using familiar diff tools within Neovim.

What are this agent's strengths and limitations?

Pros
  • Deep integration with Neovim using native interfaces (diff, operators, autocmds).
  • Preserves existing editor muscle memory and workflow, no new interaction model.
  • Flexible server configuration: connect to any OpenCode server or auto-start one.
  • Context injection and built-in prompt library accelerate common tasks (review, test, etc.).
  • Event-driven architecture enables real-time updates and custom automations.
Limitations
  • Requires OpenCode CLI installed and configured to expose its server on a port.
  • Designed primarily for single-instance use; switching between servers frequently may need connect adjustments.
  • Written in Lua; users unfamiliar with Neovim plugin development may find customization challenging.
  • Depends on OpenCode's API and event formats; version mismatches could break functionality.
  • Limited documentation on extending the plugin beyond provided options; advanced use may require reading type definitions.

How do you install or deploy this agent?

Recommended: use vim.pack by adding vim.pack.add({ { src = "https://github.com/nickjvandyke/opencode.nvim", version = vim.version.range("*") } }) and set vim.g.opencode_opts. Alternative: lazy.nvim with { "nickjvandyke/opencode.nvim", version = "*", config = function() ... end }, or nixvim with extraPlugins = [ pkgs.vimPlugins.opencode-nvim ];. After installation, run :checkhealth opencode.

How do you use this agent?

Ensure OpenCode CLI is installed and can be run (with --port flag). Configure vim.g.opencode_opts and define keymaps, for example: vim.keymap.set({ "n", "x" }, "<C-a>", function() require("opencode").ask("@this: ") end). Then use the keymaps to invoke ask/select/operator. The plugin will attempt to connect to a running OpenCode server, or start one via the server.start function. Optionally, set server.url to connect to a remote server.

FAQ

How do I connect to a remote OpenCode server?
Set vim.g.opencode_opts.server.url to the server's URL (e.g., http://localhost:PORT or a remote address). The plugin will connect to that server instead of starting a new one.
How are edit permissions handled?
When OpenCode requests a permission, the plugin prompts you to approve or deny. For edits, it opens the target file in a new tab and uses :diffpatch to show changes. You can press da to accept all, dr to reject all, or dp/do to accept/reject the hunk under the cursor.
Which context placeholders are available?
The plugin supports @this (range/selection or cursor position), @buffer (current buffer), @buffers (all open buffers), @diagnostics, @marks, @quickfix, and @visible.
Can I customize the built-in prompts?
Yes, you can override or add prompts in the configuration. The defaults include eight prompts (e.g., review, explain, test) and are defined in lua/opencode/config.lua.
Does it support multiple OpenCode instances simultaneously?
The plugin is designed for focused pairing with a single instance. If you often switch between servers, consider disabling vim.g.opencode_opts.server.connect to avoid disruptive synchronous events.

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents