Skip to main content

🧞‍♂️ 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 or free-genie) and provide any additional information that is required (e.g. your own OpenAI API key for openai-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).

  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]:
    
  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.

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. Use them at your own risk.

License

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

Download files

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

Source Distribution

shell_genie-0.2.8.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shell_genie-0.2.8-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file shell_genie-0.2.8.tar.gz.

File metadata

  • Download URL: shell_genie-0.2.8.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.4 Darwin/22.3.0

File hashes

Hashes for shell_genie-0.2.8.tar.gz
Algorithm Hash digest
SHA256 ea68aa4e38862caeebe9ebdf721c2e0174c78fe270a07fc2aa04686b9fa30c92
MD5 b2ee71226989ec82009b62fbb7409258
BLAKE2b-256 7b5522211990f58b14fe8daa2cd2c047ed16cdd4765608fb8bc7edefea5825a5

See more details on using hashes here.

File details

Details for the file shell_genie-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: shell_genie-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.4 Darwin/22.3.0

File hashes

Hashes for shell_genie-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0aa6b1b68060627db3c7e2b553cab7d31235abc8e8a3b78be83640ecd41495ca
MD5 967d8f7386690cc7f6d2a81b132ff5b0
BLAKE2b-256 636626569d1d24f46923ae745acf24ec419d1b535b92cea9bd32a9f07dd5427a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page