{"id":18187736,"url":"https://github.com/vim-utilities/proompter","last_synced_at":"2025-04-07T13:46:14.745Z","repository":{"id":258727268,"uuid":"863842356","full_name":"vim-utilities/proompter","owner":"vim-utilities","description":"Leverage local LLM via Vim to boost bug breading within your code ;-P","archived":false,"fork":false,"pushed_at":"2024-11-16T01:24:56.000Z","size":283,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T16:41:37.156Z","etag":null,"topics":["ai","llm","ml","ollama-client","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":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vim-utilities.png","metadata":{"files":{"readme":".github/README.md","changelog":"CHANGELOG.md","contributing":null,"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,"publiccode":null,"codemeta":null},"funding":{"liberapay":"vim-utilities"}},"created_at":"2024-09-27T02:42:01.000Z","updated_at":"2024-11-16T01:25:02.000Z","dependencies_parsed_at":"2025-02-14T13:46:46.351Z","dependency_job_id":null,"html_url":"https://github.com/vim-utilities/proompter","commit_stats":null,"previous_names":["vim-utilities/proompter"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-utilities%2Fproompter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-utilities%2Fproompter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-utilities%2Fproompter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-utilities%2Fproompter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vim-utilities","download_url":"https://codeload.github.com/vim-utilities/proompter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247666006,"owners_count":20975785,"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","llm","ml","ollama-client","plugin","vim","vim-plugin"],"created_at":"2024-11-03T02:03:01.549Z","updated_at":"2025-04-07T13:46:14.707Z","avatar_url":"https://github.com/vim-utilities.png","language":"Vim Script","funding_links":["https://liberapay.com/vim-utilities"],"categories":[],"sub_categories":[],"readme":"# Proompter\n[heading__top]:\n  #proompter\n  \"\u0026#x2B06; Leverage local LLM via Vim to boost bug breading within your code\"\n\n\nLeverage local LLM via Vim to boost bug breading within your code\n\n## [![Byte size of Proompter][badge__main__proompter__source_code]][proompter__main__source_code] [![Open Issues][badge__issues__proompter]][issues__proompter] [![Open Pull Requests][badge__pull_requests__proompter]][pull_requests__proompter] [![Latest commits][badge__commits__proompter__main]][commits__proompter__main][![GitHub Actions Build Status][badge__github_actions]][activity_log__github_actions][![License][badge__license]][branch__current__license]\n\n\n---\n\n\n- [:arrow_up: Top of Document][heading__top]\n- [:building_construction: Requirements][heading__requirements]\n  - [Development dependencies][heading__development_dependencies]\n- [:zap: Quick Start][heading__quick_start]\n  - [List available user paths for SystemD services][heading__list_available_user_paths_for_systemd_services]\n  - [Install with Vim package manager of choice][heading__install_with_vim_package_manager_of_choice]\n  - [Ensure the Ollama service is running][heading__ensure_the_ollama_service_is_running]\n  - [Ensure the Vim channel proxy is running][heading__ensure_the_vim_channel_proxy_is_running]\n- [\u0026#x1F9F0; Usage][heading__usage]\n  - [Author or select a callback][heading__author_or_select_a_callback]\n  - [Configure Proompter][heading__configure_proompter]\n- [\u0026#x1F5D2; Notes][heading__notes]\n- [:chart_with_upwards_trend: Contributing][heading__contributing]\n  - [:trident: Forking][heading__forking]\n  - [:currency_exchange: Sponsor][heading__sponsor]\n- [:card_index: Attribution][heading__attribution]\n- [:balance_scale: Licensing][heading__license]\n  - [Commercial and/or proprietary use][heading__commercial_andor_proprietary_use]\n  - [Non-commercial and FOSS use][heading__noncommercial_and_foss_use]\n\n\n---\n\n\n\n## Requirements\n[heading__requirements]:\n  #requirements\n  \"\u0026#x1F3D7; Prerequisites and/or dependencies that this project needs to function properly\"\n\n\nThis repository requires the [Vim][vim__home] text editor to be installed the\nsource code is available on [GitHub -- `vim/vim`][vim__github], and most GNU\nLinux package managers are able to install Vim directly, eg...\n\n\n- Arch based Operating Systems\n   ```bash\n   sudo packman -Syy\n   sudo packman -S vim\n   ```\n- Debian derived Distributions\n   ```bash\n   sudo apt-get update\n   sudo apt-get install vim\n   ```\n\n...  Additionally for local LLM interactions this plugin expects\n[ollama](https://github.com/ollama/ollama) to be installed and running, as well\nas [Python](https://www.python.org/) run-time to facilitate\n`scripts/proompter-channel-proxy.py` service.\n\n\n---\n\n\n### Development dependencies\n[heading__development_dependencies]: #development-dependencies\n\n\n- [Vim Doc](https://github.com/vim-utilities/vimdoc) for help from doc-comments\n   ```bash\n   git clone https://github.com/vim-utilities/vimdoc\n   pushd vimdoc\n   python setup.py config\n   python setup.py build\n   pipx install .\n   popd\n   ```\n   \u003e Execute with `vimdoc .`\n   \u003e\n   \u003e Note; until certain bugs are fixed upstream it is necessary to use the\n   \u003e patched version of `vimdoc` which handles longer lines, and Vim 8\n   \u003e parameters a _bit_ more correctly.\n- [Vader](https://github.com/junegunn/vader.vim) for testing code\n   ```vim\n   call plug#begin('~/.vim/plugged')\n     Plug 'junegunn/vader.vim'\n   call plug#end()\n   ```\n   \u003e Execute with `scripts/vader-run-tests.sh --cicd --test units`\n\n\n______\n\n\n## Quick Start\n[heading__quick_start]:\n  #quick-start\n  \"\u0026#9889; Perhaps as easy as one, 2.0,...\"\n\n\n### List available user paths for SystemD services\n[heading__list_available_user_paths_for_systemd_services]: #list-available-user-paths-for-systemd-services\n\n```bash\nsystemd-analyze --user unit-paths | grep $HOME\n```\n\n**Example output**\n\n```\n~/.config/systemd/user.control\n~/.config/systemd/user\n~/.config/kdedefaults/systemd/user\n~/.local/share/systemd/user\n```\n\n### Install with Vim package manager of choice\n[heading__install_with_vim_package_manager_of_choice]: #install-with-vim-package-manager-of-choice\n\n```vim\nPlug 'vim-utilities/proompter' {\n     \\   'do': 'scripts/proompter-channel-proxy.py --install-systemd \"' . $HOME . '/.local/share/systemd/user/proompter-channel-proxy.service\"'\n     \\ }\n```\n\n\u003e Note: if installing manually, such as cloning via Git, then you may invoke\n\u003e the proxy installation directly;\n\u003e\n\u003e `scripts/proompter-channel-proxy.py --install-systemd \"$HOME/.local/share/systemd/user/proompter-channel-proxy.service\"`\n\u003e\n\u003e Dev tip: if modifying the installed SystemD configuration you may pop\n\u003e warnings, about changes detected on disk here's how to fix that;\n\u003e\n\u003e `systemctl --user daemon-reload`\n\n---\n\n### Ensure the Ollama service is running\n[heading__ensure_the_ollama_service_is_running]: #ensure-the-ollama-service-is-running\n\n```bash\nsystemctl is-active --quiet ollama.service || {\n  sudo systemctl restart ollama.service\n}\n```\n\n---\n\n### Ensure the Vim channel proxy is running\n[heading__ensure_the_vim_channel_proxy_is_running]: #ensure-the-vim-channel-proxy-is-running\n\n```bash\nsystemctl --user is-active --quiet proompter-channel-proxy.service || {\n  systemctl --user proompter-channel-proxy.service\n}\n```\n\n______\n\n\n## Usage\n[heading__usage]:\n  #usage\n  \"\u0026#x1F9F0; How to utilize this repository\"\n\n\nCurrently no Motions or Commands are provided, and such customization is an\nexercise for each entity using this plugin.  Instead there are a kit of helper\nfunctions, and some `examples/`, for creating your own Vim/LLM integration\nexperience!\n\n---\n\n### Author or select a callback\n[heading__author_or_select_a_callback]: #author-or-select-a-callback\n\n\u003e Tip: find example callback functions within;\n\u003e\n\u003e -  `autoload/proompter/callback/channel.vim`\n\u003e -  `autoload/proompter/callback/prompt.vim`\n\n```vim\nfunction! MyProompterLineStreamCallback(channel_response, api_response, ...) abort\n  let l:http_response = proompter#parse#HTTPResponse(a:api_response)\n  for l:http_body_data in l:http_response.body\n    let l:api_data = proompter#parse#MessageOrResponseFromAPI(l:http_body_data)\n    echoe 'l:api_data -\u003e' l:api_data\n  endfor\nendfunction\n```\n\n---\n\n### Configure Proompter\n[heading__configure_proompter]: #configure-proompter\n\n```vim\nlet g:proompter = {\n      \\   'select': {\n      \\     'model_name': 'codellama',\n      \\     'completion_endpoint': 'chat',\n      \\   },\n      \\   'api': {\n      \\     'url': 'http://127.0.0.1:11434',\n      \\   },\n      \\   'channel': {\n      \\     'address': '127.0.0.1:11435',\n      \\     'options': {\n      \\       'mode': 'raw',\n      \\       'callback': function('MyProompterLineStreamCallback'),\n      \\     },\n      \\   },\n      \\   'models': {\n      \\     'codellama': {\n      \\       'data': {\n      \\         'prompt': '\u003c\u003cSYS\u003e\u003ePretend you are a senior software engineer\u003c\u003c/SYS\u003e\u003e',\n      \\         'raw': v:false,\n      \\         'stream': v:true,\n      \\       },\n      \\     },\n      \\   },\n      \\ }\n```\n\n\u003e Tip: check `:help proompter-configuration` for some more advanced example(s)\n\n\n______\n\n\n## Notes\n[heading__notes]:\n  #notes\n  \"\u0026#x1F5D2; Additional things to keep in mind when developing\"\n\n\nThis repository may not be feature complete and/or fully functional, Pull\nRequests that add features or fix bugs are certainly welcomed.\n\n\u003e Tip: check the `CHANGELOG.md` for features and/or bugs that may want\n\u003e attentions of those so inclined.\n\nMost of the code and documentation, at least up to tagged version `0.0.1`, is\nauthored by a human.  LLMs were no help with Vim script.\n\n\n______\n\n\n## Contributing\n[heading__contributing]:\n  #contributing\n  \"\u0026#x1F4C8; Options for contributing to proompter and vim-utilities\"\n\n\nOptions for contributing to Proompter and Vim Utilities\n\n\n---\n\n\n### Forking\n[heading__forking]:\n  #forking\n  \"\u0026#x1F531; Tips for forking proompter\"\n\n\nStart making a [Fork][proompter__fork_it] of this repository to an account that\nyou have write permissions for.\n\n\n- Add remote for fork URL. The URL syntax is\n  _`git@github.com:\u003cNAME\u003e/\u003cREPO\u003e.git`_...\n\n\n```bash\ncd ~/git/hub/vim-utilities/proompter\n\ngit remote add fork git@github.com:\u003cNAME\u003e/proompter.git\n```\n\n- Adjust your package manager configuration\n   ```vim\n   Plug '~/git/hub/vim-utilities/proompter' { 'do': '' }\n   ```\n\n- Commit your changes and push to your fork, eg. to fix an issue...\n\n```bash\ncd ~/git/hub/vim-utilities/proompter\n\n\ngit commit -F- \u003c\u003c'EOF'\n:bug: Fixes #42 Issue\n\n\n**Edits**\n\n\n- `\u003cSCRIPT-NAME\u003e` script, fixes some bug reported in issue\nEOF\n\n\ngit push fork main\n```\n\n\u003e Note, the `-u` option may be used to set `fork` as the default remote, eg.\n\u003e _`git push -u fork main`_ however, this will also default the `fork` remote\n\u003e for pulling from too! Meaning that pulling updates from `origin` must be done\n\u003e explicitly, eg. _`git pull origin main`_\n\n- Then on GitHub submit a Pull Request through the Web-UI, the URL syntax is\n  _`https://github.com/\u003cNAME\u003e/\u003cREPO\u003e/pull/new/\u003cBRANCH\u003e`_\n\n\n\u003e Note; to decrease the chances of your Pull Request needing modifications\n\u003e before being accepted, please check the\n\u003e [dot-github](https://github.com/vim-utilities/.github) repository for\n\u003e detailed contributing guidelines.\n\n\n---\n\n\n### Sponsor\n  [heading__sponsor]:\n  #sponsor\n  \"\u0026#x1F4B1; Methods for financially supporting vim-utilities that maintains proompter\"\n\n\nThanks for even considering it!\n\n\nVia Liberapay you may\n\u003csub\u003e[![sponsor__shields_io__liberapay]][sponsor__link__liberapay]\u003c/sub\u003e on a\nrepeating basis.\n\n\nRegardless of if you're able to financially support projects such as proompter\nthat vim-utilities maintains, please consider sharing projects that are useful\nwith others, because one of the goals of maintaining Open Source repositories\nis to provide value to the community.\n\n\n______\n\n\n## Attribution\n[heading__attribution]:\n  #attribution\n  \"\u0026#x1F4C7; Resources that where helpful in building this project so far.\"\n\n\n- [GitHub -- `github-utilities/make-readme`](https://github.com/github-utilities/make-readme)\n- [Stack Overflow -- Understanding Python HTTP streaming](https://stackoverflow.com/questions/17822342/understanding-python-http-streaming)\n\n\n______\n\n\n## License\n[heading__license]:\n  #license\n  \"\u0026#x2696; Legal side of Open Source\"\n\nThis project is licensed based on use-case\n\n### Commercial and/or proprietary use\n[heading__commercial_andor_proprietary_use]: #commercial-andor-proprietary-use\n\nIf a project is **either** commercial or (`||`) proprietary, then please\ncontact the author for pricing and licensing options to make use of code and/or\nfeatures from this repository.\n\n---\n\n### Non-commercial and FOSS use\n[heading__noncommercial_and_foss_use]: #noncommercial-and-foss-use\n\nIf a project is **both** non-commercial and (`\u0026\u0026`) published with a license\ncompatible with AGPL-3.0, then it may utilize code from this repository under\nthe following terms.\n\n```\nLeverage local LLM via Vim to boost bug breading within your code\nCopyright (C) 2024 S0AndS0\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published\nby the Free Software Foundation, version 3 of the License.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n```\n\n\nFor further details review full length version of\n[AGPL-3.0][branch__current__license] License.\n\n\n\n[branch__current__license]:\n  /LICENSE\n  \"\u0026#x2696; Full length version of AGPL-3.0 License\"\n\n[badge__license]:\n  https://img.shields.io/github/license/vim-utilities/proompter\n\n[badge__commits__proompter__main]:\n  https://img.shields.io/github/last-commit/vim-utilities/proompter/main.svg\n\n[commits__proompter__main]:\n  https://github.com/vim-utilities/proompter/commits/main\n  \"\u0026#x1F4DD; History of changes on this branch\"\n\n[proompter__community]:\n  https://github.com/vim-utilities/proompter/community\n  \"\u0026#x1F331; Dedicated to functioning code\"\n\n[issues__proompter]:\n  https://github.com/vim-utilities/proompter/issues\n  \"\u0026#x2622; Search for and _bump_ existing issues or open new issues for project maintainer to address.\"\n\n[proompter__fork_it]:\n  https://github.com/vim-utilities/proompter/fork\n  \"\u0026#x1F531; Fork it!\"\n\n[pull_requests__proompter]:\n  https://github.com/vim-utilities/proompter/pulls\n  \"\u0026#x1F3D7; Pull Request friendly, though please check the Community guidelines\"\n\n[proompter__main__source_code]:\n  https://github.com/vim-utilities/proompter/\n  \"\u0026#x2328; Project source!\"\n\n[badge__issues__proompter]:\n  https://img.shields.io/github/issues/vim-utilities/proompter.svg\n\n[badge__pull_requests__proompter]:\n  https://img.shields.io/github/issues-pr/vim-utilities/proompter.svg\n\n[badge__main__proompter__source_code]:\n  https://img.shields.io/github/repo-size/vim-utilities/proompter\n\n[vim__home]:\n  https://www.vim.org\n  \"Home page for the Vim text editor\"\n\n[vim__github]:\n  https://github.com/vim/vim\n  \"Source code for Vim on GitHub\"\n\n[sponsor__shields_io__liberapay]:\n  https://img.shields.io/static/v1?logo=liberapay\u0026label=Sponsor\u0026message=vim-utilities\n\n[sponsor__link__liberapay]:\n  https://liberapay.com/vim-utilities\n  \"\u0026#x1F4B1; Sponsor developments and projects that vim-utilities maintains via Liberapay\"\n\n\n[badge__github_actions]:\n  https://github.com/vim-utilities/proompter/actions/workflows/test.yaml/badge.svg?branch=main\n\n[activity_log__github_actions]:\n  https://github.com/vim-utilities/proompter/actions/workflows/test.yaml\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-utilities%2Fproompter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvim-utilities%2Fproompter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-utilities%2Fproompter/lists"}