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:
:AvanteAsk [question] [position=<position>] [project_root=<path>]
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:
" Open sidebar in ask mode
:AvanteAsk

" Ask a specific question
:AvanteAsk How can I optimize this function?

" Ask with custom position
:AvanteAsk position=left Refactor this code

" Ask with custom project root
:AvanteAsk project_root=/path/to/project Explain this implementation
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:
:AvanteChat [position=<position>] [project_root=<path>]
Parameters:
  • Same parameters as AvanteAsk
  • Defaults to chat mode (ask=false)
Examples:
" Start a chat session
:AvanteChat

" Chat with custom window position
:AvanteChat position=right
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:
:AvanteChatNew
Examples:
" Start a fresh chat session
:AvanteChatNew
Source: plugin/avante.lua:101-106

AvanteToggle

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

AvanteBuild

Build dependencies for Avante.nvim. Usage:
:AvanteBuild [source=<true|false>]
Parameters:
  • source (optional) - Build from source (default: false)
Examples:
" Build using pre-built binaries
:AvanteBuild

" Build from source (requires cargo)
:AvanteBuild source=true
Completion:
  • source=true
  • source=false
Source: plugin/avante.lua:108-118

AvanteEdit

Edit the selected code block with AI assistance. Usage:
:[range]AvanteEdit [instruction]
Parameters:
  • range - Visual selection range (line1-line2)
  • instruction (optional) - Editing instruction for the AI
Examples:
" Edit visual selection with prompt
:'<,'>AvanteEdit Add error handling

" Edit with multi-word instruction
:'<,'>AvanteEdit Refactor to use async/await
Source: plugin/avante.lua:119-123

AvanteRefresh

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

AvanteFocus

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

AvanteSwitchProvider

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

AvanteSwitchSelectorProvider

Switch the selector provider (e.g., telescope, fzf_lua, mini_pick, snacks). Usage:
:AvanteSwitchSelectorProvider <provider>
Parameters:
  • provider (required) - Name of the selector provider
Examples:
" Switch to telescope
:AvanteSwitchSelectorProvider telescope

" Switch to fzf_lua
:AvanteSwitchSelectorProvider fzf_lua
Source: plugin/avante.lua:136-143

AvanteSwitchInputProvider

Switch the input provider for user prompts. Usage:
:AvanteSwitchInputProvider <provider>
Parameters:
  • provider (required) - native, dressing, or snacks
Completion:
  • native
  • dressing
  • snacks
Examples:
" Switch to native input
:AvanteSwitchInputProvider native

" Switch to snacks for modern UI
:AvanteSwitchInputProvider snacks
Source: plugin/avante.lua:144-152

AvanteClear

Clear chat history or cache. Usage:
:AvanteClear [history|cache]
Parameters:
  • history (default) - Clear current chat history
  • cache - Clear all cached data (requires confirmation)
Completion:
  • history
  • cache
Examples:
" Clear current chat history
:AvanteClear
:AvanteClear history

" Clear all cache (prompts for confirmation)
:AvanteClear cache
Source: plugin/avante.lua:153-176

AvanteShowRepoMap

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

AvanteModels

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

AvanteHistory

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

AvanteStop

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

Summary Table

CommandDescriptionRange Support
AvanteAskAsk AI about codeNo
AvanteChatStart chat sessionNo
AvanteChatNewCreate new chatNo
AvanteToggleToggle sidebarNo
AvanteBuildBuild dependenciesNo
AvanteEditEdit selected codeYes
AvanteRefreshRefresh windowsNo
AvanteFocusSwitch focusNo
AvanteSwitchProviderSwitch AI providerNo
AvanteSwitchSelectorProviderSwitch selectorNo
AvanteSwitchInputProviderSwitch input UINo
AvanteClearClear history/cacheNo
AvanteShowRepoMapShow repo structureNo
AvanteModelsShow model selectorNo
AvanteHistoryBrowse chat historyNo
AvanteStopStop AI requestNo

Build docs developers (and LLMs) love