CLI implementation of Codex for explaining shell commands
Note: This script requires a valid OpenAI API key with access to the Codex (
code-davinci-002
) model.
- Clone the repo
- Install dependencies
pip install -r requirements.txt
- Build the package
python -m build
- Install the package
pip install dist/codex.sh-0.1-py3-none-any.whl
- Set up your API key
echo "OPENAI_API_KEY=your_key_here" > .env
- Run the package
codex
- Set up your API key
echo "OPENAI_API_KEY=your_key_here" > .env
- Install the package
pip install codex.sh
- Run the package
codex
usage: codex [-h] [-t TEMP] [-n NUM] [-w] query [query ...]
OpenAI Codex CLI cheatsheet
positional arguments:
query query to search for
optional arguments:
-h, --help show this help message and exit
-t TEMP, --temp TEMP Codex model temperature (randomness)
-n NUM, --num NUM Number of codex predictions to return
-w, --wordcount Print word count of prompt file for debugging
purposes
This project is licensed under the MIT License - see the LICENSE file for details.