Daily Journal Prompt Generator
A Python tool that uses OpenAI-compatible AI endpoints to generate creative writing prompts for daily journaling. The tool maintains awareness of previous prompts to minimize repetition while providing diverse, thought-provoking topics for journal writing.
✨ Features
- AI-Powered Prompt Generation: Uses OpenAI-compatible APIs to generate creative writing prompts
- Smart Repetition Avoidance: Maintains history of the last 60 prompts to minimize thematic overlap
- Multiple Options: Generates 6 different prompt options for each session
- Diverse Topics: Covers a wide range of themes including memories, creativity, self-reflection, and imagination
- Simple Configuration: Easy setup with environment variables for API keys
- JSON-Based History: Stores prompt history in a structured JSON format for easy management
📋 Prerequisites
- Python 3.7+
- An API key from an OpenAI-compatible service (DeepSeek, OpenAI, etc.)
- Basic knowledge of Python and command line usage
🚀 Installation & Setup
-
Clone the repository:
git clone <repository-url> cd daily-journal-prompt -
Set up environment variables:
cp example.env .envEdit the
.envfile and add your API key:# DeepSeek DEEPSEEK_API_KEY="sk-your-actual-api-key-here" # Or for OpenAI # OPENAI_API_KEY="sk-your-openai-api-key" -
Install required Python packages:
pip install openai python-dotenv
📁 Project Structure
daily-journal-prompt/
├── README.md # This documentation
├── ds_prompt.txt # AI prompt template for generating journal prompts
├── historic_prompts.json # History of previous 60 prompts (JSON format)
├── example.env # Example environment configuration
├── .env # Your actual environment configuration (gitignored)
└── .gitignore # Git ignore rules
File Descriptions
- ds_prompt.txt: The core prompt template that instructs the AI to generate 6 new journal prompts while avoiding repetition with the last 60 prompts.
- historic_prompts.json: A JSON array containing the last 60 generated prompts. This file is updated each time new prompts are generated.
- example.env: Template for your environment configuration. Copy this to
.envand add your API key. - .env: Your actual environment variables (not tracked in git for security).
🔧 Implementation Status
This repository currently provides:
- ✅ Complete prompt template for AI interaction
- ✅ Historic prompt database with 60 example prompts
- ✅ Environment configuration template
- ✅ Comprehensive documentation
To complete the implementation, you need to:
- Create a Python script (see example above)
- Add API key parsing and AI client initialization
- Implement prompt parsing and history management
- Add error handling and user interface
The example Python code in the "Getting Started" section provides a complete starting point.
🔧 Usage
Prompt Generation Process
- The system reads the template from
ds_prompt.txt - It loads the previous 60 prompts from
historic_prompts.json - The AI generates 6 new prompts, attempting to minimize repetition
- New prompts are added to the history (maintaining only the last 60)
- User selects one prompt for their journal writing session
📝 Prompt Examples
The tool generates prompts like these (from historic_prompts.json):
- Memory-based: "Describe a memory you have that is tied to a specific smell..."
- Creative Writing: "Invent a mythological creature for a modern urban setting..."
- Self-Reflection: "Write a dialogue between two aspects of yourself..."
- Observational: "Describe your current emotional state as a weather system..."
Each prompt is designed to inspire 1-2 pages of journal writing and ranges from 500-1000 characters.
⚙️ Configuration
Environment Variables
Create a .env file with your API configuration:
# For DeepSeek
DEEPSEEK_API_KEY="sk-your-deepseek-api-key"
# For OpenAI
# OPENAI_API_KEY="sk-your-openai-api-key"
# Optional: Custom API base URL
# API_BASE_URL="https://api.deepseek.com"
Prompt Template Customization
You can modify ds_prompt.txt to change the prompt generation parameters:
- Number of prompts generated (default: 6)
- Prompt length requirements (default: 500-1000 characters)
- Specific themes or constraints
- Output format specifications
🔄 Maintaining Prompt History
The historic_prompts.json file maintains a rolling history of the last 60 prompts. This helps:
- Avoid repetition: The AI references previous prompts to generate new, diverse topics
- Track usage: See what types of prompts have been generated
- Quality control: Monitor the variety and quality of generated prompts
🤝 Contributing
Contributions are welcome! Here are some ways you can contribute:
- Add new prompt templates for different writing styles
- Improve the AI prompt engineering for better results
- Add support for more AI providers
- Create a CLI interface for easier usage
- Add tests to ensure reliability
📄 License
[Add appropriate license information here]
🙏 Acknowledgments
- Inspired by the need for consistent journaling practice
- Built with OpenAI-compatible AI services
- Community contributions welcome
🆘 Support
For issues, questions, or suggestions:
- Check the existing issues on GitHub
- Create a new issue with detailed information
- Provide examples of problematic prompts or errors