Skip to main content

CLI tool that automates weekly work reporting by scanning git history across multiple repositories

Project description

Work Intelligence Agent

Automated weekly work reporting from git history across multiple repositories — now with optional AI-powered summaries via Google Gemini.

What It Does

Point the agent at a directory (or list of repos) and an author name, and it produces a clean markdown report of the week's work — grouped by day, organized by repository, with similar commits summarized together.

New in v0.2.0: When a Gemini API key is configured, groups of 3+ related commits get an AI-generated one-line summary for faster reading.

Installation

Requires Python 3.11+ and git on your PATH.

pip install work-intelligence-agent

Or run directly with uvx:

uvx work-intelligence-agent --author "Your Name" --parent-directory ~/projects

AI Summarization (Optional)

Set your Gemini API key to enable AI-powered commit summaries:

export GEMINI_API_KEY="your-gemini-api-key"

Get a free API key at Google AI Studio.

Without the key, the agent still works — it just uses prefix-based grouping instead of AI summaries.

CLI Usage

# Scan a parent directory for repos and generate a report
work-intelligence --author "Jane Doe" --parent-directory ~/projects

# Specify repos explicitly
work-intelligence --author "Jane Doe" --repositories ~/projects/repo-a ~/projects/repo-b

# Custom date range
work-intelligence --author "Jane Doe" --parent-directory ~/projects \
  --start-date 2025-01-06 --end-date 2025-01-12

# Write output to a file
work-intelligence --author "Jane Doe" --parent-directory ~/projects --output report.md

CLI Options

Option Description
--author Author name for filtering commits (required)
--parent-directory Directory to scan recursively for git repos
--repositories Explicit list of repo paths
--start-date Start date, YYYY-MM-DD (default: 7 days ago)
--end-date End date, YYYY-MM-DD (default: today)
--output Output file path (default: stdout)
--config Config file path (default: .kiro/work-intelligence.json)

Configuration File

Place a JSON config at .kiro/work-intelligence.json to set defaults:

{
  "author": "Jane Doe",
  "parent_directory": "~/projects",
  "date_range": {
    "start": "2025-01-06",
    "end": "2025-01-12"
  }
}

CLI arguments override config file values.

MCP Server

The agent also runs as an MCP server for integration with AI tools like Kiro.

{
  "mcpServers": {
    "work-intelligence-agent": {
      "command": "uvx",
      "args": ["--from", "work-intelligence-agent", "work-intelligence-mcp"],
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key"
      }
    }
  }
}

When used via MCP, the agent will prompt you for any missing details (author name, repo location, date range) through the AI assistant conversation.

The server exposes three tools:

  • generate_report — Full weekly report generation (prompts for author, repos, dates, and output path)
  • scan_repos — Discover git repos under a directory
  • extract_history — Extract raw commit history

Development

# Install with test dependencies
pip install -e ".[test]"

# Run tests
pytest

# Run the MCP server locally
work-intelligence-mcp

Changelog

v0.2.0

  • AI-powered commit summarization via Google Gemini (gemini-2.0-flash)
  • Set GEMINI_API_KEY to enable — falls back gracefully without it
  • MCP server now prompts users for missing parameters (author, repos, dates)
  • generate_report tool now accepts output_path to save reports to file
  • Added google-genai dependency

v0.1.0

  • Initial release
  • CLI and MCP server for weekly work report generation
  • Prefix-based commit grouping and summarization
  • Recursive git repository scanning

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

work_intelligence_agent-0.3.0.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

work_intelligence_agent-0.3.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file work_intelligence_agent-0.3.0.tar.gz.

File metadata

  • Download URL: work_intelligence_agent-0.3.0.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for work_intelligence_agent-0.3.0.tar.gz
Algorithm Hash digest
SHA256 bb4bc2a8ff61b92851b4b0f6066cc5dabab39f847ed137e8a2b86381c971ecf5
MD5 934918d4ef7c16c4cf8d420f22b59d1a
BLAKE2b-256 c2a42b63f909cde6f0427bc1b02b4eb6f9a11b3a6260ee3388ca86b768018e59

See more details on using hashes here.

File details

Details for the file work_intelligence_agent-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for work_intelligence_agent-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b8dd17aa7c94f1ec1a617457a5cb4fa01cd52714e61b436f7fb948bbce15bd5
MD5 f1fdbfee22be88ef7cdf070ef699b7f2
BLAKE2b-256 a06dc43a822843498eb0993b81c0570adaee9e6527546333f014f67b76c375f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page