Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MahdeenSky/ChatGPT-Terminal-Completion
Attempt at using ChatGPT to issue commands based on comments in the terminal.
https://github.com/MahdeenSky/ChatGPT-Terminal-Completion
autocomplete chatgpt chatgpt-api command-line command-line-tool terminal terminal-based
Last synced: about 10 hours ago
JSON representation
Attempt at using ChatGPT to issue commands based on comments in the terminal.
- Host: GitHub
- URL: https://github.com/MahdeenSky/ChatGPT-Terminal-Completion
- Owner: MahdeenSky
- License: mit
- Archived: true
- Created: 2022-12-10T09:37:57.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-15T17:17:24.000Z (almost 2 years ago)
- Last Synced: 2024-08-02T13:27:57.662Z (3 months ago)
- Topics: autocomplete, chatgpt, chatgpt-api, command-line, command-line-tool, terminal, terminal-based
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 59
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-chatgpt-zh - ChatGPT命令行补全
README
# ChatGPT-Terminal-Completion
Attempt at using ChatGPT to issue commands based on comments in the terminal. (Python 3.9+)Supports MacOS, uses pbcopy to copy to clipboard
Implements `how` command for querying ChatGPT.
![ezgif-2-e5baff6ad3](https://user-images.githubusercontent.com/49484385/206848258-bc43d529-3ec2-4a85-856d-4704fc84327b.gif)
## Setup
1. Install python packages using `pip3 install -r requirements.txt`
2. Put the function in script.sh to your bashrc/zshrc configuration file.
3. Replace the path in the function with the path to your python file.
4. Make a new .env file in the python file directory with your email and password formatted like
5. That should be everything```
export EMAIL=email_chatgpt
export PWD=your_password
git clone [email protected]:MahdeenSky/ChatGPT-Terminal-Completion.git ~/.chatgpt_completion
cd ~/.chatgpt_completion
pip3 install -r requirements.txt
cat script.sh|sed -r "s|\"Directory of the script\"|`pwd`|g" >>~/.${SHELL##*/}rc
echo "email=${EMAIL}" >> .env
echo "password=${PWD}" >> .env
source ~/.${SHELL##*/}rc
```## Support
For linux, an alternate copy to clipboard command is to use `xsel` or `xclip`
and replacing the current copy command with said commands.## Reference
https://github.com/acheong08/ChatGPT