Skip to content

Chris0Jeky/RepoScope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RepoScope

RepoScope is a local, offline Git repository analyzer and visualizer for developers.

Analyze any Git repository on your machine and get rich insights through interactive charts, detailed metrics, and comprehensive reports.

Features

  • πŸ” Analyze Git Repositories - Deep analysis of commit history, authors, and file changes
  • πŸ“Š Interactive Visualizations - Beautiful charts showing commits over time, contributor activity, and directory hotspots
  • πŸ“ˆ Comprehensive Metrics - Total commits, unique authors, date ranges, and more
  • πŸ’» CLI Tool - Simple command-line interface for quick analysis
  • 🌐 Web Dashboard - Modern Vue.js dashboard for interactive exploration
  • πŸ“„ Static Reports - Generate standalone HTML reports for offline viewing
  • πŸ”’ 100% Local - No cloud services, no data sent anywhere
  • πŸš€ Fast & Efficient - Powered by LibGit2Sharp for high-performance Git operations

Quick Start

Prerequisites

Installation

# Clone the repository
git clone <your-repo-url>
cd RepoScope

# Build the CLI
cd backend
dotnet build

Usage

Analyze a Repository

# Analyze current directory
dotnet run --project src/RepoScope.Cli/RepoScope.Cli.csproj -- summary .

# Analyze specific repository
dotnet run --project src/RepoScope.Cli/RepoScope.Cli.csproj -- summary /path/to/repo

# Analyze specific branch
dotnet run --project src/RepoScope.Cli/RepoScope.Cli.csproj -- summary . --branch main

# Analyze last 30 days
dotnet run --project src/RepoScope.Cli/RepoScope.Cli.csproj -- summary . --since 2025-01-01

Generate Reports

# Generate full HTML report
dotnet run --project src/RepoScope.Cli/RepoScope.Cli.csproj -- report . --out ./report

# Open the report
open ./report/index.html  # macOS
xdg-open ./report/index.html  # Linux
start ./report/index.html  # Windows

Export Metrics as JSON

# Output to stdout
dotnet run --project src/RepoScope.Cli/RepoScope.Cli.csproj -- analyze .

# Save to file
dotnet run --project src/RepoScope.Cli/RepoScope.Cli.csproj -- analyze . --out metrics.json

CLI Commands

analyze

Analyze a repository and output metrics as JSON.

reposcope analyze <path> [options]

Options:

  • --branch <name> - Branch to analyze (default: HEAD)
  • --since <date> - Only include commits after this date (ISO 8601 format)
  • --until <date> - Only include commits before this date (ISO 8601 format)
  • --max-commits <n> - Maximum number of commits to analyze
  • --out <file> - Output file path (default: stdout)

summary

Analyze a repository and print a human-readable summary.

reposcope summary <path> [options]

Options: Same as analyze

report

Generate a full HTML report with interactive charts.

reposcope report <path> [options]

Options:

  • Same as analyze, plus:
  • --out <dir> - Output directory for report (default: ./report)

Project Structure

RepoScope/
β”œβ”€β”€ backend/                    # .NET backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ RepoScope.Core/    # Core analysis library
β”‚   β”‚   β”‚   β”œβ”€β”€ Models/        # Data models
β”‚   β”‚   β”‚   └── Services/      # Analyzer service
β”‚   β”‚   └── RepoScope.Cli/     # CLI application
β”‚   β”‚       β”œβ”€β”€ Commands/      # Command implementations
β”‚   β”‚       └── Formatters/    # Output formatters
β”‚   β”œβ”€β”€ tests/
β”‚   β”‚   └── RepoScope.Core.Tests/  # Unit tests
β”‚   └── RepoScope.sln
β”‚
β”œβ”€β”€ frontend/                   # Vue.js frontend
β”‚   └── reposcope-web/         # Web dashboard
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ components/    # Vue components
β”‚       β”‚   β”œβ”€β”€ views/         # Page views
β”‚       β”‚   β”œβ”€β”€ store/         # State management
β”‚       β”‚   └── types/         # TypeScript types
β”‚       └── package.json
β”‚
└── templates/                  # Report templates
    └── report-template/       # Static HTML template
        β”œβ”€β”€ index.html
        └── assets/
            β”œβ”€β”€ css/
            └── js/

Architecture

Core Library (RepoScope.Core)

The heart of RepoScope is the RepoAnalyzer service, which:

  1. Opens a Git repository using LibGit2Sharp
  2. Enumerates commits based on filters (branch, date range, max count)
  3. Extracts file changes and line statistics
  4. Aggregates metrics into structured data

Key Models:

  • RepoMetrics - Complete analysis results
  • CommitInfo - Individual commit data
  • CommitsByDay/Author/Directory - Aggregated views

CLI (RepoScope.Cli)

Built with System.CommandLine, the CLI provides:

  • Command-line argument parsing
  • Multiple output formats (JSON, summary, HTML)
  • Error handling and validation

Web Dashboard (reposcope-web)

Modern Vue 3 + TypeScript SPA featuring:

  • Chart.js for interactive visualizations
  • Reactive state management
  • Responsive design
  • Loads metrics.json for standalone deployment

Metrics Computed

Overview Metrics

  • Total commits
  • Unique authors
  • Date range (earliest/latest commits)
  • Active days count

Commits Over Time

  • Daily commit counts
  • Time series visualization

Commits by Author

  • Per-author commit counts
  • Contribution percentages
  • Email addresses

Commits by Directory

  • Top-level directory activity
  • Hotspot identification

File-Level Hotspots

  • Files with the most commits
  • Lines added/deleted per file
  • Total code churn per file
  • Identify high-volatility files

Code Churn Over Time

  • Lines added/deleted by day
  • Net change tracking
  • Visualize development activity patterns
  • Identify periods of high activity

Development

Backend Development

cd backend

# Restore dependencies
dotnet restore

# Build
dotnet build

# Run tests
dotnet test

# Run CLI
dotnet run --project src/RepoScope.Cli/RepoScope.Cli.csproj -- summary .

Frontend Development

cd frontend/reposcope-web

# Install dependencies
npm install

# Start dev server
npm run dev

# Build for production
npm run build

Running Tests

cd backend
dotnet test

Use Cases

For Individual Developers

  • Understand your contribution patterns
  • Identify areas of the codebase you work on most
  • Track activity over time

For Teams

  • See who contributes what and where
  • Identify knowledge concentration risks
  • Understand project evolution

For Project Managers

  • Track team velocity and activity
  • Generate reports for stakeholders
  • Identify bottlenecks and hotspots

Roadmap

MVP (Current)

  • Core repository analysis
  • CLI with analyze/summary/report commands
  • Static HTML reports with charts
  • Vue.js dashboard
  • Basic unit tests
  • Improved HTML report template integration
  • File-level hotspot analysis
  • Code churn metrics (lines added/removed over time)

Near-Term

  • Calendar heatmap visualization
  • Configurable analysis options
  • Performance optimizations for large repositories

Future

  • ASP.NET Core API for dashboard
  • Real-time analysis mode
  • Multiple repository comparison
  • Bus factor analysis
  • Integration with GitHub/GitLab APIs
  • DevFoundry tool integration
  • Taskdeck integration

Technical Details

Technologies

Backend:

  • .NET 8 (C#)
  • LibGit2Sharp - Git operations
  • System.CommandLine - CLI framework
  • xUnit - Testing

Frontend:

  • Vue 3 - UI framework
  • TypeScript - Type safety
  • Vite - Build tool
  • Chart.js - Visualizations

Performance Considerations

  • Large Repositories: Use --max-commits to limit analysis scope
  • Date Filtering: Use --since and --until for specific time windows
  • Branch Selection: Analyze specific branches to reduce scope

Data Privacy

RepoScope is 100% local and offline:

  • No data is sent to any external service
  • All analysis happens on your machine
  • Generated reports are static files you control

Contributing

Contributions are welcome! This is a personal project but feedback and improvements are appreciated.

Development Setup

  1. Install .NET 8 SDK
  2. Install Node.js 18+
  3. Clone the repository
  4. Build and run tests

Code Style

  • C#: Follow standard .NET conventions
  • TypeScript/Vue: ESLint/Prettier configurations
  • Commit messages: Conventional Commits format

License

MIT License - See LICENSE file for details

Acknowledgments


RepoScope - Understand your code, visualize your history

About

Offline Git repository analyzer that generates shareable reports for faster technical insight.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors