Install And Use Chat GPT In Linux Terminal Command Line

How to install ChatGPT on Linux terminal? If you want to use Chat GPT in Linux Terminal command line, read this blog.

Shell Genie is a command-line tool that lets you interact with the terminal in plain English. You ask the genie what you want to do and it will give you the command you need.

The recommended way to install Shell Genie is using pipx:

  1. Install Python 3.10 or higher.
  2. Install pipx.
  3. Install Shell Genie: pipx install shell-genie

Alternatively, you can install it using pip:

  1. Install Python 3.10 or higher.
  2. Create a virtual environment in your preferred location: python -m venv .venv
  3. Activate the virtual environment: source .venv/bin/activate
  4. Install Shell Genie: pip install shell-genie

Install Shell Genie in Linux via Commands

Run the following commands to install Shell Genie in Linux Ubuntu:

sudo apt update sudo apt upgrade sudo apt install python3-pip python3 -m pip install --user pipx python3 -m pipx ensurepath pipx install shell-genie sudo apt install python3.10-venv shell-genie init

How to Use

First, you need to initialize the tool by running the following command:

shell-genie init

This will prompt you to select a backend (either openai-gpt3.5-turbo or free-genie). Note that the free-genie backend is free to use.

And once you have initialized the shell genie tool, you can start asking the genie what you want to do. For example, you may ask it to find all the files in the current directory that are larger than 1MB:

shell-genie ask "find all files in the current directory that are larger than 1MB"

Similarly, you can ask about any command you wish to execute.

Original Article