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

Metadata

Release files for shell-genie 0.2.9

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

Source distribution (sdist)

Source distribution for shell-genie 0.2.9
File Size Uploaded
shell_genie-0.2.9.tar.gz 6.0 kB Details

Built distribution (wheel)

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

Total release size: 12.8 kB

Release files / shell_genie-0.2.9.tar.gz

Download URL shell_genie-0.2.9.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c7d5d48b55a16a38ad9ebe757b3654e1536c4d728a8d91545a999ee0868d53af
BLAKE2b-256 checksum
How to use checksums
e8f792b5abb099531c517ce6bf428386edf1e2399179dd645e42cd8f62cbf211
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.4 Darwin/22.3.0

Release files / shell_genie-0.2.9-py3-none-any.whl

Download URL shell_genie-0.2.9-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07a1abad3850a7c9e1cf4677f33b9a4348813c755031b37f49cd807319fe7199
BLAKE2b-256 checksum
How to use checksums
8f6adc88b41d9e66b6b2b95e40f10a7f6a18aa4053811eb2acd2b1cb4d9e1d28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.4 Darwin/22.3.0

Release history Release notifications | RSS feed

0.2.10

2 release files

This release

0.2.9 This release

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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