# CodeCompanion.nvim > AI coding, Vim style. CodeCompanion is a plugin which enables you to code with AI, using LLMs and agents, in Neovim. ## Table of Contents ### Configuration - [Upgrading CodeCompanion](/configuration/upgrading.md): Step-by-step guide for upgrading CodeCompanion between major versions, covering breaking changes, configuration migration, and version pinning in Neovim. - [Configuring the Action Palette](/configuration/action-palette.md): Configure the CodeCompanion Action Palette — your entry point to chat buffers, prompt library prompts, and plugin features in Neovim. - [Configuring ACP Adapters](/configuration/adapters-acp.md): Configure Agent Client Protocol (ACP) adapters in CodeCompanion to connect with CLI agents like Claude Code, Codex, Gemini CLI, and OpenCode from Neovim. - [Configuring HTTP Adapters](/configuration/adapters-http.md): Configure CodeCompanion's HTTP adapters to connect Neovim to OpenAI, Anthropic, Copilot, Gemini, and Ollama. Covers API keys, model selection, and proxy settings. - [Configuring the Chat Buffer](/configuration/chat-buffer.md): Configure CodeCompanion's chat buffer — keymaps, display options, context management, system prompt, and tool settings for AI-assisted coding in Neovim. - [Configuring the Command-Line Interface (CLI)](/configuration/cli.md): Configure CLI agents in CodeCompanion — define agents like Claude Code or Codex, set custom commands, configure the terminal provider, and manage input settings. - [Configuring Extensions](/configuration/extensions.md): Configure CodeCompanion extensions to add custom functionality — can be distributed as Neovim plugins or defined locally in your configuration. - [Configuring the Inline Interaction](/configuration/inline.md): Configure CodeCompanion's inline interaction for writing and refactoring code directly into Neovim buffers via LLM prompts, without opening a chat buffer. - [Configuring MCP Servers](/configuration/mcp.md): Configure Model Context Protocol (MCP) servers in CodeCompanion to connect Neovim to external tools and data sources via an open AI integration standard. - [Configuring the Prompt Library](/configuration/prompt-library.md): Configure CodeCompanion's prompt library with custom Lua or Markdown prompts, reusable workflows, and slash commands for your AI coding workflow in Neovim. - [Configuring Rules](/configuration/rules.md): Configure rules files in CodeCompanion — including CLAUDE.md, AGENTS.md, and Cursor rules — to provide persistent LLM instructions and project context in Neovim. - [Configuring System Prompts](/configuration/system-prompt.md): Customize CodeCompanion's system prompt for chat and inline interactions — replace the default, add dynamic context, or tune language and tone for your LLM. - [Other Configuration Options](/configuration/others.md): Configure miscellaneous CodeCompanion options: response language, log level, per-project config files, and restricting code from being sent to LLMs. ### Usage - [Using CodeCompanion](/usage/introduction.md): Tips and tricks for getting the most out of CodeCompanion in Neovim — keyboard shortcuts, context management, output handling, and productivity patterns. - [Using the Action Palette](/usage/action-palette.md): Use CodeCompanion's Action Palette to launch chat buffers, switch between open chats, access the prompt library, and discover plugin features from a single menu. - [Using the Chat Buffer](/usage/chat-buffer.md): Everything about CodeCompanion's chat buffer — opening, toggling, keymaps, multi-turn conversations with LLMs, and adding images in Neovim. - [Using the Command-Line Interface (CLI)](/usage/cli.md): Interact with CLI agents like Claude Code and Codex from Neovim using CodeCompanion — share context, send prompts, and manage terminals without leaving Neovim. - [Events / Hooks](/usage/events.md): Reference for all CodeCompanion events and hooks — integrate with Neovim's autocmd system to react to chat, inline, CLI, and tool lifecycle events. - [Using the Inline Interaction](/usage/inline.md): Write and refactor code directly in Neovim buffers using CodeCompanion's inline interaction — supports visual selection, prompt library aliases, and diff review. - [Using the Prompt Library](/usage/prompt-library.md): Use CodeCompanion's prompt library via keymaps, Action Palette, or chat slash commands — includes built-in prompts for explaining, fixing, and testing code. - [Using Workflows](/usage/workflows.md): Run agentic workflows in CodeCompanion — chain multi-step LLM interactions to automate complex coding tasks, launched from the Action Palette. - [User Interface](/usage/ui.md): Customize CodeCompanion's Neovim UI — configure chat buffer appearance, status line metadata, and use plugin events to build your own interface extensions. #### Chat Buffer - [Using Agents and Tools](/usage/chat-buffer/agents-tools.md): Use CodeCompanion agent tools to let LLMs edit files, run commands, and search the web in Neovim. Covers tool groups, approval system, and model compatibility. - [Using Editor Context](/usage/chat-buffer/editor-context.md): Share Neovim state with your LLM using CodeCompanion editor context — reference buffers, selections, diagnostics, and more with the #{context} syntax in chat. - [Using Rules](/usage/chat-buffer/rules.md): Add rules files like CLAUDE.md, AGENTS.md, or Cursor rules to the CodeCompanion chat buffer to provide persistent LLM instructions and project context. - [Using Slash Commands](/usage/chat-buffer/slash-commands.md): Reference for all CodeCompanion slash commands — fetch URLs, add files and buffers, compact message history, insert symbols, and run ACP session options. ### Extending the Plugin - [Extending with Adapters](/extending/adapters.md): Build a custom CodeCompanion HTTP adapter to connect Neovim to any LLM. Covers the adapter interface, request handlers, environment variables, and schema. - [Extending with Agentic Workflows](/extending/agentic-workflows.md): Build agentic workflows in CodeCompanion — chain LLM prompts with tool calls to automate multi-step tasks like editing files and running your test suite. - [Extending with Extensions](/extending/extensions.md): Create a CodeCompanion extension to add custom functionality to the plugin — distributable as a Neovim plugin or defined locally in your configuration. - [Extending with Rules Parsers](/extending/parsers.md): Create custom rules parsers in CodeCompanion to post-process and transform rules file content before it's shared with an LLM. - [Extending with Tools](/extending/tools.md): Build custom CodeCompanion tools to let LLMs execute functions in Neovim — covers tool structure, OpenAI-compatible schemas, handlers, and agent group integration. - [Extending the UI](/extending/ui.md): Examples and community recipes for extending CodeCompanion's UI in Neovim — including progress spinners with Fidget.nvim and custom status line integrations. ### Other - [Agent Client Protocol (ACP) Support](/agent-client-protocol.md): CodeCompanion's Agent Client Protocol (ACP) support — covers session management, tool execution, permissions, and which capabilities are currently implemented. - [Architecture](/architecture.md): How CodeCompanion manages LLM context windows, handles token limits, and is architected internally — reference for contributors and advanced users. - [Getting Started](/getting-started.md): Get up and running with CodeCompanion in Neovim — configure your first LLM adapter, open a chat buffer, use the inline interaction, and learn the core commands. - [Installation](/installation.md): Install CodeCompanion.nvim with lazy.nvim or packer. Covers dependencies, Neovim 0.11+ requirements, optional integrations like nvim-cmp, and API key setup. - [Model Context Protocol (MCP) Support](/model-context-protocol.md): Overview of CodeCompanion's Model Context Protocol (MCP) support — which capabilities are implemented and how MCP tools appear in the chat buffer in Neovim.