A CLI tool that uses AI agents to generate daily work summaries from GitHub activity
Project description
DailySum
A CLI tool that uses AI agents to generate daily work summaries from your GitHub activity.
What It Does
Analyzes your GitHub activity and generates daily summaries like this:
Yesterday:
- Merged PR #142: Fix authentication bug in user login flow
- Reviewed PR #138: Add support for OAuth2 integration
- Opened issue #145: Memory leak in background task processor
Today:
- Continue work on OAuth2 integration testing
- Address memory leak issue in background processor
- Review pending PRs from team members
How It Works
This tool uses two Mozilla AI projects:
any-llm
Provides a unified interface to different LLM providers. Switch between OpenAI, Anthropic, Mistral, and other models with a string change.
any-agent
Provides a unified interface for AI agent frameworks. Handles tool orchestration, model interactions, and GitHub API access via Model Context Protocol (MCP).
Together, these handle the complexity of GitHub API interactions and LLM provider differences.
Installation
Requirements
- Python 3.11 or newer
- A GitHub Personal Access Token
- API key for your chosen LLM provider (OpenAI, Anthropic, etc.)
Install from PyPI
pip install dailysum
Install from Source
git clone https://github.com/njbrake/dailysum.git
cd dailysum
pip install -e .
Configuration
Option 1: Interactive Setup (Recommended)
Run the initialization command and follow the prompts:
dailysum init
This will:
- Prompt for your GitHub token
- Let you choose your preferred LLM model
- Optionally set your company name
- Save configuration to
~/.config/dailysum/config.toml
Option 2: Environment Variables
Set these environment variables:
export GITHUB_TOKEN="ghp_your_github_token_here"
export MODEL_ID="openai/gpt-4o-mini" # Optional, defaults to gpt-4o-mini
export COMPANY="Your Company Name" # Optional
Then run with the --use-env flag:
dailysum generate --use-env
Getting a GitHub Token
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click "Generate new token (classic)"
- Select scopes:
repo,read:user,read:org,notifications - Copy the generated token
Supported LLM Providers
- OpenAI:
openai/gpt-4o,openai/gpt-4o-mini,openai/gpt-3.5-turbo - Anthropic:
anthropic/claude-3-5-sonnet-20241022,anthropic/claude-3-haiku-20240307 - Mistral:
mistral/mistral-large-latest,mistral/mistral-small-latest - Google:
google/gemini-1.5-pro,google/gemini-1.5-flash
See any-llm providers for the complete list.
Usage
Generate Your Daily Summary
dailysum generate
Generate with Quality Evaluation
dailysum generate --evaluate
View Current Configuration
dailysum config
Use Environment Variables Instead of Config File
dailysum generate --use-env
Advanced Usage
Custom Configuration File Location
# Initialize with custom location
dailysum init --config-path /path/to/my/config.toml
# Generate using custom location
dailysum generate --config-path /path/to/my/config.toml
Different Models for Different Purposes
You can easily switch between models by updating your config:
# Use a faster, cheaper model
dailysum init --model-id "openai/gpt-4o-mini"
# Use a more powerful model for complex summaries
dailysum init --model-id "anthropic/claude-3-5-sonnet-20241022"
Development
Setting Up Development Environment
git clone https://github.com/njbrake/dailysum.git
cd dailysum
# Install with development dependencies
pip install -e ".[dev]"
# Set up pre-commit hooks
pre-commit install
Running Tests
pytest
Code Quality
# Format and lint
ruff format .
ruff check . --fix
# Type checking
mypy src/
Contributing
Contributions are welcome. Areas of interest:
- New LLM provider support
- Summary templates and prompts
- Additional GitHub data sources
- CLI improvements
- Tests and documentation
See Contributing Guide for details.
Example Output
๐ Your Daily Summary
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Yesterday: โ
โ - Merged PR #234: Implement user authentication system โ
โ - Reviewed PR #231: Add Docker configuration โ
โ - Fixed critical bug in payment processing (Issue #189) โ
โ - Updated documentation for API endpoints โ
โ โ
โ Today: โ
โ - Complete integration tests for authentication system โ
โ - Review pending PRs from team members โ
โ - Start work on user dashboard redesign โ
โ - Investigate performance issues in search functionality โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Troubleshooting
"Configuration error: GitHub token not found"
Make sure you've either:
- Run
dailysum initto set up a config file, or - Set the
GITHUB_TOKENenvironment variable
"Unable to import 'any_agent'"
Install the required dependencies:
pip install any-agent any-llm-sdk
Rate Limiting Issues
If you hit GitHub API rate limits:
- Use a GitHub token (provides 5000 requests/hour vs 60 for unauthenticated)
- Consider running the tool less frequently
- The tool automatically respects rate limits and will wait if needed
License
MIT License - see LICENSE for details.
Acknowledgments
- any-llm - Unified LLM provider interface
- any-agent - Unified AI agent framework
- GitHub Copilot MCP - GitHub API access via Model Context Protocol
- Rich - Beautiful terminal output
- Click - Command-line interface framework
Built by Mozilla AI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dailysum-0.0.1.tar.gz.
File metadata
- Download URL: dailysum-0.0.1.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de3f3341b4daa5872a3904d525762fca35085ec9c1286ca9e391998e19adfe90
|
|
| MD5 |
c88bebf592b2943863944744bf9afeb4
|
|
| BLAKE2b-256 |
8daab3a07120368b2d4d3a6365ffc6898f191dd965ad0d9be46310758c94fa50
|
Provenance
The following attestation bundles were made for dailysum-0.0.1.tar.gz:
Publisher:
release.yaml on njbrake/dailysum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dailysum-0.0.1.tar.gz -
Subject digest:
de3f3341b4daa5872a3904d525762fca35085ec9c1286ca9e391998e19adfe90 - Sigstore transparency entry: 409158853
- Sigstore integration time:
-
Permalink:
njbrake/dailysum@73d7d59f09d68f06ed35ca9844ccfa6abd404b1b -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/njbrake
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@73d7d59f09d68f06ed35ca9844ccfa6abd404b1b -
Trigger Event:
release
-
Statement type:
File details
Details for the file dailysum-0.0.1-py3-none-any.whl.
File metadata
- Download URL: dailysum-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbe9889892cc576b706f786476dd48de625b29c9f8e0e7f952f299f03bff95f9
|
|
| MD5 |
81607bdd55527adf23d4741effa105be
|
|
| BLAKE2b-256 |
6cf99186bf19fe90d41c33df0e48a0021b61c089462aa8714295451714d7e14f
|
Provenance
The following attestation bundles were made for dailysum-0.0.1-py3-none-any.whl:
Publisher:
release.yaml on njbrake/dailysum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dailysum-0.0.1-py3-none-any.whl -
Subject digest:
bbe9889892cc576b706f786476dd48de625b29c9f8e0e7f952f299f03bff95f9 - Sigstore transparency entry: 409158879
- Sigstore integration time:
-
Permalink:
njbrake/dailysum@73d7d59f09d68f06ed35ca9844ccfa6abd404b1b -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/njbrake
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@73d7d59f09d68f06ed35ca9844ccfa6abd404b1b -
Trigger Event:
release
-
Statement type: