This is a command-line interface (CLI) script that generates a todo using OpenAI's GPT-3 language model and adds it to a Todoist account using the Todoist Python SDK. The due date for the task can be specified in a human-friendly format (e.g. "next Monday", "tomorrow").
- Python 3.x
openaimodule (pip3 install openai)todoist-api-pythonmodule (pip3 install todoist-api-python)python-dotenvmodule (pip3 install python-dotenv)
Alternatively, you can install the required modules by running pip3 install -r requirements.txt in the terminal.
-
Open a terminal and navigate to the directory where
add_todo.pyis located. -
Install the required modules using
pip3 install -r requirements.txt. -
Create a
.envfile in the root of your project with your API keys:OPENAI_API_KEY=your_openai_api_key TODOIST_API_KEY=your_todoist_api_key -
Run the script using
python3 add_todo.py.
The script will generate a todo using GPT-3 and prompt you to enter a due date for the task in a human-friendly format (e.g. "next Monday", "tomorrow"). Note that currently, the due date must be entered manually by the user and is not extracted from OpenAI.
- Create CLI
- Create Raycast extension
- Automatically extract due date from OpenAI
You can customize the prompt used to generate the todo using ChatGPT by modifying the prompt variable in the generate_todo function.
This project is licensed under the MIT License - see the LICENSE file for details.