diff --git a/README.md b/README.md index 203c56b..a5016b5 100644 --- a/README.md +++ b/README.md @@ -63,15 +63,35 @@ If you like this project, please consider supporting me on Patreon, as it helps - **One-Click Application**: Quickly apply the AI's suggested changes to your source code with a single command, streamlining the editing process and saving time. - **Project-Specific Instruction Files**: Customize AI behavior by adding a markdown file (`avante.md` by default) in the project root. This file is automatically referenced during workspace changes. You can also configure a custom file name for tailored project instructions. -## project instructions with avante.md +## Zen Mode -the `avante.md` file allows you to provide project-specific context and instructions to the ai. this file should be placed in your project root and will be automatically referenced during all interactions with avante. +Due to the prevalence of claude code, it is clear that this is an era of Coding Agent CLIs. As a result, there are many arguments like: in the Vibe Coding era, editors are no longer needed; you only need to use the CLI in the terminal. But have people realized that for more than half a century, Terminal-based Editors have solved and standardized the biggest problem with Terminal-based applications — that is, the awkward TUI interactions! No matter how much these Coding Agent CLIs optimize their UI/UX, their UI/UX will always be a subset of Terminal-based Editors (Vim, Emacs)! They cannot achieve Vim’s elegant action + text objects abstraction (imagine how you usually edit large multi-line prompts in an Agent CLI), nor can they leverage thousands of mature Vim/Neovim plugins to help optimize TUI UI/UX—such as easymotions and so on. Moreover, when they want to view or modify code, they often have to jump into other applications which forcibly interrupts the UI/UX experience. -### best practices for avante.md +Therefore, Avante’s Zen Mode was born! It looks like a Vibe Coding Agent CLI but it is completely Neovim underneath. So you can use your muscle-memory Vim operations and those rich and mature Neovim plugins on it. At the same time, by leveraging ACP it has all capabilities of claude code / gemini-cli / codex! Why not enjoy both? + +Now all you need to do is alias this command to avante; then every time you simply type avante just like using claude code and enter Avante’s Zen Mode! + +```bash +alias avante='nvim -c "lua vim.defer_fn(function()require(\"avante.api\").zen_mode()end, 100)"' +``` + +The effect is as follows: + +Avante Zen Mode + +## Project instructions with avante.md + +
+ + +The `avante.md` file allows you to provide project-specific context and instructions to the ai. this file should be placed in your project root and will be automatically referenced during all interactions with avante. + + +### Best practices for avante.md to get the most out of your project instruction file, consider following this structure: -#### your role +#### Your role define the ai's persona and expertise level for your project: @@ -81,7 +101,7 @@ define the ai's persona and expertise level for your project: you are an expert senior software engineer specializing in [technology stack]. you have deep knowledge of [specific frameworks/tools] and understand best practices for [domain/industry]. you write clean, maintainable, and well-documented code. you prioritize code quality, performance, and security in all your recommendations. ``` -#### your mission +#### Your mission clearly describe what the ai should focus on and how it should help: @@ -98,7 +118,7 @@ your primary goal is to help build and maintain [project description]. you shoul - help write comprehensive tests for new features ``` -#### additional sections to consider +#### Additional sections to consider - **project context**: brief description of the project, its goals, and target users - **technology stack**: list of technologies, frameworks, and tools used @@ -146,6 +166,8 @@ myapp is a modern e-commerce platform targeting small businesses. we prioritize - follow the existing folder structure and naming conventions ``` +
+ ## Installation For building binary if you wish to build from source, then `cargo` is required. Otherwise `curl` and `tar` will be used to get prebuilt binary from GitHub. diff --git a/lua/avante/api.lua b/lua/avante/api.lua index a14d5f6..03da2a2 100644 --- a/lua/avante/api.lua +++ b/lua/avante/api.lua @@ -126,6 +126,8 @@ function M.full_view_ask() }) end +M.zen_mode = M.full_view_ask + ---@param opts? AskOptions function M.ask(opts) opts = opts or {} diff --git a/lua/avante/config.lua b/lua/avante/config.lua index 20b20a8..efccda2 100644 --- a/lua/avante/config.lua +++ b/lua/avante/config.lua @@ -556,7 +556,7 @@ M._defaults = { -- NOTE: The following will be safely set by avante.nvim ask = "aa", new_ask = "an", - full_view_ask = "am", + zen_mode = "az", edit = "ae", refresh = "ar", focus = "af", diff --git a/lua/avante/init.lua b/lua/avante/init.lua index 8cceb2e..986a0ab 100644 --- a/lua/avante/init.lua +++ b/lua/avante/init.lua @@ -96,9 +96,9 @@ function H.keymaps() ) Utils.safe_keymap_set( { "n", "v" }, - Config.mappings.full_view_ask, - function() require("avante.api").full_view_ask() end, - { desc = "avante: ask with full result view" } + Config.mappings.zen_mode, + function() require("avante.api").zen_mode() end, + { desc = "avante: toggle Zen Mode" } ) Utils.safe_keymap_set( { "n", "v" },