WorkMemories is a powerful command-line tool that automates the generation of detailed work activity reports with modern web UI. It aggregates data from GitHub, GitLab, Jira, and Google Calendar, providing a consolidated view of your contributions and meeting attendance over a specified period. Additionally, it leverages the Gemini AI to generate insightful summaries of your work.
- GitHub: Tracks created/merged/updated pull requests, created issues, and review comments
- GitLab: Monitors created/merged/updated merge requests and review comments
- Jira: Follows created, missed, finished, and commented issues with automation project support
- Google Calendar: Tracks attended meetings (only meetings you explicitly accepted)
- Interactive HTML Reports: Beautiful, responsive web interface with gradient cards and modern UI
- Activity Summary Cards: Visual metrics dashboard showing key performance indicators
- AI-Enhanced Tables: Integrated AI summaries directly in review tables
- Multi-User Support: Multi-user overview with combined activity tracking
- Dark/Light Theme: Automatic Nord theme switching support
- Smart Summaries: Integrates with Google Gemini API for comprehensive work summaries
- Review Analysis: AI-generated insights for individual pull/merge request reviews
- Contextual Understanding: Intelligent categorization of work activities and contributions
- Automated Jira Issues: Creates comprehensive review issues with AI summaries
- Template System: Modular HTML template architecture for customization
- Export Capabilities: JSON export and clipboard integration for easy sharing
- Responsive Design: Mobile-friendly interface for viewing reports anywhere
- YAML Configuration: Flexible
config.yamlwith user-specific overrides - Environment Variables: Secure API token management
- Async Processing: High-performance concurrent data fetching
- Extensible Architecture: Modular design for easy feature additions
Before you begin, ensure you have the following:
- Python 3.12+ - Required for modern async features
- uv package manager - Fast Python package installer
- API tokens for GitHub, GitLab, Jira, and Gemini
- Google Calendar API credentials (optional, for calendar integration)
-
Clone the repository:
git clone https://github.com/YvanY0/WorkMemories.git WorkMemories cd WorkMemories -
Set up environment:
# Create virtual environment uv venv # Install dependencies uv sync
-
Configure API tokens:
Create a
.envfile in the project root:GITHUB_TOKEN="your_github_token" GITLAB_TOKEN="your_gitlab_token" JIRA_TOKEN="your_jira_token" GEMINI_API_KEY="your_gemini_api_key"
-
Set up configuration:
Create a
config.yamlfile with your platform details:github: site: https://api.github.com token: env: GITHUB_TOKEN gitlab: site: https://gitlab.example.com token: env: GITLAB_TOKEN groups: - "your-group" jira: site: https://issues.example.com token: env: JIRA_TOKEN auto_projects: - "AUTOMATION" google: gemini: token: env: GEMINI_API_KEY users: your_username: github: username: github_username jira: username: jira_username
-
Run your first report:
uv run work_memories.py -u your_username -s
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click "Generate new token (classic)"
- Select scopes:
repo,read:user,read:org - Copy the generated token to your
.envfile
- Go to GitLab > User Settings > Access Tokens
- Create a personal access token with
read_repositoryandread_userscopes - Copy the token to your
.envfile
- Go to Atlassian Account Settings > Security > API tokens
- Create a new API token
- Use your email and token for authentication in config
Follow the Red Hat Gemini API Code Assistance User Guide for detailed instructions on obtaining your API key and adding it to your .env file as GEMINI_API_KEY.
For calendar integration, set up OAuth credentials:
-
Google Cloud Console Setup:
- Go to Google Cloud Console
- Create a new project or select existing
- Enable the Google Calendar API
- Create OAuth 2.0 credentials for desktop application
- Download credentials as
credentials.json
-
Configuration:
users: your_username: google: calendar: credentials_file: credentials.json token_file: token.json
-
First Run: The app will open browser for OAuth authorization and create
token.jsonautomatically.
WorkMemories/
├── lib/ # Core library modules
│ ├── calendar.py # Google Calendar integration
│ ├── gemini.py # AI summary generation
│ ├── git.py # GitHub/GitLab API clients
│ ├── jira.py # Jira integration
│ ├── report.py # Report generation engine
│ └── utils.py # Utility functions
├── templates/ # HTML template system
│ ├── components/ # Reusable UI components
│ ├── sections/ # Platform-specific sections
│ └── views/ # Page layouts
├── work_memories.py # Main CLI application
├── config.yaml # Configuration file
└── .env # Environment variables
Generate reports using the command line interface. By default, it creates reports for the current month.
# Basic report for a user
uv run work_memories.py -u USERNAME
# With AI-powered summaries
uv run work_memories.py -u USERNAME -s
# Custom date range
uv run work_memories.py -u USERNAME -d 2025-01-01~2025-01-31# Generate reports for all configured users
uv run work_memories.py -a
# Report with AI summaries
uv run work_memories.py -a -s# Create Jira issue for reviewed patches (requires -s flag)
uv run work_memories.py -u USERNAME -s --create-jira-issue
# Specify custom config file
uv run work_memories.py -u USERNAME -c custom_config.yaml| Option | Description | Example |
|---|---|---|
-u, --user |
Generate report for specific user | -u yihyu |
-a, --all |
Generate reports for all users | -a |
-s, --summary |
Enable AI-powered summaries | -s |
-d, --date-range |
Custom date range | -d 2025-01-01~2025-01-31 |
-c, --config |
Custom config file path | -c config/custom.yaml |
--create-jira-issue |
Create Jira issue for reviews | --create-jira-issue |
The tool generates comprehensive reports in multiple formats:
work_memories_report.html- Interactive web dashboard with modern UIwork_memories_report.md- Markdown format for documentation- Browser auto-open - HTML report opens automatically for immediate viewing
The generated HTML report includes:
- Activity Summary Cards - Visual metrics for each platform
- Interactive Tables - Sortable data with AI insights
- Theme Toggle - Dark/light mode switching
- Responsive Design - Mobile-friendly interface
- Export Options - JSON export and clipboard integration
Configure multiple users with different platform settings:
users:
developer1:
github:
username: dev1_github
jira:
username: dev1@company.com
gitlab:
username: dev1_gitlab
manager1:
github:
username: mgr1_github
jira:
username: manager1@company.com
auto_projects:
- "MANAGEMENT"
- "PLANNING"github:
site: https://github.enterprise.com/api/v3
token:
env: GITHUB_ENTERPRISE_TOKENgitlab:
site: https://gitlab.internal.company.com
token:
env: GITLAB_INTERNAL_TOKEN
groups:
- "internal-projects"jira:
site: https://company.atlassian.net
token:
env: JIRA_TOKEN
auto_projects:
- "AUTOMATION"
- "INFRASTRUCTURE"
# Custom JQL queries (optional)
custom_queries:
my_issues: "assignee = currentUser() AND status != Closed"google:
proxy: http://proxy.company.com:8080
gemini:
token:
env: GEMINI_API_KEYWe welcome contributions! Here's how to get started:
- Fork and clone the repository
- Set up development environment:
uv venv uv sync pre-commit install
lib/- Core business logic modulestemplates/- Jinja2 templates for HTML generationwork_memories.py- CLI interface and main application logic
- Platform Integration: Add new platform support in
lib/ - UI Components: Create reusable templates in
templates/components/ - Report Sections: Add platform-specific sections in
templates/sections/
- Follow PEP 8 for Python code style
- Use type hints for better code documentation
- Add docstrings for public functions and classes
This project is licensed under the MIT License. See the LICENSE file for details.
- Google Gemini API for AI-powered summaries
- GitHub/GitLab APIs for comprehensive activity tracking
- Atlassian Jira API for issue management integration
- Google Calendar API for meeting tracking
Star this repo if you find it useful!
Made with care for developers who want to track their productivity