{"id":36917586,"url":"https://github.com/default-anton/llm-sidekick.nvim","last_synced_at":"2026-01-12T16:09:43.258Z","repository":{"id":266030400,"uuid":"897125083","full_name":"default-anton/llm-sidekick.nvim","owner":"default-anton","description":"AI-powered companion for Neovim. Fast, hackable, and stays out of your way.","archived":false,"fork":false,"pushed_at":"2025-08-18T19:38:03.000Z","size":635,"stargazers_count":18,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-18T21:28:48.315Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/default-anton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-02T04:25:45.000Z","updated_at":"2025-08-18T19:38:07.000Z","dependencies_parsed_at":"2025-01-03T05:25:58.159Z","dependency_job_id":"5ff2005d-ae6e-421c-984a-2d5cab92504e","html_url":"https://github.com/default-anton/llm-sidekick.nvim","commit_stats":null,"previous_names":["default-anton/llm-sidekick.nvim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/default-anton/llm-sidekick.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-anton%2Fllm-sidekick.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-anton%2Fllm-sidekick.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-anton%2Fllm-sidekick.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-anton%2Fllm-sidekick.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/default-anton","download_url":"https://codeload.github.com/default-anton/llm-sidekick.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/default-anton%2Fllm-sidekick.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T15:50:39.657Z","status":"ssl_error","status_checked_at":"2026-01-12T15:49:49.297Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-12T16:09:41.535Z","updated_at":"2026-01-12T16:09:43.247Z","avatar_url":"https://github.com/default-anton.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# llm-sidekick.nvim\n\nAI-powered companion for Neovim. Fast, hackable, and stays out of your way.\n\n## Table of Contents\n\n- [Features](#features)\n- [Built-in Keybindings](#built-in-keybindings)\n- [Requirements](#requirements)\n  - [Core Requirements](#core-requirements)\n  - [API Requirements](#api-requirements)\n  - [Speech-to-Text Requirements (Optional)](#speech-to-text-requirements-optional)\n- [Installation](#installation)\n- [Supported Models](#supported-models)\n  - [Anthropic Claude Models](#anthropic-claude-models)\n  - [Amazon Bedrock Models](#amazon-bedrock-models)\n  - [Google Gemini Models](#google-gemini-models)\n  - [OpenAI Models](#openai-models)\n  - [DeepSeek AI Models](#deepseek-ai-models)\n- [Usage](#usage)\n  - [Plan Mode](#plan-mode)\n  - [Commands](#commands)\n    - [Core Commands](#core-commands)\n  - [Keybindings](#keybindings)\n- [Telescope Integration](#telescope-integration)\n- [Project Configuration](#project-configuration)\n- [License](#license)\n\n## Features\n\nllm-sidekick.nvim turns your editor into a powerful code companion:\n\n- Supports multiple AI providers, including Google Vertex AI (Gemini family), Google Gemini API, OpenAI, Anthropic Claude, Amazon Bedrock, and DeepSeek\n- `:Chat` - Write, refactor, modify multiple files, have technical discussions about code, debugging, and architecture, and have open-ended discussions for brainstorming and creative tasks\n- `:Accept` - Accept tool under the cursor\n- `:ToggleAcceptEdits` - Toggle auto-accept edits in the current buffer\n- `:AcceptAll` - Accept all tools in the last assistant message\n- `:Add` - Add files, code, or URLs (any web content) to your conversation\n- `:Commit` - Generate commit messages for staged changes\n- `:Stt` - Use speech-to-text input instead of typing\n\n## Built-in Keybindings\n\n- `\u003cC-c\u003e` (Ctrl-C) - Cancel/stop the current model generation. This is a built-in keybinding that cannot be overridden.\n- `\u003cleader\u003eaa` - Accept the suggestion under the cursor. This is a built-in keybinding that provides quick access to the `:Accept` command.\n- `\u003cleader\u003eat` - Toggle auto-accept edits in the current buffer. Quickly enables or disables auto-accept mode for suggested edits.\n- `\u003cleader\u003eA` - Accept all suggestions in the last assistant message. This is a built-in keybinding that provides quick access to the `:AcceptAll` command.\n\nThe plugin is designed to be fast, stay out of your way, and integrate naturally with your Neovim workflow. It supports multiple AI models and lets you choose between quick responses or deep reasoning based on your needs.\n\n## Requirements\n\n### Core Requirements\n- Neovim \u003e= 0.10.0\n- plenary.nvim\n- uv (Python package manager)\n- curl (for API requests)\n- ddgr (for DuckDuckGo search tool)\n\n#### Installing uv\nFollow the [installation instructions](https://docs.astral.sh/uv/getting-started/installation/) for your platform.\n\n#### Installing ddgr\n- Using uv (recommended): `uv tool install ddgr`\n\n#### Installing curl\n- Ubuntu/Debian: `sudo apt-get install curl`\n- macOS: `brew install curl`\n- Arch Linux: `sudo pacman -S curl`\n\n### API Requirements\nYou only need to set up API keys for the providers whose models you intend to use:\n\n#### AWS Bedrock Models\nAWS Bedrock requires several environment variables for authentication and configuration:\n\n**Required Authentication (set one from each pair):**\n- `LLM_SIDEKICK_AWS_ACCESS_KEY_ID` or `AWS_ACCESS_KEY_ID`\n  - Your AWS access key for authentication\n- `LLM_SIDEKICK_AWS_SECRET_ACCESS_KEY` or `AWS_SECRET_ACCESS_KEY`\n  - Your AWS secret key for authentication\n\n**Optional Configuration:**\n- `LLM_SIDEKICK_AWS_REGION` or `AWS_REGION` or `AWS_DEFAULT_REGION`\n  - AWS region for Bedrock API (defaults to 'us-east-1')\n- `LLM_SIDEKICK_ROLE_ARN` or `AWS_ROLE_ARN`\n  - ARN of an IAM role to assume for AWS operations\n- `LLM_SIDEKICK_ROLE_SESSION_NAME` or `AWS_ROLE_SESSION_NAME`\n  - Session name when assuming an IAM role\n\n#### Anthropic (Claude models)\nSet one of these environment variables:\n- `LLM_SIDEKICK_ANTHROPIC_API_KEY`\n- `ANTHROPIC_API_KEY`\n\n#### OpenAI (GPT models)\nSet one of these environment variables:\n- `LLM_SIDEKICK_OPENAI_API_KEY`\n- `OPENAI_API_KEY`\n\n#### DeepSeek AI:\nSet one of these environment variables:\n- `LLM_SIDEKICK_DEEPSEEK_API_KEY`\n- `DEEPSEEK_API_KEY`\n\n#### Google Gemini Models\nSet one of these environment variables:\n- `LLM_SIDEKICK_GEMINI_API_KEY`\n- `GEMINI_API_KEY`\n\n#### Google Vertex AI Models\nSet both of these environment variables:\n- `LLM_SIDEKICK_VERTEXAI_PROJECT` or `VERTEXAI_PROJECT`\n  - Your Google Cloud project ID for Vertex AI\n- `LLM_SIDEKICK_VERTEXAI_LOCATION` or `VERTEXAI_LOCATION`\n  - Your Vertex AI region (e.g. \"us-central1\")\n\n### Speech-to-Text Requirements (Optional)\nRequired only if you plan to use the `:Stt` command:\n- sox (command-line audio recording tool)\n- Working audio input device\n- Groq API key (set as `LLM_SIDEKICK_GROQ_API_KEY` or `GROQ_API_KEY` environment variable) for Whisper model\n\n#### Installing sox\n- Ubuntu/Debian: `sudo apt-get install sox`\n- macOS: `brew install sox`\n- Arch Linux: `sudo pacman -S sox`\n\n## Installation\n\nUsing [lazy.nvim](https://github.com/folke/lazy.nvim):\n\n```lua\n{\n  'default-anton/llm-sidekick.nvim',\n  dependencies = {\n    'nvim-lua/plenary.nvim',\n  },\n  config = function()\n    require('llm-sidekick').setup({\n      -- Model aliases configuration\n      aliases = {\n        pro = \"gemini-2.5-pro\",\n        flash = \"gemini-2.5-flash\",\n        opus = \"claude-opus-4-20250514\",\n        sonnet = \"claude-sonnet-4-20250514\",\n        bedrock_opus = \"anthropic.claude-opus-4\",\n        bedrock_sonnet = \"anthropic.claude-sonnet-4\",\n        deepseek = \"deepseek-chat\",\n        chatgpt = \"gpt-4.1\",\n        mini = \"gpt-4.1-mini\",\n        high_o3 = \"o3-high\",\n        medium_o3 = \"o3-medium\",\n      },\n      yolo_mode = {\n        file_operations = false, -- Automatically accept file operations\n        terminal_commands = false, -- Automatically accept terminal commands\n        auto_commit_changes = true,  -- Enable auto-commit\n      },\n      auto_commit_model = \"gpt-4.1-mini\",  -- Use a specific model for commit messages\n      safe_terminal_commands = {\"mkdir\", \"touch\", \"git commit\"} -- List of terminal commands to automatically accept\n      guidelines = \"\", -- Global guidelines that will be added to every chat\n      default = \"sonnet\",\n    })\n  end,\n}\n```\n\n## Supported Models\n\n### Anthropic Claude Models\n- `claude-opus-4-20250514`\n- `claude-sonnet-4-20250514`\n- `claude-3-7-sonnet-latest`\n- `claude-3-5-sonnet-latest`\n- `claude-3-5-haiku-latest`\n\n### Amazon Bedrock Models\n- `anthropic.claude-sonnet-4`\n- `anthropic.claude-opus-4`\n- `anthropic.claude-3-7-sonnet`\n- `anthropic.claude-3-5-sonnet-20241022-v2:0`\n- `anthropic.claude-3-5-sonnet-20240620-v1:0`\n- `anthropic.claude-3-5-haiku-20241022-v1:0`\n- `anthropic.claude-3-haiku-20240307-v1:0`\n\n### Google Gemini Models\n- `gemini-2.5-pro`\n- `gemini-2.5-flash`\n- `gemini-2.5-flash-lite`\n- `gemini-2.0-flash`\n- `gemini-2.0-flash-lite`\n\n### Google Vertex AI Models\n- `vertex_ai/claude-opus-4`\n- `vertex_ai/claude-sonnet-4`\n- `vertex_ai/gemini-2.5-pro`\n- `vertex_ai/gemini-2.5-flash`\n- `vertex_ai/gemini-2.5-flash-lite`\n- `vertex_ai/gemini-2.0-flash`\n- `vertex_ai/gemini-2.0-flash-lite`\n\n### OpenAI Models\n- `o3-low`\n- `o3-medium`\n- `o3-high`\n- `o4-mini-low`\n- `o4-mini-medium`\n- `o4-mini-high`\n- `gpt-4.1`\n- `gpt-4.1-mini`\n- `gpt-4.1-nano`\n- `o3-mini-low`\n- `o3-mini-medium`\n- `o3-mini-high`\n- `o1-low`\n- `o1-medium`\n- `o1-high`\n- `o1-preview`\n- `gpt-4o`\n- `gpt-4o-2024-11-20`\n- `gpt-4o-2024-08-06`\n- `gpt-4o-2024-05-13`\n- `gpt-4o-mini`\n\n### DeepSeek AI Models\n- `deepseek-chat`: DeepSeek-V3\n\n## Usage\n\n### Commands\n\n### Core Commands\n\n#### `:Chat [args] [paths]`\nOpens a new buffer for all interactions with the LLM.  This single command handles code-related tasks (creating, modifying, or deleting files), technical discussions (debugging, architecture, code explanations), and general conversations (brainstorming, creative writing).\n- Arguments:\n  - Model alias: any defined alias from configuration (e.g., claude, fast, o1, mini, flash)\n  - Opening mode: `t` (tab), `v` (vsplit), `s` (split)\n  - Range: Visual selection to include specific code\n  - File paths: Include content from specific files or directories. Examples:\n    - `%` (current file)\n    - `script.js data.json` (multiple files)\n    - `%:h` (all files in the current directory recursively)\n\n#### `:Add [file|url]`\nAdds content to the last chat with llm-sidekick. Can add content from:\n- Current buffer\n- Selected range\n- Specified file path\n- Directory path (recursively includes all files)\n- URL to documentation or other web content (converted to markdown via jina.ai Reader API - only use with public URLs)\n\nMust be used after the `:Chat` command.\n\n#### `:Accept`\nApplies a single change from the LLM response at the current cursor position. Use for selective, careful modifications.\n\n#### `:AcceptAll`\nApplies all changes from the LLM response at once. Use for bulk, consistent modifications.\n\nBoth commands handle file operations (create/modify/delete) and are available in `:Chat` buffers.\n\n#### `:ToggleAcceptEdits`\nToggles the auto-accept edits mode for the current buffer. When enabled, edits suggested by the assistant will be automatically accepted without prompting for manual approval. Useful for faster workflows when you trust the assistant or are rapidly iterating on changes.\n\n- Can be toggled on/off at any time in buffers managed by llm-sidekick.nvim.\n- Use the corresponding keybinding `\u003cleader\u003eat` for quick access.\n\n#### `:Stt`\nStarts speech-to-text recording at the current cursor position. Shows a floating window with recording status. Press Enter to stop recording and insert the transcribed text, or press q to cancel. Works in both normal and insert modes.\n\n#### `:Commit [context]`\nCommits staged changes using an LLM-generated commit message.\n- If you have staged files, this command will use the LLM to generate a descriptive commit message and commit the changes.\n- If there are no staged files, you'll receive a warning notification.\n- Optional `[context]`: You can provide additional context (e.g., a ticket number or a brief explanation) that will be passed to the LLM to help generate a more relevant commit message.\n\n**Examples:**\n\nCommit staged changes automatically:\n```\n:Commit\n```\n\nCommit staged changes with additional context:\n```\n:Commit Refactor user authentication flow (TICKET-123)\n```\n\n## Keybindings\n\nRecommended keybindings for common operations:\n\n```lua\n-- Chat with LLM about code\nvim.keymap.set('n', '\u003cleader\u003elc', '\u003ccmd\u003eChat vsplit %\u003cCR\u003e', { noremap = true, desc = \"Chat with the current buffer\" })\nvim.keymap.set('v', '\u003cleader\u003elc', '\u003ccmd\u003eChat vsplit\u003cCR\u003e', { noremap = true, desc = \"Chat with selected code\" })\nvim.keymap.set('n', '\u003cleader\u003eld', '\u003ccmd\u003eChat vsplit %:h\u003cCR\u003e', { noremap = true, desc = \"Chat with the current directory\" })\n\n-- Only set \u003cC-a\u003e mappings if not in telescope buffer\nlocal function set_add_keymap()\n  local opts = { noremap = true, silent = true }\n  -- Check if current buffer is not a telescope prompt\n  if vim.bo.filetype ~= \"TelescopePrompt\" and vim.bo.filetype ~= \"oil\" then\n    vim.keymap.set('n', '\u003cC-a\u003e', ':Add\u003cCR\u003e', vim.tbl_extend('force', opts, { desc = \"Add context to LLM\" }))\n    vim.keymap.set('v', '\u003cC-a\u003e', ':Add\u003cCR\u003e', vim.tbl_extend('force', opts, { desc = \"Add selected context to LLM\" }))\n  end\nend\n\n-- Set up an autocmd to run when entering buffers\nvim.api.nvim_create_autocmd({ \"BufEnter\", \"BufWinEnter\" }, {\n  callback = function()\n    set_add_keymap()\n  end,\n})\n\n-- Speech to text\nvim.keymap.set('i', '\u003cC-o\u003e', '\u003ccmd\u003eStt\u003cCR\u003e', { noremap = true, silent = true, desc = \"Speech to text\" })\n```\n\n## Telescope Integration\n\nIf you are using [Telescope](https://github.com/nvim-telescope/telescope.nvim), you can easily add a custom action to include selected files directly into your chat buffer using the `:Add` command.\n\nTo add a keybinding within Telescope to send the selected file to `llm-sidekick.nvim`, add the following to your Telescope configuration:\n\n```lua\nrequire(\"telescope\").setup {\n  defaults = {\n    mappings = {\n      i = {\n        [\"\u003cC-a\u003e\"] = function(prompt_bufnr)\n          local action_state = require(\"telescope.actions.state\")\n\n          local picker = action_state.get_current_picker(prompt_bufnr)\n          local multi_selections = picker:get_multi_selection()\n\n          if vim.tbl_isempty(multi_selections) then\n            local selected_entry = action_state.get_selected_entry()\n            if selected_entry and selected_entry.path then\n              local filepath = selected_entry.path\n              vim.cmd('Add ' .. filepath)\n            else\n              vim.notify(\"No selection\")\n            end\n          else\n            local files = vim.tbl_map(function(s) return s.path end, multi_selections)\n            vim.cmd('Add ' .. table.concat(files, ' '))\n          end\n\n          return true\n        end,\n      },\n    },\n  },\n}\n```\n\nThis configuration adds `\u003cC-a\u003e` in Telescope's `insert` mode to execute the `:Add` command with the currently selected file path, allowing you to quickly add file content to your ongoing chat sessions.\n\n## Project Configuration\n\nllm-sidekick.nvim can be configured per project to provide context-aware assistance.\n\nCreate a `.llmsidekick.lua` file in your project root to define project-specific guidelines and technologies:\n\n````lua\nlocal lsk = require(\"llm-sidekick\")\n\nlocal guidelines = string.format([[\nGeneral information about the project:\n```markdown\n%s\n```\n\nDesign documentation from ./DESIGN.md:\n```markdown\n%s\n```\n\nTailwind CSS configuration file ./tailwind.config.js:\n```javascript\n%s\n```]],\n  lsk.read_file(\"APP.md\"),\n  lsk.read_file(\"DESIGN.md\"),\n  lsk.read_file(\"tailwind.config.js\")\n)\n\nlocal technologies = [[\nFrontend:\n- Tailwind CSS\n  - @tailwindcss/container-queries\n  - @tailwindcss/forms\n  - @tailwindcss/typography\n- PostCSS\n  - autoprefixer\n- React (18.3)\n- Vite (vite_rails)\n- Inertia.js Rails\n  - inertia_rails-contrib\n- Heroicons (React)\n\nBackend:\n- Ruby on Rails (8.0)\n- sqlite3\n]]\n\nreturn {\n  guidelines = guidelines,\n  technologies = technologies,\n}\n````\n\nThis configuration allows you to:\n- Provide project-specific context to the LLM\n- Include design documents and architectural decisions\n- Define technology stack and constraints\n- Load configuration from external files\n- Customize the LLM's behavior based on your project's needs\n\n## License\n\nApache License, Version 2.0\nCopyright (c) 2024 Anton Kuzmenko\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefault-anton%2Fllm-sidekick.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefault-anton%2Fllm-sidekick.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefault-anton%2Fllm-sidekick.nvim/lists"}