{"id":28075148,"url":"https://github.com/cmpadden/llm.nvim","last_synced_at":"2025-05-13T00:03:19.755Z","repository":{"id":223033030,"uuid":"758227372","full_name":"cmpadden/llm.nvim","owner":"cmpadden","description":"Chatblade integration for Neovim","archived":false,"fork":false,"pushed_at":"2025-04-09T02:19:45.000Z","size":1254,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T00:03:15.814Z","etag":null,"topics":["chatblade","chatgpt","llm","neovim"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmpadden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-02-15T21:49:02.000Z","updated_at":"2025-04-09T02:19:48.000Z","dependencies_parsed_at":"2024-02-23T05:24:00.851Z","dependency_job_id":"17af70d1-7b06-49e2-8524-c90a76092ae8","html_url":"https://github.com/cmpadden/llm.nvim","commit_stats":null,"previous_names":["cmpadden/chatblade.nvim"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmpadden%2Fllm.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmpadden%2Fllm.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmpadden%2Fllm.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmpadden%2Fllm.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmpadden","download_url":"https://codeload.github.com/cmpadden/llm.nvim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843200,"owners_count":21972872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["chatblade","chatgpt","llm","neovim"],"created_at":"2025-05-13T00:03:19.314Z","updated_at":"2025-05-13T00:03:19.740Z","avatar_url":"https://github.com/cmpadden.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg alt=\"llm.nvim banner\" src=\".github/llm.nvim.png\"\u003e\n    \u003cbr\u003e\n    \u003cp\u003e\n      \u003ci\u003eLeverage \u003ca href=\"https://github.com/simonw/llm\"\u003e\u003ccode\u003ellm\u003c/code\u003e\u003c/a\u003e, a CLI utility and Python library for interacting with Large Language Models, from your Neovim editor.\u003c/i\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\n## Setup\n\n### Prerequisites\n\n1. Install the [llm](https://github.com/simonw/llm) CLI\n2. Set the API key for the LLM provider of your choice\n\n### Installation \u0026 Configuration\n\n```lua\n-- lazy.nvim\n{\n  \"cmpadden/llm.nvim\",\n  keys = {\n    { \"\u003cleader\u003ex\", \":LLM\u003ccr\u003e\", mode = \"v\" },\n  },\n  cmd = {\n    \"LLM\",\n  },\n  opts = {\n    -- `llm` flag configuration parameters\n    model             = \"claude-3.5-haiku\",  -- TEXT            Model to use\n    system            = nil,                 -- TEXT            System prompt to use\n    continue          = nil,                 --                 Continue the most recent conversation.\n    conversation      = nil,                 -- TEXT            Continue the conversation with the given ID.\n    template          = nil,                 -- TEXT            Template to use\n    param             = nil,                 -- \u003cTEXT TEXT\u003e...  Parameters for template\n    option            = nil,                 -- \u003cTEXT TEXT\u003e...  key/value options for the model\n\n    -- nvim-specific configuration parameters\n    insert_as_comment = true                 -- BOOL            Insert the prompt response as a comment\n  }\n}\n```\n\n## Usage\n\n### Bindings\n\nSelect text, and send it to LLM with your key binding of choice. For the example\nof `\u003cleader\u003ex`, you can visually select a line or paragraph, send it to LLM, and\nthe response will be inserted below your cursor.\n\n```\nvip\u003cleader\u003ex\n```\n\n### Commands\n\nThe following user commands have been made available. This allows you to handle sessions\nso that you can send snippets to LLM, and ask follow-up questions with persisted\ncontext.\n\n| Command                | Parameters | Description                                                      |\n| ---------------------- | --------- | ----------------------------------------------------------------- |\n| LLM                    | `string?` | Prompt LLM with visual selection and/or an additional query |\n\n## Motivation\n\nIf all you wish to do is to pass text to `llm` from your Neovim session, then you may be better off defining a key binding like so:\n\n```lua\nvim.keymap.set(\"v\", \"\u003cleader\u003ex\", ':!LLM -e -r\u003cCR\u003e')\n```\n\nHowever, _llm.nvim_ intends to offer some quality of life improvements over such a bindings.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\".github/fire.svg\" height=\"25\" width=\"25\"\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmpadden%2Fllm.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmpadden%2Fllm.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmpadden%2Fllm.nvim/lists"}