-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_TmGPT.sh
27 lines (22 loc) · 1.52 KB
/
install_TmGPT.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/zsh
# Install OpenAI Python package and npm package
pip install openai
npm install openai
echo "OpenAI installation complete"
# Create the TmGPT script that runs the TmGPT.py file
echo '#!/bin/zsh' > TmGPT
echo 'python3 "$(dirname "$0")/TmGPT.py" "$@"' >> TmGPT
chmod +x TmGPT
# Move the TmGPT script to /usr/local/bin/ and copy the TmGPT.py file to /usr/local/bin/
sudo mv TmGPT /usr/local/bin/
sudo cp TmGPT.py /usr/local/bin/
echo "TmGPT successfully installed to /usr/local/bin/"
#Terminal GPT - Version 1.2, updated February 15th, 2023 - Developed by GTAI
#In the updated .sh file, we first install the OpenAI packages and then create a TmGPT script that runs the TmGPT.py file using the python3 command.
#We use $(dirname "$0") to get the path of the directory where the TmGPT script is located, so that we can reference the TmGPT.py file in the same directory.
#After creating the TmGPT script, we move it to /usr/local/bin/ using sudo mv, and then we copy the TmGPT.py file to the same directory using sudo cp.
#This ensures that both the TmGPT script and the TmGPT.py file are in the same directory, and the script can access the file using the relative path.
#Finally, we print a message to the user indicating that the installation was successful.
#Any advice, recommendations, and/or if you are looking to help out/get involved, contact me at [email protected]!
#This project is open-sourced, all I ask is if you like or enjoy the program, then please share it!
#Terminal GPT - Version 1.2, updated February 15th, 2023 - https://gtai.io