Skip to main content
Avante.nvim provides a comprehensive set of commands for AI-powered code assistance. All commands are prefixed with :Avante.

Core Commands

AvanteAsk

Ask AI about your code and receive intelligent suggestions. Usage:
Parameters:
  • question (optional) - The question to ask the AI
  • position (optional) - Window position: left, right, top, bottom
  • project_root (optional) - Override project root path
Examples:
Completion: The command provides auto-completion for:
  • position=left|right|top|bottom
  • project_root=<available_project_roots>
Source: plugin/avante.lua:70-90

AvanteChat

Start a chat session with AI about your codebase. Similar to AvanteAsk but with ask=false by default. Usage:
Parameters:
  • Same parameters as AvanteAsk
  • Defaults to chat mode (ask=false)
Examples:
Source: plugin/avante.lua:91-100

AvanteChatNew

Create a new chat session. The current chat can be re-opened with the chat session selector. Usage:
Examples:
Source: plugin/avante.lua:101-106

AvanteToggle

Toggle the Avante AI panel visibility. Usage:
Examples:
Source: plugin/avante.lua:107

AvanteBuild

Build dependencies for Avante.nvim. Usage:
Parameters:
  • source (optional) - Build from source (default: false)
Examples:
Completion:
  • source=true
  • source=false
Source: plugin/avante.lua:108-118

AvanteEdit

Edit the selected code block with AI assistance. Usage:
Parameters:
  • range - Visual selection range (line1-line2)
  • instruction (optional) - Editing instruction for the AI
Examples:
Source: plugin/avante.lua:119-123

AvanteRefresh

Refresh all Avante windows to sync with the current buffer. Usage:
Examples:
Source: plugin/avante.lua:124

AvanteFocus

Switch focus between the sidebar and code window. Usage:
Examples:
Source: plugin/avante.lua:125

AvanteSwitchProvider

Switch the AI provider (e.g., Claude, OpenAI, Gemini). Usage:
Description: Opens an interactive selector to choose from available providers. Examples:
Source: plugin/avante.lua:126-135

AvanteSwitchSelectorProvider

Switch the selector provider (e.g., telescope, fzf_lua, mini_pick, snacks). Usage:
Parameters:
  • provider (required) - Name of the selector provider
Examples:
Source: plugin/avante.lua:136-143

AvanteSwitchInputProvider

Switch the input provider for user prompts. Usage:
Parameters:
  • provider (required) - native, dressing, or snacks
Completion:
  • native
  • dressing
  • snacks
Examples:
Source: plugin/avante.lua:144-152

AvanteClear

Clear chat history or cache. Usage:
Parameters:
  • history (default) - Clear current chat history
  • cache - Clear all cached data (requires confirmation)
Completion:
  • history
  • cache
Examples:
Source: plugin/avante.lua:153-176

AvanteShowRepoMap

Display the repository map showing project structure. Usage:
Examples:
Source: plugin/avante.lua:177

AvanteModels

Open the model selector to view and switch between available models. Usage:
Examples:
Source: plugin/avante.lua:178

AvanteHistory

Open the history selector to browse and restore previous chat sessions. Usage:
Examples:
Source: plugin/avante.lua:179

AvanteStop

Stop the current AI request/generation. Usage:
Examples:
Source: plugin/avante.lua:180

Summary Table