Skip to main content

(GIA distribution of )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.

Project description

Intentions

--@STCGoal Derive another bot with special instructions based on GuillaumeAI's visions and current projects.


original readme

🧞‍♂️ GIA Shell Genie

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:

  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

How to use

  1. 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) and provide any additional information that is required (e.g. your own OpenAI API key for openai-gpt3.5-turbo).

    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).

  2. 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 the genie to explain it:

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

    And you'll see an output similar to this:

    Command: find . -name "*.json" -size +1M
    Description: This command will search the current directory for all... (shortened for brevity)
    Do you want to run the command? [y/n]:
    

    You can ask for commands in English or other languages, and the genie will try to provide you with a explanation in the same language.

  3. Run the command if you want to. If you're using free-genie, and you want to help improve the tool, you can provide feedback after you've run the command.

Using an alias

If you find that writing shell-genie ask is too verbose, you can create an alias for the tool:

echo "alias please='shell-genie ask'" >> ~/.bashrc
source ~/.bashrc

And now you can ask the genie using please:

please "find all json files in the current directory that are larger than 1MB"

Examples

Here are two short videos showing how to use the tool:

Limitations

As you can imagine, not all the commands provided by the genie work as expected. If you request them, you might receive commands that could wreck your OS (e.g., rm -rf /). So, don't run commands if you don't understand their functions. If you choose to execute them despite not understanding them, do so at your own risk.

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gia_shell_genie-0.2.14.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

gia_shell_genie-0.2.14-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file gia_shell_genie-0.2.14.tar.gz.

File metadata

  • Download URL: gia_shell_genie-0.2.14.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for gia_shell_genie-0.2.14.tar.gz
Algorithm Hash digest
SHA256 4f146ab2b273831ffa72335a8a34325773f2f730c7cd3378e1d37c08e75dd55a
MD5 dd84179c3091475e39777d288c5d8229
BLAKE2b-256 7895a951740eaf5147efe9d292c4683866863bb7e8725e45bb211f9fc7857a0d

See more details on using hashes here.

File details

Details for the file gia_shell_genie-0.2.14-py3-none-any.whl.

File metadata

File hashes

Hashes for gia_shell_genie-0.2.14-py3-none-any.whl
Algorithm Hash digest
SHA256 4d5d2a87c0cd02503c85ce521140e512fd7fcce2f810fabc085b2bf36bafbaf8
MD5 285200f765ea63c0054bff412ba4172e
BLAKE2b-256 1f95085dc643b0957cd178bf59db1378b7ee2f6aa1435ec6140e4fc6fb3387ec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page