mind-wave is an Emacs AI plug-in developed using the ChatGPT API, which can be deeply integrated into Emacs, thereby improving the work efficiency of Emacs in all aspects.
Since mind-wave is developed based on multi-threading technology, ChatGPT will not freeze Emacs during calculation.
Install
- registerOpenAI
- ObtainOpenAI API Keyand save the API Key to
~/.emacs.d/mind-wave/chatgpt_api_key.txt
file (or set the environment variable OPENAI_API_KEY) - Install Python dependencies:
pip3 install openai epc sexpdata six
- Installmarkdown-mode
- use
git clone
Download this repository and replace the following configuration withload-path
path - Add the following code to your config file
~/.emacs
middle:
(add-to-list 'load-path "<path-to-mind-wave>")
(require 'mind-wave)
use
dialogue mode
- new build
test.chat
file, will automatically enter themind-wave-chat-mode
- Excuting an order
mind-wave-chat-ask
(Press Ctrl+j), enter the question and wait for ChatGPT to answer - Excuting an order
mind-wave-chat-continue
(press Ctrl + u), continue answering - Excuting an order
mind-wave-chat-generate-title
(press Ctrl + i), regenerate the title according to the content
If you want to change the topic, create a new one*.chat
file, and then continue to ask questions to ChatGPT.
multiline input
There are two ways to enter multiple lines:
- Excuting an order
mind-wave-chat-ask-with-multiline
(press Ctrl+Shift+j), type multi-line question and wait for ChatGPT to answer - Excuting an order
mind-wave-chat-ask-insert-line
insert----- User ------
Separator, continue to enter multiple lines of content in Buffer, and finally executemind-wave-chat-ask-send-buffer
document mode
Select content (please note, don’t select too much, ChatGPT’s API has a size limit)
- Excuting an order
mind-wave-translate-to-english
ChatGPT will automatically replace the content in the selected area after getting the translation. - Excuting an order
mind-wave-proofreading-doc
ChatGPT will automatically replace the content of the selected area with the polished document. - Excuting an order
mind-wave-explain-word
ChatGPT will automatically explain the meaning of the word in the current sentence and give similar example sentences. - Excuting an order
mind-wave-adjust-text
ChatGPT adjusts the text or code according to your instructions - Excuting an order
mind-wave-check-typos
ChatGPT fix typos
code pattern
Move the cursor to the function you want to refactor
- Excuting an order
mind-wave-generate-code
ChatGPT will output the code in the current buffer according to the prompt - Excuting an order
mind-wave-refactory-code
ChatGPT will automatically split the screen, and the refactored code and refactoring suggestions are successively displayed on the right side of the screen - Excuting an order
mind-wave-comment-code
ChatGPT will automatically split the screen and display the annotated code on the right side of the screen - Excuting an order
mind-wave-explain-code
ChatGPT will automatically split the screen and display the code explanation on the right side of the screen - Excuting an order
mind-wave-explain-point
ChatGPT will automatically split the screen and display the explanation of the API at the cursor on the right side of the screen - Excuting an order
mind-wave-generate-commit-name
ChatGPT will automatically analyze the current diff content and generate a patch name - Excuting an order
mind-wave-refactory-code-with-input
ChatGPT will automatically split the screen, and according to your prompt, the refactored code and refactoring suggestions will be successively displayed on the right side of the screen
Code-related commands will automatically adjust the window layout, you can always usemind-wave-restore-window-configuration
Restores the previous window layout.
summary mode
- Open the video website and execute the command
mind-wave-summary-video
ChatGPT will automatically obtain video subtitles and analyze the video summary (need to installyoutube_transcript_api
) - Open the text website, execute the command
mind-wave-summary-web
ChatGPT will automatically obtain the core content of the webpage and analyze the summary of the webpage (need to installnodejs-readability-cli
)
#mindwave #homepage #documentation #downloads #Emacs #plugin #based #ChatGPT #API #News Fast Delivery