Your wishes are my commands.
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.
Installation
The recommended way to install Shell Genie is using pipx:
- Install Python 3.10 or higher.
- Install pipx.
- Install Shell Genie:
pipx install shell-genie
Alternatively, you can install it using pip:
- Install Python 3.10 or higher.
- Create a virtual environment in your preferred location:
python -m venv .venv
- Activate the virtual environment:
source .venv/bin/activate
- Install Shell Genie:
pip install shell-genie
How to use
-
First, you need to initialize the tool by running the following command:
This will prompt you to select a backend (either
openai-gpt3
orfree-genie
) and provide any additional information that is required (e.g. your own OpenAI API key foropenai-gpt3
).The
free-genie
backend is free to use. I’m hosting it, and as you can imagine I’m not a big corporation with unlimited money, so there’s no guarantee that it will be available at all times. My goal is to generate a dataset of commands to fine-tune a model later on (this is mentioned during the initialization process). -
Once you have initialized the tool, you can start asking the genie what you want to do. For example, you may ask it to find all the
json
files in the current directory that are larger than 1MB:shell-genie ask "find all json files in the current directory that are larger than 1MB"
You’ll see an output similar to this:
Command: find . -name "*.json" -size +1M Do you want to run this command? [y/n]:
If you have questions about how the command works, you can ask t