Machine Learning

Machine Learning in Linux: chatGPT-shell-cli – chatGPT and DALL-E tool

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.

chatgpt

This is the image generated from the prompt.

chatgpt

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.

chatgpt - explain what is 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.

chatgpt - command for a fuzzy search

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.

Artificial intelligence icon 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

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
James Devonshire
James Devonshire
1 year ago

Is the API key free?

kcdtv
kcdtv
1 year ago

The key is free but you need to create an account and you will need to provide a valid phone number.