Skip to content

dorey/help_me_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

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!

About

A python script to query openai for a brief response helping to complete a given task in the linux terminal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages