In Operation
The script is started with chatgpt
. Let’s look at the available commands:
image command
This command generates images with a prompt. Here we’ve entered image:
followed by the prompt cute white kitten
.
This is the image generated from the prompt.
We’ve covered a few image viewers that show images directly in the terminal such as timg, viu and Chafa, software that uses the Kitty Graphics Protocol. Sadly, the script doesn’t let us view images direct in the terminal under Linux. If you’re running macOS, you can view images direct in the terminal with iTerm, a terminal emulator for macOS.
chat mode
The image below shows the model’s explanation of systemd.
command
This lets us get a command with the functionality we specify. The script always asks you if you want to execute the command.
Other commands are:
- history – view your chat history;
- models – displays the available models;
- model – view all the information on a specific model.
Summary
chatGPT-shell-cli is an extremely simple way to test out chatGPT. You can set your own initial chat prompt, generate images, and find out and execute commands all with just a few key presses.
One of the advantages of a shell script is that answers can be returned to stdout.
This script uses the official OpenAI API,which is not the same as the original ChatGPT.
Website: github.com/0xacx/chatGPT-shell-cli
Support:
Developer: 0xacx
License: MIT License
chatGPT-shell-cli is written in Bash. Learn Bash with our recommended free books and free tutorials.
For other useful open source apps that use machine learning/deep learning, we’ve compiled this roundup.
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.