Shell Craft
Project for generating shell commands using OpenAI models.
How to install
pip install openai-shell-craft
- Create a file called
config.json
and put your OpenAI API key in it. (See below)
or
- Clone the repository
- Install the requirements using
pip install -r requirements.txt
pip install .
- Create a file called
config.json
and put your OpenAI API key in it. (See below)
How to use
shell-craft <win:optional> <description>
- This will generate a shell command for you based on the description you provide. If you provide the win
argument, it will generate a powershell command. Otherwise, it will generate a bash command.
Example
shell-craft This command will print the current date and time
date
Configuration file
config.json
{
"openai_api_key": "<your secret key>"
}
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- OpenAI for their language models and API.
- Joel Fourhman for the initial idea, the challenge, and the project name.
- Chase Montgomery for testing, feedback, and estimated time savings vs manual implementation.