{"id":23099809,"url":"https://github.com/deifyed/navi","last_synced_at":"2025-08-16T13:31:27.561Z","repository":{"id":153255701,"uuid":"624433018","full_name":"deifyed/naVi","owner":"deifyed","description":"Your NeoVim assistant","archived":false,"fork":false,"pushed_at":"2023-05-16T19:19:26.000Z","size":163,"stargazers_count":37,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-25T01:31:50.496Z","etag":null,"topics":["lua","neovim","neovim-plugin","nvim","openai"],"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/deifyed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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-04-06T13:06:46.000Z","updated_at":"2024-11-10T11:03:23.000Z","dependencies_parsed_at":"2024-04-16T02:48:40.210Z","dependency_job_id":null,"html_url":"https://github.com/deifyed/naVi","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/deifyed%2FnaVi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deifyed%2FnaVi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deifyed%2FnaVi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deifyed%2FnaVi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deifyed","download_url":"https://codeload.github.com/deifyed/naVi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230039170,"owners_count":18163369,"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"],"created_at":"2024-12-16T23:21:10.254Z","updated_at":"2024-12-16T23:21:11.202Z","avatar_url":"https://github.com/deifyed.png","language":"Lua","readme":"# naVi - Your NeoVim assistant\n\n\u003cp align=\"center\"\u003e\n    \u003cb\u003eNatural language first based development\u003c/b\u003e\n    \u003cbr /\u003e\u003cbr /\u003e\n    \u003cimg src=\"./assets/logo.png\" /\u003e\n\u003c/p\u003e\n\n## Usage\n\n`navi.Append()` will open a prompt. Use this prompt to tell naVi what to do. For example, insert a React component outline.\n\n`navi.Edit()` will open a prompt using the current selection as context. Use this prompt to get naVi to make\nchanges to the selected text. For example, remove a bug.\n\n`navi.EditBuffer()` will open a prompt using the current file as context. Use this prompt to get naVi to make\nchanges to the current file. For example, add a new function.\n\n`navi.Review()` will request a review using the current selection as context. The final report will open in a separate window,\nand will not alter the selected text.\n\n`navi.Explain()` will provide an explanation of code using the current selection as context. The explanation will\nopen in a separate window and will not alter the selected text.\n\n`navi.Chat()` will open a chat interface where you can discuss your code with GPT.\n\n## Installation\n\n### Requirements\n\n- [Rust](https://www.rust-lang.org/tools/install)\n- [NeoVim](https://neovim.io/)\n\n### Packer\n\nAdd the following to your Packer config\n\n```lua\n    use({\n        'deifyed/naVi',\n        requires = {'jcdickinson/http.nvim', run = 'cargo build --workspace --release'},\n    })\n```\n### Lazy\n\nAdd the following to your Lazy.vim config\n\n    {\n      'deifyed/naVi',\n      dependencies = { \n        {\n          \"jcdickinson/http.nvim\", build = \"cargo build --workspace --release\",\n        },\n      },\n      config = function()\n        require(\"navi\").setup({ })\n      end,\n      keys = {\n        { \"\u003cleader\u003ena\", \"\u003ccmd\u003elua require('navi').Append()\u003ccr\u003e\", mode = \"n\", desc = \"NaVI append\" },\n        { \"\u003cleader\u003ene\", \"\u003ccmd\u003elua require('navi').Edit()\u003ccr\u003e\", mode = \"v\", desc = \"NaVI edit\" },\n        { \"\u003cleader\u003enb\", \"\u003ccmd\u003elua require('navi').EditBuffer()\u003ccr\u003e\", mode = \"n\", desc = \"NaVI edit buffer\" },\n        { \"\u003cleader\u003enr\", \"\u003ccmd\u003elua require('navi').Review()\u003ccr\u003e\", mode = \"v\", desc = \"NaVI review\" },\n        { \"\u003cleader\u003enx\", \"\u003ccmd\u003elua require('navi').Explain()\u003ccr\u003e\", mode = \"v\", desc = \"NaVI explain\" },\n        { \"\u003cleader\u003enc\", \"\u003ccmd\u003elua require('navi').Chat()\u003ccr\u003e\", mode = \"n\", desc = \"NaVI chat\" },\n      },\n    }\n\n\n## Configuration\n\nin `~/.config/nvim/after/plugin/navi.lua`:\n\n```lua\nlocal navi = require('navi')\n\nnavi.setup({\n    -- OpenAI token. Required\n    openai_token = \"\u003ctoken\u003e\", -- Alternatively, use environment variable OPENAI_TOKEN=\u003ctoken\u003e\n    -- OpenAI model. Optional. Default is gpt-3.5-turbo\n    openai_model = \"gpt-3.5-turbo\",\n    -- OpenAI max tokens. Optional. Default is 512\n    openai_max_tokens = 512,\n    -- OpenAI temperature. Optional. Default is 0.6\n    openai_temperature = 0.6,\n    -- Debug mode. Optional. Default is false\n    debug = false, -- Alternatively, use environment variable NAVI_DEBUG=true\n    -- Setup for input window \n    prompt_window = {\n        border = \"single\",\n        style = \"minimal\",\n        relative = \"editor\",\n    },\n    -- Setup for window showing various reports\n    report_window = {\n        -- Specifies if the report will be shown in a vertical window or in a floating window.\n        window = \"floating\",\n        border = \"single\",\n        style = \"minimal\",\n        relative = \"editor\",\n    },\n})\n\n-- Set keybindings\nvim.api.nvim_set_keymap('v', '\u003cleader\u003ene', '', { callback = navi.Edit })\nvim.api.nvim_set_keymap('i', '\u003cleader\u003ena', '', { callback = navi.Append })\nvim.api.nvim_set_keymap('v', '\u003cleader\u003enr', '', { callback = navi.Review })\nvim.api.nvim_set_keymap('v', '\u003cleader\u003ene', '', { callback = navi.Explain })\nvim.api.nvim_set_keymap('n', '\u003cleader\u003enc', '', { callback = navi.Chat })\n```\n\n## Roadmap\n\n- Make the current file context of the chat interface\n- Make the chat toggleable\n- Improve prompts\n\n## FAQ\n\n- Where can I get an OpenAI token?\n    \u003e https://platform.openai.com/\n- Can naVi close nVim for me?\n    \u003e AI has come far, but not that far. We'll have to wait for human alignment before attempting this.\n- Neat! How can I contribute?\n    \u003e Great! Check out the [contributing guide](./CONTRIBUTING.md) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeifyed%2Fnavi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeifyed%2Fnavi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeifyed%2Fnavi/lists"}