{"id":17685583,"url":"https://github.com/cmpadden/chatblade.nvim","last_synced_at":"2025-03-12T16:34:10.049Z","repository":{"id":223033030,"uuid":"758227372","full_name":"cmpadden/chatblade.nvim","owner":"cmpadden","description":"Chatblade integration for Neovim","archived":false,"fork":false,"pushed_at":"2024-03-03T20:11:07.000Z","size":560,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-03T21:25:20.520Z","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}},"created_at":"2024-02-15T21:49:02.000Z","updated_at":"2024-03-03T21:25:20.521Z","dependencies_parsed_at":"2024-02-23T05:24:00.851Z","dependency_job_id":"17af70d1-7b06-49e2-8524-c90a76092ae8","html_url":"https://github.com/cmpadden/chatblade.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%2Fchatblade.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmpadden%2Fchatblade.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmpadden%2Fchatblade.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmpadden%2Fchatblade.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmpadden","download_url":"https://codeload.github.com/cmpadden/chatblade.nvim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221305219,"owners_count":16795091,"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":"2024-10-24T10:28:19.639Z","updated_at":"2025-03-12T16:34:10.028Z","avatar_url":"https://github.com/cmpadden.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg alt=\"chatblade.nvim banner\" src=\".github/chatblade.nvim.png\"\u003e\n    \u003cbr\u003e\n    \u003cp\u003e\n        \u003ci\u003eLeverage \u003ca href=\"https://github.com/npiv/chatblade\"\u003eChatblade\u003c/a\u003e, the Swiss Army Knife for ChatGPT, 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 [Chatblade](https://github.com/npiv/chatblade) CLI\n2. Set the `OPENAI_API_KEY` environment variable\n\n### Installation \u0026 Configuration\n\n```lua\n-- lazy.nvim\n{\n  \"cmpadden/chatblade.nvim\",\n  keys = {\n    { \"\u003cleader\u003ex\", \":Chatblade\u003ccr\u003e\", mode = \"v\" },\n  },\n  cmd = {\n    \"Chatblade\",\n    \"ChatbladeSessionStart\",\n    \"ChatbladeSessionStop\",\n    \"ChatbladeSessionDelete\",\n  },\n  opts = {\n    prompt            = \"programmer\",\n    raw               = true,\n    extract           = true,\n    only              = true,\n    temperature       = 0.8,\n    include_filetype  = true,\n    insert_as_comment = true,\n  }\n}\n```\n\n## Usage\n\n### Bindings\n\nSelect text, and send it to Chatblade with your key binding of choice. For the example\nof `\u003cleader\u003ex`, you can visually select a line or paragraph, send it to Chatblade, 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 Chatblade, and ask follow-up questions with persisted\ncontext.\n\n| Command                | Parameters | Description                                                      |\n| ---------------------- | --------- | ----------------------------------------------------------------- |\n| Chatblade              | `string?` | Prompt Chatblade with visual selection and/or an additional query |\n| ChatbladeSessionStart  | `string`  | Start a session to persist context                                |\n| ChatbladeSessionStop   | `nil`     | Stop the currently active Chatblade session                       |\n| ChatbladeSessionDelete | `string`  | Delete the specified Chatblade session                            |\n\n### Options\n\n| Property              | Type       | Description                                                                                                |\n| --------------------- | ---------- | ---------------------------------------------------------------------------------------------------------- |\n| **prompt**            | `string?`  | Prompt to use found in the `~/.config/chatblade` directory (Default `nil`)                                 |\n| **raw**               | `boolean?` | Whether to return results in pure text (Default `true`)                                                    |\n| **extract**           | `boolean?` | Whether to extract code from response (Default `true`)                                                     |\n| **only**              | `boolean?` | Only display the response, not the original query (Default `true`)                                         |\n| **temperature**       | `float?`   | Lower values for result in more consistent outputs, whereas higher is more creative (Default 0.0; Max 2.0) |\n| **include_filetype**  | `boolean?` | Include filetype metadata in the prompt from active buffer (`vim.bo.filetype`)                             |\n| **insert_as_comment** | `boolean?` | Inserts response as a comment using the `commentstring` defined for the active filetype                    |\n\n## Motivation\n\nIf all you wish to do is to pass text to `chatblade` 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\", ':!chatblade -e -r\u003cCR\u003e')\n```\n\nHowever, _chatblade.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%2Fchatblade.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmpadden%2Fchatblade.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmpadden%2Fchatblade.nvim/lists"}