Summary is a powerful command-line tool that recursively scans directories for Git repositories and generates concise summaries of the changes within them. It intelligently creates diffs between tags or, for untagged repositories, between the first and last commits.
It's designed for developers who want a quick overview of progress across multiple projects, helping to generate release notes, track changes, or analyze development history efficiently.
# Analyze all git repositories in the current directory and save the output psummary -P > change_summary.txtSummary operates with the following logic:
- Repository Discovery: It walks the specified directory tree (defaulting to the current location) and identifies all Git repositories by looking for
.gitfolders. - Tag Analysis: For each repository, it inspects the existing tags and sorts them chronologically.
- Diff Generation:
- If tags are present: It generates a diff for each period between consecutive tags (e.g.,
v1.0.0->v1.1.0). It also creates a summary from the latest tag to the currentHEAD. - If no tags exist: It generates a single, comprehensive diff from the very first commit to the final commit in the repository.
- If tags are present: It generates a diff for each period between consecutive tags (e.g.,
- Intelligent Filtering: It automatically excludes numerous binary file types from the diffs and allows for custom exclusion of directories and file patterns.
- Grouped Output: The final output groups all changes by their respective repository and commit/tag range, providing a clean, organized report.
- Recursive Git Repository Discovery: Automatically find and analyze all repositories within a given path.
- Automatic Change Summarization: Generates diffs between consecutive tags and from the last tag to
HEAD. - Parallel Processing: Utilizes multiple CPU cores to analyze repositories in parallel for maximum speed (
-Pflag). - Flexible Directory Filtering: Exclude specific directories like
node_modulesortargetfrom the initial scan. - Regex-Based File Omission: Use regular expressions to omit certain files (e.g.,
*.md,CHANGELOG.md) from the diff generation. - Smart Binary Exclusion: By default, ignores common binary file extensions (
.png,.zip,.exe, etc.) to keep summaries focused on source code. - Cross-Platform: Built with Rust, it runs on Windows, macOS, and Linux.
You can install Summary directly from crates.io using cargo.
cargo install psummaryMake sure that your ~/.cargo/bin directory is in your system's PATH.
Here is the full set of options available for the Summary command:
A tool to recursively find Git repositories and summarize changes between tags. Usage: psummary [OPTIONS] Options: -P, --Parallel Run analysis in parallel across multiple repositories for speed -R, --Root <ROOT> The root directory to start scanning from [default: .] -E, --Exclude <EXCLUDE> A space-separated list of directory names to exclude from the scan [default: node_modules] --Pattern <PATTERN> The pattern to look for when identifying project roots [default: .git] -O, --Omit <OMIT> A regex pattern to omit files from the diff summary. Can be used multiple times [default: (?i)documentation (?i)target (?i)changelog\.md$ (?i)summary\.md$] -h, --help Print help information -V, --version Print version information --Parallelor-P: Enables multi-threaded processing. This is highly recommended when scanning a directory with many repositories.--Rootor-R: Specifies the starting directory for the scan. If not provided, it defaults to the current working directory.--Excludeor-E: Prevents the tool from scanning any directory whose path contains one of the specified strings. The default value isnode_modules. To exclude multiple directories, wrap them in quotes:-E "node_modules target dist".--Omitor-O: This powerful option uses regular expressions to filter out files from the diff summary. It can be specified multiple times. For example, to ignore all Markdown and text files, you would use-O "\.md$" -O "\.txt$".
Run a parallel scan on the current folder and print the output to the console.
psummary -PScan a folder named ~/dev/projects and save the complete summary to summary.diff.
psummary -P -R ~/dev/projects > summary.diffScan the current directory but ignore any paths containing node_modules, target, or vendor.
psummary -P -E "node_modules target vendor"Analyze all repositories but exclude any changes to lock files (*.lock), Markdown files (*.md), and build artifacts in a dist directory from the summaries.
psummary -P -O ".*\.lock$" -O "\.md$" -O "/dist/"Summary is built in Rust and stands on the shoulders of these excellent crates:
clap- For robust command-line argument parsing.git2- For all Git repository operations.rayon&tokio- For parallel and asynchronous execution.walkdir- For efficient directory traversal.regex- For pattern matching in the--Omitfilter.futures- For managing asynchronous tasks.num_cpus- For determining the number of available CPU cores.
For a detailed history of changes, please see the CHANGELOG.md file.