An automated agent built with the Claude Agent SDK that summarizes your daily git work across multiple repositories. Perfect for preparing morning standup reports!
- Multi-repo support: Scan all repos in a parent directory or specify individual repos
- Intelligent summaries: Claude AI analyzes your commits and generates professional summaries
- Standup-ready output: Includes suggested talking points for morning meetings
- Flexible scheduling: Run at any fixed time daily
- Multiple output options: Save to markdown files, Notion, and/or print to console
- Notion integration: Automatically save summaries to a Notion database
- Auto-detection: Automatically detects your git email from config
- Python 3.10 or higher
- Git installed and configured
- Anthropic API key
- (Optional) Notion API key for Notion integration
pip install -r requirements.txtexport ANTHROPIC_API_KEY="your-api-key-here"Edit config.py or create a config.json:
{
"repos_parent_dir": "~/projects",
"schedule_time": "18:00",
"timezone": "Asia/Shanghai",
"output_dir": "~/daily_summaries"
}python agent.py --repos-dir ~/projectspython scheduler.pydaily_git_summary_agent/
βββ agent.py # Main agent logic
βββ config.py # Configuration management
βββ scheduler.py # Automatic scheduling
βββ notion_integration.py # Notion API integration
βββ requirements.txt # Python dependencies
βββ README.md # This file
Save your daily summaries directly to a Notion database!
- Go to Notion Integrations
- Click "+ New integration"
- Give it a name (e.g., "Daily Git Summary")
- Select your workspace
- Click "Submit"
- Copy the "Internal Integration Token" (starts with
secret_)
- Create a new page in Notion
- Add a Database - Full page to it
- The database should have these properties (they'll be auto-created if missing):
- Name (Title) - Required
- Date (Date) - For the summary date
- Summary (Text) - Brief overview
- Repositories (Multi-select) - Repos with activity
- Tags (Multi-select) - Optional tags
- Status (Select) - Draft/Ready/Presented
- Open your database in Notion
- Click "..." (three dots) in the top right
- Click "Add connections"
- Select your integration
- Copy the Database ID from the URL:
https://notion.so/your-workspace/DATABASE_ID?v=... ^^^^^^^^^^^
Option A: Environment Variables
export NOTION_API_KEY="secret_your_api_key_here"
export NOTION_DATABASE_ID="your_database_id_here"
export NOTION_ENABLED="true"Option B: config.json
{
"repos_parent_dir": "~/projects",
"schedule_time": "18:00",
"timezone": "Asia/Shanghai",
"notion_enabled": true,
"notion_api_key": "secret_your_api_key_here",
"notion_database_id": "your_database_id_here"
}Option C: Command Line
python agent.py --notion --notion-api-key "secret_..." --notion-database-id "abc123..."# Test the connection
python notion_integration.py
# Run a summary with Notion
python agent.py --notionCreate a config.json file in the project directory:
{
"repos_parent_dir": "~/projects",
"specific_repos": [],
"author_email": null,
"schedule_time": "18:00",
"timezone": "Asia/Shanghai",
"output_dir": "~/daily_summaries",
"save_to_file": true,
"print_to_console": true,
"model": "claude-sonnet-4-20250514",
"notion_enabled": true,
"notion_api_key": "secret_...",
"notion_database_id": "abc123..."
}# Git summary settings
export GIT_SUMMARY_REPOS_DIR="~/projects"
export GIT_SUMMARY_TIME="18:00"
export GIT_SUMMARY_TZ="Asia/Shanghai"
export GIT_SUMMARY_OUTPUT_DIR="~/daily_summaries"
export GIT_SUMMARY_AUTHOR="[email protected]"
# Notion settings
export NOTION_ENABLED="true"
export NOTION_API_KEY="secret_..."
export NOTION_DATABASE_ID="abc123..."config.json(if exists)- Environment variables
- Default values in
config.py
# Run in foreground
python scheduler.py
# Run as daemon (background)
python scheduler.py --daemon
# Use simple scheduler (no APScheduler dependency)
python scheduler.py --simple# Generate service file
python scheduler.py --generate-systemd
# Install (follow printed instructions)
sudo cp daily-git-summary.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable daily-git-summary
sudo systemctl start daily-git-summary# Generate plist file
python scheduler.py --generate-launchd
# Install
cp com.user.daily-git-summary.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.user.daily-git-summary.plistAdd to your crontab (crontab -e):
# Run at 6 PM daily
0 18 * * * cd /path/to/daily_git_summary_agent && /usr/bin/python3 agent.py --notion >> /var/log/git-summary.log 2>&1# Using default config
python agent.py
# Specify repos directory
python agent.py --repos-dir ~/work
# Specify individual repos
python agent.py --repos ~/work/project1 ~/personal/project2
# Specify author email
python agent.py --author [email protected]
# Save to Notion
python agent.py --notion
# Save to Notion only (no local file)
python agent.py --notion --print-onlypython scheduler.py --run-nowThe agent generates markdown summaries like this:
# Daily Work Summary
**Generated:** 2026-01-14 18:00:00
---
## Work Summary
Today focused on implementing the new authentication system
and fixing critical bugs in the payment module.
## Key Accomplishments
### my-web-app
- Implemented OAuth2 login flow
- Added user session management
- Fixed password reset email template
### api-service
- Optimized database queries (30% faster)
- Added rate limiting middleware
## Suggested Talking Points
- Completed OAuth2 implementation, ready for testing
- Performance improvements in API service
- Will continue with user profile features tomorrow- Check that your
repos_parent_dirpath is correct - Ensure the repos have a
.gitdirectory - Try using absolute paths in
specific_repos
- Verify your git email matches (
git config user.email) - Check that commits were made after midnight today
- Try specifying
--authorexplicitly
- Check that
ANTHROPIC_API_KEYis set - View logs in
scheduler.log - Try running with
--simpleflag
- Verify your API key is correct (
secret_...) - Ensure the database is shared with your integration
- Check that the database ID is correct (from the URL)
- Run
python notion_integration.pyto test the connection
MIT License - feel free to modify and use as needed!
Built with β€οΈ using the Claude Agent SDK. Contributions welcome!