Usage Guide
gitinspector-rs is designed to be both simple for quick checks and powerful for deep repository audits.
Installation¶
Ensure you have the latest binary in your PATH. You can build it from source using:
cargo build --releaseBasic Command¶
Run the tool against any local git repository path:
gitinspector-rs /path/to/repoDiagnostic Phases¶
The tool executes analysis in three distinct phases:
🔍 Analysis: Parses commit history, computes author contributions, and generates activity trends.
🏥 Health Audit: Scans for repository maintenance debt, including stale branches and oversized files.
🚚 Blame Analysis: Performs multi-threaded
git blameacross the codebase to determine line-level ownership.
Command Options¶
Formatting & Output¶
-F, --format <FORMAT>: Output type (text,html,markdown,json,xml). Default istext.--grading: A “macro” flag that enables all detailed analysis features (-r,-T,-m). Recommended for full audits.
Filtering¶
-f, --file-types <EXTS>: Comma-separated list of extensions to include (e.g.,rs,js,py).-x, --exclude <PATTERN>: Exclude specific data. Patterns can be prefixed:author:John: Exclude commits by John.file:tests/: Exclude files in the tests directory.email:bot@: Exclude specific email domains.message:chore: Exclude commits with specific subject lines.
Detailed Metrics¶
-r, --responsibilities: Enable line-level ownership viagit blame.-T, --timeline: Include weekly/monthly activity visualizations.-m, --metrics: Enable code complexity and size metrics for hotspot detection.
Professional Examples¶
1. Generating a Stakeholder Dashboard¶
Create a comprehensive HTML report for a project review:
gitinspector-rs . --grading -F html > stats-report.html2. Auditing Large Codebases (Text)¶
Focus only on core source files and exclude test data:
gitinspector-rs . -f rs,c,cpp -x "file:tests/" --responsibilities3. CI/CD Integration (JSON)¶
Extract metrics for automated tracking:
gitinspector-rs . -F json > repo-metrics.json