{"id":19188907,"url":"https://github.com/kelvins/vim-gpt","last_synced_at":"2025-07-19T04:32:38.024Z","repository":{"id":260367416,"uuid":"622727897","full_name":"kelvins/vim-gpt","owner":"kelvins","description":":robot: GPT plugin for Vim","archived":false,"fork":false,"pushed_at":"2023-04-08T18:47:08.000Z","size":2216,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T02:48:44.551Z","etag":null,"topics":["ai","gpt","plugin","vim"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","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/kelvins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-04-02T23:51:00.000Z","updated_at":"2023-12-28T01:38:09.000Z","dependencies_parsed_at":"2024-10-30T23:43:22.366Z","dependency_job_id":"39021eff-2131-4d84-b7ed-7102504cb827","html_url":"https://github.com/kelvins/vim-gpt","commit_stats":null,"previous_names":["kelvins/vim-gpt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kelvins/vim-gpt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Fvim-gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Fvim-gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Fvim-gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Fvim-gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kelvins","download_url":"https://codeload.github.com/kelvins/vim-gpt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Fvim-gpt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265888898,"owners_count":23844527,"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":["ai","gpt","plugin","vim"],"created_at":"2024-11-09T11:26:41.692Z","updated_at":"2025-07-19T04:32:38.002Z","avatar_url":"https://github.com/kelvins.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpt.vim\n\nA Vim plugin for using Generative Pre-trained Transformer (GPT) from OpenAI API.\n\n![Demo GIF](imgs/demo.gif)\n\n## Installation\n\n[vim-plug](https://github.com/junegunn/vim-plug)\n\n```\nPlug 'kelvins/vim-gpt'\n```\n\n[Vundle](https://github.com/VundleVim/Vundle.vim)\n\n```\nPlugin 'kelvins/vim-gpt'\n```\n\n### Dependencies\n\n- `curl`: to execute HTTP requests to the OpenAI API.\n- `jq`: to parse JSON responses.\n\n### Environment Variable\n\nTo use the OpenAI API you will need an API key. To get an API key, go to OpenAI platform web site ([here](https://platform.openai.com/account/api-keys)), create an account and generate the API key. Now, set the API key in the `$OPENAI_API_KEY` environment variable, for example:\n\n```\nexport OPENAI_API_KEY=s4jyM5kSMbw7MG6Uqv3bw3T3B4b4F6X9pLpz36vr8eaKzXPC\n```\n\n## Usage\n\nIn Vim normal mode just type `:GPT` and an input prompt will be displayed, just type the content you want to send and hit `Enter`, for example:\n\n```\nPrompt: Write a Hello World function in Rust\n```\n\nIt will open a popup window with a response preview so you can type `q` to ignore and close the popup or `w` to close the popup and copy the content to the current buffer.\n\n### Tip\n\nYou can map a shortcut like `ctrl + g`, in your `~/.vimrc` file, to open the prompt, for example:\n\n```\nnnoremap \u003cC-g\u003e \u003cESC\u003e:GPT\u003cCR\u003e\n```\n\n## Disclaimers\n\nThis plugin uses the OpenAI API, so be careful with sensitive information.\n\nGPT doesn't always give correct answers, remember to double check any text or code generated by the AI.\n\n## Contributing\n\nAll contributions are welcome! Please take a look at the [contribution guidelines](CONTRIBUTING.md) first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvins%2Fvim-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkelvins%2Fvim-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvins%2Fvim-gpt/lists"}