Our Machine Learning in Linux series focuses on apps that make it easy to experiment with machine learning. chatGPT-shell-cli appears an interesting project to feature as it’s a simple script to use OpenAI’s chatGPT and DALL-E from the terminal without needing to install either Python or Node.js.
ChatGPT is an artificial-intelligence chatbot launched in November 2022. It is built on top of OpenAI’s GPT-3.5 and GPT-4 families of large language models and has been fine-tuned using both supervised and reinforcement learning techniques.
Large Languages Models trained on massive amount of text can perform new tasks from textual instructions. They can generate creative text, solve maths problems, answer reading comprehension questions, and much more.
We tested chatGPT-shell-cli on Manjaro and Ubuntu. On Manjaro, there’s a package in the Arch User Repository, which can be installed with the command:
$ yay -s chatgpt-shell-cli
You don’t really need a package though, given that chatgpt-shell-cli is just a shell script.
You need to set your OPENAI_KEY to use this script. As we’re using the bash shell, we add the following line to the file .bashrc
Log out of the shell or enter the command:
$ source .bashrc
Next page: Page 2 – In Operation and Summary
Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary
Is the API key free?
Yes, there’s a free key available.
The key is free but you need to create an account and you will need to provide a valid phone number.