olimorris/codecompanion.nvim
A Neovim plugin for AI coding with model adapters, ACP agents, and MCP tools
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
CodeCompanion is a Lua plugin that runs inside Neovim. The repository separates plugin files into plugin/, Lua code into lua/, and queries into queries/. The installation example lists plenary.nvim and nvim-treesitter as dependencies. Chat buffers and inline interactions provide editor-native entry points without moving model inference into the editor.
There are two distinct backend paths: HTTP adapters connect to model services, while ACP connects to external coding-agent processes that manage their own sessions. MCP addresses tool and context integration rather than agent lifecycle or inference. Custom adapters and an extensions API make the integration layer extensible, but the selected provider or agent still determines what runs outside Neovim.
Key Capabilities & Differentiators
The HTTP adapter lineup covers Anthropic, OpenAI, Gemini, DeepSeek, GitHub Copilot, Azure OpenAI, OpenRouter, Ollama, and other backends, giving users a choice between hosted APIs and a locally operated inference service. ACP covers a different workflow: Claude Code, Codex, Gemini CLI, and OpenCode are examples of external coding agents, not interchangeable model endpoints.
A chat buffer gives longer tasks a dedicated workspace, while inline interaction keeps requests close to the code. Tools extend chat beyond text: @{search_help} searches CodeCompanion help, and v20.2.0 added overwrite_file, which can replace file contents. For teams adopting tool-enabled workflows, the important distinction is whether a request only produces a response or can also modify the workspace.
Trade-offs & Limitations
Compared with running Claude Code or Codex directly in a terminal, CodeCompanion adds Neovim-native interaction and lets users keep the same editor interface when switching to a direct model adapter. In return, there are more components to configure and troubleshoot: the editor dependencies, the adapter or agent, and any tools attached to the workflow. Protocol support does not make every backend behave the same way.
Hosted APIs avoid local inference sizing but introduce network dependence, provider charges, and a data-handling boundary. Ollama can keep inference local, but that alone does not establish that the full workflow is offline: agents and tools need their own review. The plugin's Apache-2.0 license is separate from provider and model terms. When using file-writing tools, establish what they can write and how changes will be reviewed before giving them access to a shared workspace.
Hardware & Deployment Guide
Install CodeCompanion with a Neovim package manager and configure it through require("codecompanion").setup(...). Add the chosen backend separately: configure hosted provider access, run Ollama for local inference, or install and configure the external agent for ACP. Start troubleshooting with :checkhealth codecompanion; if the problem persists, use DEBUG or TRACE logging and reproduce it with nvim --clean -u minimal.lua.
The Ubuntu 24.04 Dockerfile provisions Neovim nightly and development tooling, including Rust 1.93.0 and Tree-sitter CLI v0.26.5. Those are choices made by the container build, not universal runtime prerequisites for the plugin. The v20.3.0 release added ACP subagents and sends session/close before terminating the agent process. v20.4.0 added :CodeCompanionCLI Resume and refined Claude Code interactions.
session/close before agent termination; v20.4.0 added :CodeCompanionCLI Resume.:checkhealth codecompanion reports dependency status and the log path; DEBUG or TRACE logging and nvim --clean -u minimal.lua help isolate configuration issues.Neovim users who want editor-native chat and inline assistance, with the option to switch between direct model APIs, local Ollama inference, and external ACP agents.
You do not use Neovim, prefer an agent's terminal interface, or require a turnkey offline stack with inference, agents, and tool permissions already configured.
Quick Start & Installation
-- lazy.nvim
{
"olimorris/codecompanion.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
opts = {
-- NOTE: The log_level is in `opts.opts`
opts = {
log_level = "DEBUG", -- or "TRACE"
},
},
},
-- Other package managers
require("codecompanion").setup({
opts = {
log_level = "DEBUG", -- or "TRACE"
}
})Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| codecompanion.nvim ★ | 7k | +9 | Lua | Apache-2.0 | A Neovim plugin for AI coding with model adapters, ACP agents, and MCP tools |
| ECC | 316.1k | +4.2k | JavaScript | MIT | Plugins and CLI workflows for planning, reviewing, and verifying agent-written c |
| spec-kit | 153.7k | +1.3k | Python | MIT | A Python CLI for spec-driven coding-agent workflows and reviewable handoffs |
| caveman | 124.8k | +1.4k | Go | Apache-2.0 | Coding-agent skill and local Go proxy for shorter replies and smaller tool outpu |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/olimorris/codecompanion.nvim.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about codecompanion.nvim
When should I choose an HTTP adapter, ACP, or MCP?
How much RAM or VRAM should I budget?
Can we use it commercially or in a self-hosted environment?
Why use this instead of running Claude Code or Codex in a terminal?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy