reposummary

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

reposummary

reposummary is a command-line tool that turns a git repository's commits over a chosen time window or revision range into a Markdown journal, with optional LLM-written narration. It is built for developers and AI agents who need a readable account of what a repository has been doing without walking the log commit by commit. Everything in the journal -- commit classification, per-directory churn, issue references, authors and tags -- is extracted deterministically from git, so LLM tokens are spent only on the optional prose layer.

Install

  • Go: go install github.com/smm-h/reposummary@latest
  • npm: npm i -g reposummary
  • PyPI: pip install reposummary

(The npm and PyPI packages download the prebuilt binary.)

Usage

reposummary summarize <repo> --window <window> --synthesis <backend>

<repo> defaults to the current directory. --window and --synthesis are required (no default).

# Deterministic journal for today, no LLM
reposummary summarize . --window today --synthesis none

# A fixed one-month span from a date
reposummary summarize . --window 2026-06-11+1month --synthesis none

# The whole history, narrated via the local claude CLI
reposummary summarize . --window all --synthesis claude-cli --model haiku

Commands

Command Description
summarize Extract a git repository's activity over a time window and render a Markdown journal, optionally narrated by an LLM.

Windows

  • today — commits since local midnight today
  • yesterday — the previous calendar day
  • week / 7d — the last 7 days
  • month / 30d — the last 30 days
  • all / start / start..now — the full history
  • <YYYY-MM-DD>+<N><unit> — a fixed span from a date (e.g. 2026-06-11+1month)
  • <refA>..<refB> — an explicit git revision range (e.g. v0.1.0..HEAD)

An unrecognized window is a hard error, never a silent fallthrough. See the usage guide (docs/guide.md) for details.

Synthesis backends

--synthesis selects the prose backend explicitly — there is no silent fallback. A chosen backend that fails is a hard error, not a quiet downgrade.

  • none — no LLM; the journal is the deterministic extraction only.
  • claude-cli — shells out to claude -p --model <model> (no API key needed).
  • anthropic-api — calls the Anthropic Messages API; requires ANTHROPIC_API_KEY in the environment (no implicit default).

--model selects the model id (default haiku). Short aliases (e.g. haiku) and full model ids (e.g. claude-haiku-4-5-20251001) both work — the model string is passed through to the backend verbatim.

Caching

A journal for a fixed (firstSHA, lastSHA, synthesis, model, version, windowLabel) tuple is deterministic, so identical windows reuse cached output on disk. The cache key is a sha256 of those inputs; the window label is included so that distinct empty windows (both SHAs empty) never share an entry. Entries are plain Markdown files under $XDG_CACHE_HOME/reposummary (or ~/.cache/reposummary). Repeated summaries therefore cost O(new commits), not O(window size). Entries age out on their own: each write opportunistically prunes entries not read in the last 90 days, and every cache hit refreshes an entry's timestamp so frequently-used journals stay warm. Disable with --no-cache, or point elsewhere with --cache-dir.

Documentation

Overview

Command reposummary turns a git repository's commits over a chosen time window or revision range into a Markdown journal, with optional LLM-written narration.

Everything the journal reports -- commit classification, per-directory churn, issue references, authors and tags -- is extracted deterministically from git and costs no LLM tokens. The prose layer is opt-in through --synthesis and has no silent fallback: a chosen backend that fails is a hard error.

Directories

Path Synopsis
internal
cache
Package cache is a deterministic on-disk journal cache.
Package cache is a deterministic on-disk journal cache.
digest
Package digest turns raw git data into a structured, deterministic summary: commit classification, per-directory churn, issue references, author counts, and per-day activity.
Package digest turns raw git data into a structured, deterministic summary: commit classification, per-directory churn, issue references, author counts, and per-day activity.
gitdata
Package gitdata extracts commit metadata, file churn, and tags from a git repository over a resolved window.
Package gitdata extracts commit metadata, file churn, and tags from a git repository over a resolved window.
render
Package render turns a Digest (plus an optional LLM narrative) into the final Markdown journal, and produces the compact plain-text digest fed to the LLM prompt.
Package render turns a Digest (plus an optional LLM narrative) into the final Markdown journal, and produces the compact plain-text digest fed to the LLM prompt.
synth
Package synth turns a digest into prose via an explicitly-chosen LLM backend.
Package synth turns a digest into prose via an explicitly-chosen LLM backend.
testutil
Package testutil provides shared helpers for building fixture git repos.
Package testutil provides shared helpers for building fixture git repos.
window
Package window parses the --window flag into a resolved time/rev range spec.
Package window parses the --window flag into a resolved time/rev range spec.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL