Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.18 KB

File metadata and controls

38 lines (27 loc) · 1.18 KB

help_me_cli

help_me_cli.py is a Python script that uses OpenAI's API to generate UNIX shell commands based on human-written descriptions. It provides users with a brief comment and a suggested shell command to complete the specified task.

Features

  • Uses OpenAI's GPT model to generate shell commands.
  • Provides a concise comment explaining the command.
  • Ensures commands are efficient, idiomatic, and safe for UNIX environments.

Installation

Ensure you have Python 3 installed along with the required dependencies:

pip install openai asyncio

Usage

Run the script with a description of the UNIX task you need help with:

python help_me_cli.py "find all files in the current directory and sort by date modified"

Example Output

# find and sort by date modified
find . -printf "%T@ %Tc %p\n" | sort -n

Configuration

The script includes an editable prompt (UNIX_HELP_PROMPT) to fine-tune OpenAI's response format. You can modify this prompt inside the script to adjust how responses are generated.

License

This project is licensed under the MIT License.


For any issues or contributions, feel free to submit a pull request or open an issue!