Shell Genie is a new command line tool that can be used to ask how to perform various tasks, and it gives you the shell command you need. To generate the commands, it uses OpenAI's GPT-3 or Free Genie, a free-to-use backend provided by the Shell Genie developer.
Once Shell Genie shows a command, it will ask if you want to run it. Make sure you understand the command before doing that! You could use something like Explain Shell to understand what the command does. Also, it's probably best you only use this for queries/commands that can't break things on your computer. Not all commands will work as expected, so use this at your own risk! ⚠️
Install and use Shell Genie:
sudo apt install pipx
apt install python3.11-venv
python -m venv .venv
source .venv/bin/activate
pip install shell-genie
Shell Genie should now be installed in ~/.local. In case ~/.local/bin is not available in your PATH, add it.
pipx can do this automatically for you – run pipx ensurepath, then open a new terminal window to use the new PATH.
To use Shell Genie, you'll need to configure it.
shell-genie init
Enter the website platform.openai.com/account/api-keys and click the [ + Create new secret key ] button to generate the API.
Inform the generated API in the terminal and press enter to proceed
Answer y to confirm the version of the Linux system you are using and press enter
The configuration is successful!
Enter the command below followed by the --help parameter to get more details about the shell-genie tool:
shell-genie ask --help
Example:
shell-genie ask "apt update" --explain
Commentaires