An AI-powered task prioritization tool that analyzes your to-do list and suggests the optimal order to tackle tasks based on deadlines, importance, and effort estimates.
- 🧠 AI-powered prioritization using Gemini 2.5 Flash
- ⚡ Simple CLI interface for quick task input
- 📊 Clear rationale for each prioritization decision
- 🔧 Modular architecture for easy extension
- 🚀 One-command setup and execution
- 🛡️ Robust error handling with graceful fallback
- ✅ Comprehensive testing with 32+ test cases
# Clone and setup
git clone https://github.com/0x-Decrypt/task-prioritiser.git
cd task-prioritiser
./setup.sh
# Configure your API key (get it from https://makersuite.google.com/app/apikey)
# Edit .env file and add: GEMINI_API_KEY=your_key_here
# Run the prioritizer
python app.py📝 Smart Task Prioritizer
========================================
Task title: Finish project proposal
Deadline: tomorrow
Importance (1-5): 5
Estimated effort: 2h
✅ Added: Finish project proposal
Task title: Buy groceries
Deadline: today
Importance (1-5): 2
Estimated effort: 30min
✅ Added: Buy groceries
🎯 Prioritized Task List
==================================================
1. Buy groceries
🔥 Due TODAY | Importance: 2/5 | Effort: 30min
💡 Quick task due today - complete for immediate satisfaction
📊 Priority Score: 85.2
2. Finish project proposal
⏰ Due TOMORROW | Importance: 5/5 | Effort: 2h
💡 Critical importance with tight deadline; requires focused time
📊 Priority Score: 92.8
- Task title: Brief description of the task
- Deadline: Use formats like:
2025-08-15(YYYY-MM-DD)today,tomorrow3 days,1 week
- Importance: Scale of 1-5 (5 = most important)
- Effort: Time estimate:
30(minutes)2h(hours)90min(minutes with unit)
The system considers:
- Deadline urgency: Closer deadlines get higher priority
- Importance level: More important tasks rise to the top
- Effort required: Quick wins are factored for momentum
- Logical sequencing: Dependencies and optimal flow
# Create .env file
GEMINI_API_KEY=your_gemini_api_key_hereGet your API key from: Google AI Studio
The system automatically handles:
- API failures with heuristic fallback
- Input validation and error correction
- Virtual environment management
task-prioritiser/
├── app.py # Main application entry point
├── src/
│ ├── models/ # Task data models
│ ├── ai/ # AI prioritization engine
│ ├── cli/ # Command line interface
│ └── utils/ # Utility functions & validation
├── tests/ # Comprehensive test suite
├── requirements.txt # Minimal dependencies
├── setup.sh # One-command setup script
├── .env.example # Environment template
└── docs/ # Additional documentation
# Run all tests
python -m unittest tests.test_models -v
python -m unittest tests.test_validation -v
python -m unittest tests.test_prioritizer -v
# Test installation
./test_installation.sh- Functions limited to ≤25 lines
- Comprehensive type hints
- Self-documenting variable names
- 100% test coverage for core logic
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch
- Make your changes (following our code style)
- Add tests for new functionality
- Run the test suite
- Submit a pull request
API Key Error
❌ GEMINI_API_KEY not configured
Solution: Edit .env file and add your Gemini API key
Import Errors
ModuleNotFoundError: No module named 'litellm'
Solution: Run ./setup.sh to install dependencies
Permission Denied
Permission denied: ./setup.sh
Solution: Run chmod +x setup.sh
MIT License - Copyright (c) 2025 0x-Decrypt
See LICENSE for full details.
- Built with LiteLLM for AI integration
- Powered by Google Gemini 2.5 Flash
- CLI interface built with Click
⭐ Star this repo if you find it helpful!
📧 Questions? Open an issue
🤝 Contributing? See our contribution guide