An ADHD-friendly productivity tracker that uses AI vision to help you understand and optimize your work patterns.
Manager McCode serves as your attentive productivity assistant, designed specifically for people with ADHD. It:
- πΈ Captures your screen activity unobtrusively
- π§ Uses Gemini Vision AI to understand your work context
- π Provides real-time insights about focus and task transitions
- π Generates daily summaries of your productivity patterns
- Intelligent Activity Tracking: Takes periodic screenshots and uses Gemini 1.5 Vision API to analyze work patterns
- ADHD-Aware Analysis: Recognizes context switching, focus states, and task transitions
- Privacy-First: All data stays local in DuckDB, with configurable retention
- Real-Time Insights: Shows 15-minute activity summaries in your terminal
- Daily Reports: Generates end-of-day summaries of productivity patterns
- Clone the repository
- Install Poetry (Python package manager)
- Install dependencies:
poetry install
- Set up your environment variables:
cp .env.example .env
# Add your Gemini API key to .env
Start tracking:
poetry run python -m manager_mccode
View recent activity:
poetry run python -m manager_mccode inspect
Install as system service:
poetry run python -m manager_mccode install
- Core Services:
ImageManager
: Screenshot capture and optimizationGeminiAnalyzer
: AI-powered activity analysisBatchProcessor
: Efficient batch processing of screenshotsDatabaseManager
: Local data storage with DuckDBTerminalDisplay
: Real-time activity visualization
- Web interface for activity insights
- Task detection and workflow analysis
- Focus metrics and productivity patterns
- Integration with task management tools
- Customizable attention state detection
- Export and visualization options
- Add graceful shutdown handling in
ServiceRunner
- Implement proper error recovery in batch processing
- Add health check endpoints for service monitoring
- Implement proper cleanup of temporary files
- Add service state persistence across restarts
- Consolidate settings between
config.py
andsettings.py
- Add configuration validation for all settings
- Implement environment-specific configs (dev/prod)
- Add dynamic config reloading
- Document all configuration options
- Implement screenshot compression optimization
- JPEG format for better compression
- Configurable quality settings
- Automatic image resizing
- Memory-efficient processing
- Add batch processing queue management
- Optimize database queries and indexing
- Add caching for frequently accessed data
- Implement resource usage monitoring
- Add data export functionality
- Implement data retention policies
- Add database backup/restore functionality
- Implement data migration tools
- Add data anonymization options
- Improve error classification and handling
- Add structured logging
- Implement log rotation
- Add error reporting metrics
- Implement debug mode logging
- Add screenshot data encryption
- Implement secure configuration storage
- Add access control for web interface
- Implement API authentication
- Add security audit logging
- Add real-time activity feedback
- Implement customizable focus metrics
- Add detailed activity reports
- Improve notification system
- Add user preferences management
- Add integration tests for web interface
- Implement performance benchmarks
- Add stress testing scenarios
- Improve test coverage
- Add property-based testing
- Add API documentation
- Create user guide
- Add configuration reference
- Document troubleshooting steps
- Add development setup guide
- Complete web interface implementation
- Add focus session analytics
- Implement task categorization
- Add productivity metrics
- Implement report generation
- Add systemd service management
- Implement macOS service integration
- Add Docker support
- Implement CI/CD pipeline
- Add monitoring integration
Contributions welcome! Please check out our contributing guidelines.
MIT License - See LICENSE for details
Key settings in .env
:
GEMINI_API_KEY=your_api_key_here
SCREENSHOT_INTERVAL_SECONDS=10 # Default screenshot interval
DEFAULT_BATCH_SIZE=12 # Number of screenshots to process together
DEFAULT_BATCH_INTERVAL_SECONDS=120 # How often to run batch processing
- Set up development environment:
poetry install --with dev
pre-commit install
- Run tests:
poetry run pytest
- Format code:
poetry run black .
poetry run isort .
manager_mccode/
βββ cli/ # Command-line interface tools
βββ config/ # Configuration management
βββ models/ # Data models and schemas
βββ services/ # Core service modules
β βββ analyzer.py # Gemini Vision integration
β βββ batch.py # Batch processing
β βββ database.py # Data persistence
β βββ display.py # Terminal UI
β βββ image.py # Screenshot management
βββ web/ # Web interface (planned)
βββ main.py # Application entry point
- Implemented optimized screenshot compression
- Reduced memory usage and storage requirements
- Added configurable quality settings
- Improved concurrent capture handling
- Added comprehensive test coverage for image processing
- Enhanced error handling and recovery
- Improved cleanup procedures
- Implemented robust service runner with graceful shutdown
- Consolidated configuration system using Pydantic V2
- Added comprehensive error handling and recovery
- Improved logging and cleanup procedures