Table of Contents
generating a working todo web app with chatgpt-vim
To get a local copy up and running follow these simple example steps.
This plugin works with both chatgpt wrapper/cli or the openai-cli
- The openai-cli option works with the openai api and an api key.
- The chatgpt wrapper/cli option works with chatgpt by connecting through the browser ui to get the session key.
With chatgpt somethimes being too busy to use the openai-cli option is more reliable.
With the openai-cli option there is also the ability to change the model you would like to interact with.
Currently the GptRun and GptFile commands are only available for the openai api option.
the :Gpt
command is available on either option.
I may add :GptRun
and :GptFile
to the ChatGPT option in the future, but for now they are available with the api openai api option since it's the more reliable option.
For the openai-cli option you will need (Recommended):
- openai api key
- openai-cli
pip install openai-cli
- create a
~/.config/openai.token
file and add your openai api key to itecho "YOUR TOKEN HERE" > ~/.config/openai.token
For the chatgpt wrapper/cli option you will need (Incomplete / Not Recommended):
-
chatgpt-wrapper
pip install git+https://github.com/mmabrouk/chatgpt-wrapper playwright install firefox
-
You will need to login to chatgpt at first
chatgpt install
- Exit out of that command once you are logged in
- Install with vim plugin manager of your choice
If there is a ~/.config/openai.token the openai api will be used by default.
:Gpt
is available to either option chatgpt or openai.
:GptRun
and :GptFile
are only available with the openai option.
:Gpt
Prompts the user for a prompt and then uses OpenAI's GPT-3 API or ChatGPT to generate a response.:GptRun
Prompts the user for a command to run on the current file and then uses OpenAI's GPT-3 API to generate a response based on the contents of the current file and run log.:GptFile
Prompts the user for a prompt and then uses OpenAI's GPT-3 API to generate a response based on the contents of the current file.
gpt
Maps to the:Gpt
command.gpr
Maps to the:GptRun
command.gpf
Maps to the:GptFile
command.
- Ask ChatGPT from Vim
- Review output
- Write output to file on user Confirmation
- Hook up to openai api
- Add more functions
- Send file contents along with request
- Send file contents and run log along with request
- Send visually selected contents along withrequest and replace selected
- More useful stuff as I think of it
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If 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". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Twitter: @0xStabby
Project Link: https://github.com/0xStabby/chatgpt-vim