Favicon of codecompanion.nvim

codecompanion.nvim

An open source Neovim AI coding assistant with Ollama support, cloud model connections, inline edits, and agents such as Claude Code and Codex.

Screenshot of codecompanion.nvim website

codecompanion.nvim brings model chat, inline code edits, and coding agents into Neovim. It's for developers who want AI assistance inside their editor, with a choice between local LLMs through Ollama and cloud providers such as Anthropic, OpenAI, and Google Gemini. The plugin runs in Neovim; where model processing happens depends on the backend you connect.

Chat conversations live in editor buffers, and inline interactions can write generated code or refactors directly into an existing buffer. You can keep multiple chats open and supply images or PDFs alongside text. A built-in prompt library covers tasks such as explaining code and helping with language server errors.

Agent Client Protocol support connects the editor to CLI agents including Claude Code, Codex, Gemini CLI, Goose, and OpenCode. Code review controls let you comment on agent changes and approve or reject them. Model Context Protocol support also lets the assistant work with connected tools.

For teams with established coding conventions, the plugin supports skills and rules such as CLAUDE.md and .cursor/rules. Custom prompts, editor context, slash commands, and workflows let you adapt assistance to your project. You can also add your own model adapters or use community adapters rather than stay tied to one provider.

The plugin is open source under Apache 2.0. Its supported connections also include GitHub Copilot, DeepSeek, Mistral, Azure OpenAI, and OpenRouter.

Similar to codecompanion.nvim