{"id":13496133,"url":"https://github.com/jameshiew/nvim-magic","last_synced_at":"2025-03-28T18:31:33.731Z","repository":{"id":44543556,"uuid":"405366316","full_name":"jameshiew/nvim-magic","owner":"jameshiew","description":":genie: Pluggable framework for using AI code assistance in Neovim","archived":true,"fork":false,"pushed_at":"2023-06-08T12:06:18.000Z","size":1144,"stargazers_count":191,"open_issues_count":0,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T22:22:57.421Z","etag":null,"topics":["lua","neovim","neovim-plugin","nvim","openai","openai-codex"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/jameshiew.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2021-09-11T11:54:52.000Z","updated_at":"2025-02-16T06:04:43.000Z","dependencies_parsed_at":"2024-01-14T15:23:28.322Z","dependency_job_id":"5ca7415d-8040-48f5-ac53-983a7dc40ee3","html_url":"https://github.com/jameshiew/nvim-magic","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jameshiew%2Fnvim-magic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jameshiew%2Fnvim-magic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jameshiew%2Fnvim-magic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jameshiew%2Fnvim-magic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jameshiew","download_url":"https://codeload.github.com/jameshiew/nvim-magic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246080530,"owners_count":20720546,"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":["lua","neovim","neovim-plugin","nvim","openai","openai-codex"],"created_at":"2024-07-31T19:01:42.786Z","updated_at":"2025-03-28T18:31:32.974Z","avatar_url":"https://github.com/jameshiew.png","language":"Lua","readme":"\u003e :warning: This repository is no longer maintained. The plugin was last tested to work with Neovim v0.8.3 and OpenAI's API as it was on 14 February, 2023.\n\n\u003e 🍴 There is a fork with ChatGPT support at \u003chttps://github.com/Ricardicus/nvim-magic\u003e\n\n# nvim-magic\n\n![ci](https://github.com/jameshiew/nvim-magic/actions/workflows/ci.yml/badge.svg)\n\nA pluggable framework for integrating AI code assistance into Neovim. The goals are to make using AI code assistance unobtrusive, and to make it easy to create and share new flows that use AI code assistance. Go to [quickstart](#quickstart) for how to install. It currently works with [OpenAI Codex](https://openai.com/blog/openai-codex/).\n\n## Features\n\n### Completion (`\u003cLeader\u003emcs`)\n\n\u003cimg \n\talt='Example of Python script being generated from a docstring'\n\tsrc='docs/gifs/completion.gif'\n\t/\u003e\n\n### Generating a docstring (`\u003cLeader\u003emds`)\n\n\u003cimg \n\talt='Example of Python function having a docstring generated'\n\tsrc='docs/gifs/docstring.gif'\n\t/\u003e\n\n### Asking for an alteration (`\u003cLeader\u003emss`)\n\n\u003cimg \n\talt='Example of Python function being altered'\n\tsrc='docs/gifs/suggest.gif'\n\t/\u003e\n\n## Quickstart\n\n### Prerequisites\n\n- latest stable version of Neovim (nightly may work as well)\n- `curl`\n- OpenAI API key\n\n### Installation\n\n```lua\n-- using packer.nvim\nuse({\n\t'jameshiew/nvim-magic',\n\tconfig = function()\n\t\trequire('nvim-magic').setup()\n\tend,\n\trequires = {\n\t\t'nvim-lua/plenary.nvim',\n\t\t'MunifTanjim/nui.nvim'\n\t}\n})\n```\n\nSee [docs/config.md](docs/config.md) if you want to override the default configuration e.g. to turn off the default keymaps, or use a different OpenAI engine than the default one (`davinci-codex`). Your OpenAI account might not have access to `davinci-codex` if it is not in the OpenAI Codex private beta (as of 2022-02-02).\n\nYour API key should be made available to your Neovim session in an environment variable `OPENAI_API_KEY`. See [docs/openai.md](docs/openai.md) for more details. Note that API calls may be charged for by OpenAI depending on the engine used.\n\n```shell\n export OPENAI_API_KEY='your-api-key-here'\n```\n\n### Keymaps\n\nThese flows have keymaps set by default for visual mode selections (though you can disable this by passing `use_default_keymap = false` in the setup config).\n\nYou can map your own key sequences to the predefined `\u003cPlug\u003e`s if you don't want to use the default keymaps.\n\n| `\u003cPlug\u003e`                              | default keymap | mode   | action                                     |\n| ------------------------------------- | -------------- | ------ | ------------------------------------------ |\n| `\u003cPlug\u003envim-magic-append-completion`  | `\u003cLeader\u003emcs`  | visual | Fetch and append completion                |\n| `\u003cPlug\u003envim-magic-suggest-alteration` | `\u003cLeader\u003emss`  | visual | Ask for an alteration to the selected text |\n| `\u003cPlug\u003envim-magic-suggest-docstring`  | `\u003cLeader\u003emds`  | visual | Generate a docstring                       |\n\n## Development\n\nThere is a [development container](https://containers.dev/) specified under the [`.devcontainer`](.devcontainer/) directory, that builds and installs the latest stable version of Neovim, and sets it up to use the local `nvim-magic` repo as a plugin.\n","funding_links":[],"categories":["Lua"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameshiew%2Fnvim-magic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjameshiew%2Fnvim-magic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjameshiew%2Fnvim-magic/lists"}