A script to generate WordPress plugins using the OpenAI ChatGPT API.
- Python
>=3.12.0
- Poetry
>=1.8.3
- OpenAI API key
Get OpenAI API key and set it to an environment variable OPENAI_API_KEY
.
export OPENAI_API_KEY=...
Install dependencies.
poetry install
If you prefer not to use Poetry, install click
and openai
with pip
directly in a venv.
pip install 'click~=8.1' 'openai~=1.40'
Once dependencies are installed, run the script.
poetry run python main.py
por python main.py \
--name='disable-search' \
--prompt='Make a plugin to disable the WordPress core search function.'