Skip to content
Usage guide
Edit
On this page

How reposummary resolves a --window into a git range, what each --synthesis backend does, and how the on-disk journal cache keys and prunes its entries.

#Usage guide

reposummary summarize <repo> --window <window> --synthesis <backend> extracts a git repository's activity over a time window and renders a Markdown journal, optionally narrated by an LLM. <repo> defaults to the current directory; --window and --synthesis are required and have no default.

#Windows

--window accepts the following forms. An unrecognized window is a hard error, never a silent fallthrough.

Windows
FormMeaningExample
todaycommits since local midnight today--window today
yesterdaythe previous calendar day--window yesterday
week / 7dthe last 7 days--window 7d
month / 30dthe last 30 days--window month
all / start / start..nowthe full history--window all
<YYYY-MM-DD>+<N><unit>a fixed span from a date; unit is d / w / m / y--window 2026-06-11+1month
<refA>..<refB>an explicit git revision range--window v0.1.0..HEAD

The tip of the window is --branch (default HEAD).

#Synthesis backends

--synthesis selects the prose backend explicitly. There is no silent fallback: the chosen backend must work, or the command errors. reposummary never quietly downgrades one backend to another.

Synthesis backends
BackendBehavior
noneno LLM; the journal is the deterministic extraction only
claude-clishells out to the claude CLI (claude -p --model <model>); no API key needed. If claude is missing, not logged in, or fails, that is a hard error
anthropic-apicalls the Anthropic Messages API; requires ANTHROPIC_API_KEY in the environment (no implicit default). A missing key is a hard error

--model selects the model id (default haiku). Both short aliases (e.g. haiku) and full model ids (e.g. claude-haiku-4-5-20251001) are passed through to the backend verbatim — the Anthropic API and the claude CLI both accept alias ids. The model is only consulted when the backend is claude-cli or anthropic-api.

#Caching and incremental efficiency

A journal for a fixed (firstSHA, lastSHA, synthesis, model, version, windowLabel) tuple is deterministic, so identical windows reuse cached output. The cache key is a sha256 over those six inputs:

  • firstSHA and lastSHA — the commit range actually covered by the window
  • synthesis — the selected backend
  • model — the model id
  • version — the reposummary version (so a new release never serves stale prose)
  • windowLabel — the resolved window heading, so that two windows with no

commits (both SHAs empty) never collapse to the same entry and serve a cached journal under the wrong heading

Entries are plain Markdown files under the cache directory ($XDG_CACHE_HOME/reposummary, or ~/.cache/reposummary). Two window expressions that resolve to the same commit range and produce the same label share a cache entry, so repeated summaries cost O(new commits), not O(window size).

The cache is self-maintaining: each successful write opportunistically prunes entries whose files have not been read in the last 90 days, and every cache hit refreshes the entry's timestamp so frequently-used journals never age out. Pruning is best-effort — a failed prune never fails the write.

  • --no-cache disables the cache entirely (always recompute, never read or write).
  • --cache-dir <path> overrides the cache directory.

#Examples

# Deterministic journal for today, printed to stdout
reposummary summarize . --window today --synthesis none

# Last week, narrated via the Anthropic API
ANTHROPIC_API_KEY=... reposummary summarize ~/code/myproj --window week --synthesis anthropic-api

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

# A release range, narrated via the local claude CLI, written to a file
reposummary summarize . --window v0.1.0..HEAD --synthesis claude-cli --output CHANGES.md

# The whole history, ignoring any cached output
reposummary summarize . --window all --synthesis none --no-cache

More tools from this site

  • claudestream Drive Claude Code from Python: run it as a subprocess and read its output as typed events, with async and sync sessions, sandbox policies, and tools you define in Python
  • claudewheel A TUI Claude Code Launcher that lets you have more than one profile, manage sessions lifecycle, pick the exact CC version, model to use (even older unlisted ones), pick which GitHub account to use, etc.
  • dirstat Fast, single-binary directory statistics CLI: every file under a tree grouped by format, with counts, sizes, and lines of code, as a colored terminal table or as JSON
  • fastware A batteries-included ASGI framework: msgspec JSON, a managed Granian server, dependency injection, SSE, WebSockets, auth, and a test client
  • go-toml-edit Zero-dep TOML editing library for Go with comment preservation
  • howmuchleft The fastest Claude Code statusline: context window, 5-hour, and weekly limit usage as three customizable gradient bars, rendering in about 6 ms
  • orxtra
  • pgdesign
  • predraw Declarative rendering pipeline: describe a scene in JSON and get SVG, PNG and WebP out, with light and dark style tokens, reusable components and text converted to path outlines
  • rlsbl Release orchestration and project scaffolding CLI that bumps versions, validates a structured JSONL changelog, tags only the commit CI verified, and publishes to npm, PyPI, Go and more
  • safegit git wrapper CLI that gives each commit its own temporary index and retries ref updates on conflict, so concurrent agents share one repository
  • saferm Command-line replacement for rm that archives every deletion with a mandatory reason and the context it ran in, so deleted files can be listed, inspected and restored
  • selfdoc Static Site Generator that builds a project's documentation site directly from its source code, so the docs can never drift from the code they describe, with SEO/AEO, first-class blog, search, and cross-project linking built in
  • strictcli
  • stricttest An always-on test-isolation floor: a pytest plugin and a Go env-hygiene module that make a test suite structurally unable to reach real credentials, the real HOME, the network, or the development repository.
  • wesktop A Python framework that turns an ASGI web app into a desktop application, serving it from a local Granian server and displaying it in a native OS window via pywebview
Search