https://github.com/timxor/chatgpt-terminal
chatgpt-terminal
https://github.com/timxor/chatgpt-terminal
Last synced: about 2 months ago
JSON representation
chatgpt-terminal
- Host: GitHub
- URL: https://github.com/timxor/chatgpt-terminal
- Owner: timxor
- License: mit
- Created: 2023-07-22T20:00:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-08T03:48:04.000Z (5 months ago)
- Last Synced: 2025-02-17T23:58:40.154Z (4 months ago)
- Language: PowerShell
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chatgpt-terminal
chatgpt-terminal
## 1. Download required libraries
```
python3 -m venv myenv
source myenv/bin/activate\
pip install -r requirements.txt
```example query:
```
timbo@MacBookPro2021 chatgpt-terminal % timbot how do i say whats up baby in chineseQuery:
'how do i say whats up baby in chinese'
...waiting for api response...
Response:
The translation for "what's up baby" in Chinese is "你好宝贝" (Nǐ hǎo bǎobèi).
timbo@MacBookPro2021 chatgpt-terminal % timbot show me some emojis
Query:
'show me some emojis'
...waiting for api response...
Response:
😂😊🎉🔥💕🌟👍🌈🍕🎶🎈💯😍🙌🎊😎🔮🌺🦄🍩🏆
timbo@MacBookPro2021 chatgpt-terminal %
```
## 2. Add OpenAI API key
Generate and copy a new OpenAI API key from API Key settings website:
https://platform.openai.com/account/api-keys
Put your new api key in a new file called ```.env```.
```
touch .env
nano .env
OPEN_AI_API_KEY=your-openai-api-key-goes-here
```## 3. Copy files & add alias
Copy gpt.py:
```
chmod +x gpt_cli.py
sudo cp gpt_cli.py /usr/local/bin/gpt_cli.pychmod +x .env
sudo cp .env /usr/local/bin/.env
```Add alias:
```
nano ~/.zshrc
alias gpt="python gpt_cli.py"
source ~/.zshrc
```## 4. Run gpt_cli.py
Run with alias:
```
gpt hello there, how are you?
```Run without alias:
```
python gpt_cli.py hello there, how are you?
```## 5. Run gpt_interpreter.py
Run without alias:
```
python gpt_interpreter.py
```Run with alias:
```
gpt_interpreter
```