Skip to main content

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.

Release files for gia-shell-genie 0.2.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gia-shell-genie 0.2.15
File Size Uploaded
gia_shell_genie-0.2.15.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gia-shell-genie 0.2.15
File Interpreter ABI Platform
gia_shell_genie-0.2.15-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / gia_shell_genie-0.2.15.tar.gz

Download URL gia_shell_genie-0.2.15.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3551e11945aba75fdd4aaa60d2a266ced9660956eef48442c6156e34b8a134f5
BLAKE2b-256 checksum
How to use checksums
c254d920b7e406bb46606a496d7843b7ee92a70fb4a20044b5a9681462444b53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / gia_shell_genie-0.2.15-py3-none-any.whl

Download URL gia_shell_genie-0.2.15-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
238828a60444535389fb8ba6a6a5329429cad973e8c2422d0a63d0bab9b7b0fd
BLAKE2b-256 checksum
How to use checksums
47fb81c812fa73ecaf1d738861be2353dc741e1bef929ac6d9770f29ac554cf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release history Release notifications | RSS feed

This release

0.2.15 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page