{"id":13675318,"url":"https://github.com/0xStabby/chatgpt-vim","last_synced_at":"2025-04-28T23:30:45.191Z","repository":{"id":65909332,"uuid":"585865925","full_name":"0xStabby/chatgpt-vim","owner":"0xStabby","description":"Use ChatGPT/OpenAI from inside Vim.","archived":false,"fork":false,"pushed_at":"2024-02-06T02:24:46.000Z","size":43928,"stargazers_count":51,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-11T16:41:41.834Z","etag":null,"topics":["chatgpt","gpt","gpt-3","gpt-4","openai","plugin","vim","vim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xStabby.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2023-01-06T09:41:14.000Z","updated_at":"2024-09-03T12:03:35.000Z","dependencies_parsed_at":"2024-01-14T17:11:06.181Z","dependency_job_id":null,"html_url":"https://github.com/0xStabby/chatgpt-vim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xStabby%2Fchatgpt-vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xStabby%2Fchatgpt-vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xStabby%2Fchatgpt-vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xStabby%2Fchatgpt-vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xStabby","download_url":"https://codeload.github.com/0xStabby/chatgpt-vim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251404422,"owners_count":21584089,"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":["chatgpt","gpt","gpt-3","gpt-4","openai","plugin","vim","vim-plugin"],"created_at":"2024-08-02T12:00:37.731Z","updated_at":"2025-04-28T23:30:40.177Z","avatar_url":"https://github.com/0xStabby.png","language":"Vim Script","funding_links":[],"categories":["Vim Script","Code writing and editing"],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/0xStabby/chatgpt-vim\"\u003e\n    \u003cimg src=\"images/chatgpt-vim-logo.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n\u003ch3 align=\"center\"\u003echatgpt-vim\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    ChatGPT/OpenAI in Vim\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/0xStabby/chatgpt-vim\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/0xStabby/chatgpt-vim\"\u003eView Demo\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/0xStabby/chatgpt-vim/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/0xStabby/chatgpt-vim/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\n[![Product Name Screen Shot][product-screenshot]](https://github.com/0xStabby/chatgpt-vim)\n_generating a working todo web app with chatgpt-vim_\n\n#### This plugin provides an easy way to use OpenAI's GPT API from within Vim.\n#### It currently provides three commands and three mappings to make it easy to use.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n### Built With\n\n* [![Vim][Vim.org]][Vim-url]\n* [![ChatGPT][OpenAI.com]][OpenAI-url]\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nTo get a local copy up and running follow these simple example steps.\n\n### Prerequisites\n\n* [openai api key](https://beta.openai.com/account/api-keys)\n* set openai key env variable, add this in your .bashrc\n  ```sh\n  export OPENAI_API_KEY=sk-yourapikey\n  ```\n\nthis plugin also relies on the following utils:\n* bash\n* curl\n* [jq](https://github.com/jqlang/jq)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n### Installation\n\n1. Install with vim plugin manager of your choice\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\n[![GPTFile \u0026 GPTRun Demo][gpf-gpr-demo-gif]](https://github.com/0xStabby/chatgpt-vim)\n\nIf there is a ~/.config/openai.token the openai api will be used by default.\n\n### Commands\n\n- `:Gpt` Prompts the user for a prompt and then uses OpenAI's GPT API or ChatGPT to generate a response.\n- `:GptRun` Prompts the user for a command to run on the current file and then uses OpenAI's GPT API to generate a response based on the contents of the current file and run log.\n- `:GptFile` Prompts the user for a prompt and then uses OpenAI's GPT API to generate a response based on the contents of the current file.\n\n### Mappings\n\n- `gpt` Maps to the `:Gpt` command.\n- `gpr` Maps to the `:GptRun` command.\n- `gpf` Maps to the `:GptFile` command.\n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\n- [x] Ask ChatGPT from Vim\n- [x] Review output\n- [x] Write output to file on user Confirmation\n- [x] Hook up to openai api\n- [ ] Add more functions\n    - [x] Send file contents along with request\n    - [x] Send file contents and run log along with request\n    - [ ] Send visually selected contents along withrequest and replace selected\n    - [ ] More useful stuff as I think of it\n\nSee the [open issues](https://github.com/0xStabby/chatgpt-vim/issues) for a full list of proposed features (and known issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nTwitter: [@0xStabby](https://twitter.com/0xStabby)\n\nProject Link: [https://github.com/0xStabby/chatgpt-vim](https://github.com/0xStabby/chatgpt-vim)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/0xStabby/chatgpt-vim.svg?style=for-the-badge\n[contributors-url]: https://github.com/0xStabby/chatgpt-vim/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/0xStabby/chatgpt-vim.svg?style=for-the-badge\n[forks-url]: https://github.com/0xStabby/chatgpt-vim/network/members\n[stars-shield]: https://img.shields.io/github/stars/0xStabby/chatgpt-vim.svg?style=for-the-badge\n[stars-url]: https://github.com/0xStabby/chatgpt-vim/stargazers\n[issues-shield]: https://img.shields.io/github/issues/0xStabby/chatgpt-vim.svg?style=for-the-badge\n[issues-url]: https://github.com/0xStabby/chatgpt-vim/issues\n[license-shield]: https://img.shields.io/github/license/0xStabby/chatgpt-vim.svg?style=for-the-badge\n[license-url]: https://github.com/0xStabby/chatgpt-vim/blob/master/LICENSE.txt\n[product-screenshot]: images/chatgpt-vim.gif\n[gpf-gpr-demo-gif]: images/gpf-gpr-demo.gif\n[Vim.org]: https://img.shields.io/static/v1?style=for-the-badge\u0026message=Vim\u0026color=019733\u0026logo=Vim\u0026logoColor=FFFFFF\u0026label=\n[Vim-url]: https://vim.org \n[OpenAI.com]: https://img.shields.io/badge/OpenAI-ChatGPT-159776?style=for-the-badge\n[OpenAI-url]: https://chat.openai.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xStabby%2Fchatgpt-vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xStabby%2Fchatgpt-vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xStabby%2Fchatgpt-vim/lists"}