avante.nvim
Avante.nvim: A Zen-Mode AI Assistant for Neovim
Introduction
Avante.nvim is a Neovim plugin crafted to bring AI-powered coding assistance into your familiar editor. Designed to imitate the experience of Cursor AI IDE, Avante.nvim integrates intelligent code suggestions and one-click application of those recommendations directly into your source files. It blends the comfort and efficiency of Vim/Neovim with modern AI-driven workflows, so you can stay in your preferred editing posture while harnessing powerful AI capabilities.
A Vision of Zen: Avante Zen Mode
One of the standout ideas behind Avante.nvim is Zen Mode. In an era where many command-line interfaces and coding agents promise “CLI-only” workflows, Avante retains the elegance and muscle memory of Vim. Zen Mode lets you enjoy a Claude-like or Gemini-powered AI experience while retaining Vim’s action-and-text-object metaphors, a vast ecosystem of mature Neovim plugins, and a smooth TUI workflow.
- Zen Mode lets you alias a command to launch Neovim and enter Avante’s Zen Mode, so you can type avante just like you would invoke a Claude-style CLI and immediately be in a Neovim environment that feels familiar and responsive.
- The mode blends the power of AI with the familiar keystrokes of Vim, enabling quick questions about the code, rapid edits, and direct application of AI-suggested changes.
Visual glimpse: Avante Zen Mode
[Avante Zen Mode image] This image illustrates the experience of invoking Avante Zen Mode and working within a Neovim session that merges AI capabilities with Vim’s editing model. It captures the seamless transition from a terminal-like prompt to a rich, interactive Neovim interface.
Key Features You’ll Love
- AI-Powered Code Assistance
- Ask questions about your current file and receive intelligent, context-aware suggestions.
- Get actionable edits, refactors, or improvements tailored to your codebase and project conventions.
- One-Click Application
- Apply the AI’s suggested changes to your source code with a single command, streamlining your editing workflow.
- The apply step is designed to be fast and reliable, preserving code quality and intent.
- Project-Specific Instructions with avante.md
- Place a markdown file avante.md at your project root to customize AI behavior for the workspace.
- The file is automatically referenced during workspace changes, enabling consistent, project-aware AI prompts.
- You can customize the file name as well, enabling tailored project instruction files.
- Rich Input Providers
- Native input, Dressing.nvim, Snacks.nvim, or custom input providers to collect API keys, prompts, and other interactions.
- The selection of input UI is pluggable to suit your preferences and UI standards.
- ACP and RAG
- Agent Client Protocol (ACP) support lets AI agents interact with your development environment in a standardized way.
- ACP-enabled providers bring direct tool access, persistent context, and fine-grained permissions.
- RAG (Retrieval-Augmented Generation) services help Avante fetch relevant context to improve AI responses.
A Closer Look at Project Instructions: avante.md
avante.md is the backbone for project-specific AI behavior. It defines your AI’s role, mission, and operating constraints. Practical best practices for avante.md include:
- Your Role
- Define the AI’s persona and expertise: you are an expert senior software engineer specializing in your project stack, with deep knowledge of frameworks and best practices.
- Your Mission
- Describe the AI’s primary goals: help build and maintain the project, provide code suggestions, debug, refactor, optimize, and ensure security.
- Additional Sections
- Project context: what the project is about and who the target users are.
- Technology stack: the tools you use (frontend, backend, testing, deployment).
- Coding standards: naming conventions, structure, and style guidelines.
- Architecture guidelines: how components interact and are organized.
- Testing requirements: unit, integration, and end-to-end expectations.
- Security considerations: key constraints and requirements.
- Practical Example
- The document includes example sections for roles, missions, and samples of how to phrase prompts, how to structure prompts per mode (planning, editing, suggesting), and how to handle project-specific prompts and rules.
- Advanced Customization
- Avante supports override prompts by placing templates in a dedicated directory, enabling project-specific templates that Avante will render for each mode.
- You can define root-hierarchy rules so the system selects the most relevant prompts based on your project layout.
Best Practices for Avante.md
- Be explicit about the AI’s role and responsibilities to minimize drift.
- Outline clear, actionable goals for the AI to pursue in planning, editing, and suggesting modes.
- Provide concrete conventions for coding standards and architecture expectations.
- Use a structured approach to instructions to encourage robust, maintainable AI-driven changes.
Avante in Action: How to Use It
- Basic Workflow
- Open a code file in Neovim and ask questions about the code to get AI-driven insights.
- Review AI suggestions and apply them with a single keybind or command.
- Use AvanteAsk to query more about the code, and AvanteBuild to fetch dependencies as needed.
- Core Commands
- AvanteAsk [question] [position]: ask AI about code, optionally set the window position.
- AvanteChat: start or resume a chat about the codebase.
- AvanteEdit: edit the selected code blocks using AI guidance.
- AvanteFocus / AvanteRefresh / AvanteToggle: manage the Avante sidebar and focus.
- Quick Start: Minimal Setup
- Install Avante.nvim and its dependencies.
- Configure a basic provider (for example Claude or OpenAI) and a simple behavior.
- Optionally add avante.md to your project root to tailor AI behavior.
- Completion and Extensions
- Avante can integrate with blink.cmp or similar sources to provide completion-like experiences for prompts and suggestions.
- It supports multiple input providers and a flexible selector system for UI choices.
Images and Visual Aids
- Logo and Branding
- The Avante logo image at the top of the page helps you recognize the project branding and identity.
- Zen Mode Visual
- The Zen Mode illustration demonstrates how Avante’s UX merges AI capabilities with Vim’s editing model, delivering a calm, productive environment.
- Sponsor Logos
- Meshy AI and BabelTower API logos appear as collaborators and showcase partners.
- Star History
- A Star History badge illustrates the project’s popularity trajectory over time.
From Theory to Practice: How Avante Configures and Runs Default Setup and Options
- Provider
- The default provider setting designates which AI service the assistant uses (Claude, OpenAI, Gemini, etc.).
- Mode and Auto-Suggestions
- The mode (agentic vs. legacy) determines whether AI tools are used automatically to generate and apply code, or if suggestions are offered for manual review.
- Auto-suggestions control how aggressively AI contributes; you can adjust frequency and behavior.
- ACP Support
- ACP enables agents to interact directly with your environment, including file operations and command executions, with a formal permission system.
- Fast Apply (Experimental)
- A specialized “apply model” can merge edits at high speed with high accuracy, enabling instant code changes.
- Morph provides an API-based path to ultra-fast apply, with model choices and tokens settings.
Configuring Avante
- Lua Setup
- You can pass options directly to setup(): require("avante").setup({ provider = "claude", behaviour = { auto_suggestions = false }, })
- Global Override
- You can also set vim.g.avante before calling setup(), for example: vim.g.avante = { provider = "claude", behaviour = { auto_suggestions = false } } require("avante").setup()
- If both are used, setup() values override vim.g.avante values.
- Key Areas of Configuration
- Providers: endpoint URLs, models, timeouts, and extra request bodies.
- ACP and non-ACP provider configurations.
- Prompt templates and root directory resolution for avante.md and avanterules.
Provider Ecosystem and ACP
- ACP Providers
- Gemini CLI with ACP
- Claude Code with ACP
- Goose with ACP
- Codex with ACP
- Kimi CLI with ACP
- ACP Configuration
- acp_providers in your config define the command, arguments, and environment variables.
- This enables direct tool access, persistent sessions, and robust permission controls.
- Why ACP Matters
- It brings traditional AI assistant capabilities into a fully integrated development environment, enabling more natural and powerful automation while preserving your workflow.
RAG Service and Web Search Engines
- RAG Service
- Optional tool for retrieving context to improve AI responses.
- Configurable with host mounts, docker or nix runners, and LLM/embedding settings.
- You can enable it when you need more context-aware AI answers.
- Web Search Engines
- Avante integrates with several web search providers:
- Tavily (default)
- SerpApi
- Google Programmable Search Engine
- Kagi
- Brave Search
- SearXNG
- Each provider requires an API key or URL, and you can configure a proxy if needed.
- Environmental keys must be set according to the provider you choose.
Input Providers and Completion Sources
- Input Providers
- Native: uses Vim’s built-in input UI.
- Dressing.nvim: enhanced styling for input prompts.
- Snacks.nvim: modern, feature-rich input UI.
- Custom input providers: you can implement your own function to render input prompts.
- Completion/Selector
- Avante supports a blink-like completion experience, emulating nvim-cmp for AI prompts and interactions.
- You can customize the provider and its options to suit your workflow, including a custom function to launch a picker.
Working with Tools and Custom Tools
- Avante can disable certain tools per provider to suit security or compliance needs.
- You can ban specific tools (e.g., python) or enable only a subset of tools for a particular provider.
- Custom Tools
- Avante allows you to define custom tools that execute shell commands, run scripts, or implement bespoke logic.
- An example Go test runner shows how you can hook a tool to your workflow, taking parameters and returning results.
Integrations and Extensions
- Neotree and Other Extensions
- Avante can be extended to work with other plugins (e.g., neotree).
- A sample integration shows how to wire a file selector into Avante’s UI, enabling file operations from within Neotree.
A Glimpse at the Roadmap and Community
- Roadmap Highlights
- Enhanced AI interactions for deeper code analysis.
- Tightening LSP, Tree-sitter, and LLM integration for more accurate suggestions.
- Community and Contributions
- Contributions are welcome; the project maintains a wiki and extensive documentation to help contributors and users.
- Business Sponsors
- Meshy AI and BabelTower API are highlighted as collaborators, with logos standing in as partners and supporters.
Usage Tips and Practical Notes
- Environment and API Keys
- Avante supports scoped API keys (recommended) and global keys (legacy) across providers.
- Scoped keys are recommended to isolate Avante’s usage from other tools.
- Permissions and Security
- ACP-based workflows provide granular permissions; you can configure which tools and actions an AI agent is allowed to perform.
- Compatibility Considerations
- Avante.nvim is compatible with Neovim 0.11+.
- For best results, ensure you follow the recommended Neovim options (e.g., laststatus set to 3 for full UI integration).
A Note on Installation and Setup
- Installation approaches
- Various plugin managers can install Avante.nvim, including lazy.nvim, vim-plug, and others.
- If building from source, a Makefile is typically involved; for prebuilt setups, curl/tar methods are common.
- Quick Start Snippet
- A minimal Lua setup could look like: require('avante').setup({ provider = 'claude', behaviour = { auto_suggestions = false } })
- Sample Prompt Customization
- Avante supports prompt customization and override_dir options, letting you point to a directory of custom avanterules.
- The system prompts can be overridden per project, with templates rendered via minijinja.
Conclusion: A Pragmatic AI Companion for Neovim
Avante.nvim represents a thoughtful convergence of AI capability and the Vim/Neovim editing paradigm. It invites you to enjoy the power of AI-driven code assistance without abandoning the muscle memory and plugin-rich environment you already rely on. Zen Mode makes it possible to leverage Claude, Gemini, or other providers while retaining full terminal-based editing strengths. The combination of AI prompts, project-aware instructions via avante.md, ACP-enabled workflows, and flexible input and UI options positions Avante.nvim as a compelling option for developers who value speed, precision, and a seamless development experience.
Acknowledgments and Community Spirit
- Avante.nvim owes its inspiration to the broader ecosystem of AI-assisted development tools and the vibrant Neovim plugin community.
- The project acknowledges contributions from a wide range of open-source projects, including those that provide code formatting, token counting, clipboard support, and UI enhancements.
- The collaborative spirit is reinforced by sponsorships and partnerships, which help the project to persist and grow.
Images stitched into the narrative
- Avante Logo
- A visual breadcrumb of the project’s branding appears at the top of this article to anchor the reader in the Avante identity.
- Zen Mode Visual
- The Avante Zen Mode image gives readers a tangible sense of how AI-assisted editing can feel inside Neovim.
- Sponsor Logos
- Meshy AI and BabelTower API logos are included as visual recognition of support and collaboration.
- Project Trajectory
- A star-history badge hints at the project’s growth and traction over time.
This blog post has walked through what Avante.nvim offers, how it reimagines AI-assisted coding in a Neovim setting, and how you can begin leveraging Zen Mode today. From the concrete mechanics of avante.md to the broader architecture of ACP-based providers, RAG services, and web search integrations, Avante.nvim is positioned as a practical, customizable, and forward-looking tool for developers who want intelligent assistance without leaving their trusted editor. If you’re curious about the future of AI in code, Avante.nvim invites you to explore, contribute, and grow with a growing ecosystem of features and enhancements.
Enjoying this project?
Discover more amazing open-source projects on TechLogHub. We curate the best developer tools and projects.
Repository:https://github.com/yetone/avante.nvim
GitHub - yetone/avante.nvim: avante.nvim
Avante.nvim is a Zen-Mode AI Assistant for Neovim, designed to bring AI-powered coding assistance into your familiar editor while maintaining Vim's muscle memor...
github - yetone/avante.nvim
Maintain avante.nvim? Add the badge to your README
Show that the project is featured on TechLogHub and send readers to this write-up.
[](https://techloghub.com/open-source/avante-nvim?utm_source=techloghub_badge&utm_medium=referral&utm_campaign=readme)
