CodeCompanion.nvim plugin

codecompanion.nvim

A Neovim AI assistant with LLM chat and Claude Code, Codex, Gemini CLI running right inside the editor via ACP and MCP

  • 6,936 ★ on the repository
  • Last commit
  • Apache-2.0
Plugin

Extended access

Why this level

  • Launches third-party CLI agents with access to project files right from the editor
All reasons and checks

olimorris/codecompanion.nvim

Install

Manual install

{
  "olimorris/codecompanion.nvim",
  dependencies = {
    "nvim-lua/plenary.nvim",
    "nvim-treesitter/nvim-treesitter",
  },
  opts = {},
}

Snippet for lazy.nvim. See the docs for other plugin managers.

Access and checks

How we review

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

  • Launches third-party CLI agents with access to project files right from the editor

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

What it does

CodeCompanion.nvim adds a chat buffer to Neovim for working with LLMs (Anthropic, OpenAI, Gemini, GitHub Copilot and others) and, separately, Agent Client Protocol support that runs full coding agents right inside the editor: Claude Code, Codex, Gemini CLI, OpenCode, Copilot CLI and others. A built-in MCP client lets you wire external MCP servers in as chat tools. The editor gets slash commands to pull a buffer, file, or command output into context, plus diffs to review edits before accepting them.

Who it is for. For Neovim developers who want an LLM chat and coding agents inside the editor instead of switching to a separate terminal or IDE.

Good fit when

  • You work in Neovim and want an LLM chat with buffer context without switching windows
  • You need to run Claude Code, Codex or Gemini CLI right inside an editor tab via ACP
  • You need to wire external MCP servers in as chat tools in Neovim

Not a fit when

  • You do not use Neovim at all
  • You need a ready agent out of the box with no Lua config and adapter setup

Example request

Open the CodeCompanion chat, pull in the current buffer, and explain why this test is failing

Limitations

Requires Neovim and familiarity with configuring plugins in Lua. Cloud providers need your own API keys, and ACP agents like Claude Code or Codex need their own CLI installed separately.

How to disable. Remove the codecompanion.nvim block from your plugin manager's config (lazy.nvim, packer and others) and restart Neovim.

FAQ

Is this a replacement for Claude Code or a wrapper around it?

A wrapper: via Agent Client Protocol, CodeCompanion launches the real Claude Code, Codex or another CLI agent inside a Neovim buffer instead of reimplementing an agent.

Can it be used without cloud keys?

Yes, there is an adapter for local models through Ollama.

How is CodeCompanion.nvim different from Claude Code in a terminal?

It is a Neovim plugin: a chat buffer for working with LLMs (Anthropic, OpenAI, Gemini, GitHub Copilot) and Agent Client Protocol support that runs Claude Code, Codex, Gemini CLI and other agents inside the editor.

How do I configure CodeCompanion.nvim for my adapter?

Add the plugin through your plugin manager, as in the install block, and choose an adapter in the config: Anthropic, OpenAI, Gemini or Copilot. For agents over ACP you also set the needed CLI. Details are in the README.

Discussion

No questions or reviews yet.

Plugins
Needs a VPN

Neovim plugin that connects Claude Code to the editor: current file, selection, diagnostics and diff review of proposed edits

PluginExtended access3.2KRepository stars

An MCP server giving AI agents access to your running Neovim session through its native msgpack-RPC socket, with no plugins.

MCP serverBroad access67Repository stars

An Emacs package for Claude Code: per-project sessions and an MCP server exposing buffers, LSP and diffs to the agent.

PluginExtended access67Repository stars

Code indexing for LLMs: VectorCode builds repository search and feeds relevant context to an agent via CLI and MCP

MCP serverExtended access874Repository stars

A VS Code extension that gives agents the Clojure REPL and structural form editing with built-in bracket balancing.

MCP serverExtended access66Repository stars

README in short

The README presents CodeCompanion.nvim as a Neovim AI assistant combining LLM chat (Anthropic, OpenAI, Gemini, Copilot, Ollama and others) with Agent Client Protocol support for running Claude Code, Codex, Gemini CLI, OpenCode, Copilot CLI and other agents inside the editor. It also documents a built-in MCP client for wiring in external servers as tools. Install via lazy.nvim or another plugin manager with plenary.nvim and nvim-treesitter as dependencies; diagnose with :checkhealth codecompanion. An actively maintained project with many community adapters.

README badge

Report a problem