Skip to main content

No project description provided

Project description

ShellGenius

ShellGenius is an intuitive CLI tool designed to enhance your command-line experience by turning your task descriptions into efficient shell commands.

Powered by OpenAI's gpt-3.5-turbo AI model, ShellGenius generates accurate commands based on your input and provides step-by-step explanations to help you understand the underlying logic.

https://user-images.githubusercontent.com/24412384/236322725-435b92c6-6d33-421f-8662-7eb6355d3f64.mp4

Table of Contents

Installation

Ensure you have Python 3.8 or later installed on your system. To install ShellGenius, use the following command:

python3 -m pip install shellgenius

Install via pipx (recommended)

pipx is an alternative package manager for Python applications. It allows you to install and run Python applications in isolated environments, preventing conflicts between dependencies and ensuring that each application uses its own set of packages. I recommend using pipx to install ShellGenius.

First, install pipx if you haven't already:

  • On macOS and Linux:

    python3 -m pip install --user pipx
    python3 -m pipx ensurepath
    

Alternatively, you can use your package manager (brew, apt, etc.).

  • On Windows:

    py -m pip install --user pipx
    py -m pipx ensurepath
    

Once pipx is installed, you can install ShellGenius using the following command:

pipx install shellgenius

OpenAI API key

ShellGenius requires an OpenAI API key to function. You can obtain a key by signing up for an account at OpenAI's website.

Once you have your API key, set it as an environment variable:

  • On macOS and Linux:

    export OPENAI_API_KEY="your-api-key-here"
    
  • On Windows:

    setx OPENAI_API_KEY your_key
    

Usage

To use ShellGenius, simply type shellgenius followed by a description of the task you want to perform:

shellgenius "description of your task"

Note: The quotes are not necessary.

The tool will generate a shell command based on your description, display it with an explanation, and prompt you to confirm if you want to execute the command.

Examples

Here are some examples of ShellGenius in action:

Create a file

shellgenius "create a new file called example.txt"

Output:

touch example.txt

Explanation:
* touch command is used to create a new file if it doesn't exist
* example.txt is the name of the new file

Be careful with your answer.
Do you want to execute this command? [Y/n]: y

Number of lines in a file

shellgenius "count the number of lines in a file called data.csv"

Output:

wc -l data.csv

Explanation:
* wc is a word, line, and byte count utility
* -l flag counts the number of lines
* data.csv is the target file

Be careful with your answer.
Do you want to execute this command? [Y/n]: y

Limitations

ShellGenius is powered by an AI model and may not always generate the most efficient or accurate commands. Exercise caution when executing commands, especially when working with sensitive data or critical systems.

License

ShellGenius is released under the MIT License.


https://github.com/sderev/shellgenius

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

shellgenius-0.1.8.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

shellgenius-0.1.8-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file shellgenius-0.1.8.tar.gz.

File metadata

  • Download URL: shellgenius-0.1.8.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for shellgenius-0.1.8.tar.gz
Algorithm Hash digest
SHA256 abb5c0130d78fafdcb09b561cc74d73ea9d977eac767c4014abae0bf6f4d6b02
MD5 9a5830e4999a98dd0546c1c26bd2853d
BLAKE2b-256 b3e376ed8ce04801f6c609cfa4a8a17e085a8d3ad017a10203cce763dde03231

See more details on using hashes here.

File details

Details for the file shellgenius-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: shellgenius-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for shellgenius-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 65b37de5d9f4a27e273583a63054ff6a6e4e18c87287f2becca2e1d9c1fac26a
MD5 621bc56df7dab14cde3713a5ba610997
BLAKE2b-256 bcf6f0991563cab45bf3a51d0908e7c658c850c48103643155bd4b5f0fc4cdf0

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 Pingdom Monitoring Sentry Error logging StatusPage Status page