GiTime 3.0.4

dotnet tool install --global GiTime --version 3.0.4
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local GiTime --version 3.0.4
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=GiTime&version=3.0.4
                    
nuke :add-package GiTime --version 3.0.4
                    

GiTime

A .NET global tool that analyzes git repositories to summarize your commit activity with weekly grouping, Norwegian ISO 8601 week numbering, and Microsoft Teams/Outlook calendar integration.

Requirements

  • .NET 10 SDK or later - Required to install and run GiTime

Installation

# Install globally
dotnet tool install --global GiTime

# Or run without installing
dnx gitime

Install from Source

  1. Clone and build:
git clone https://github.com/CRidge/gitime
cd gitime
dotnet pack -c Release
  1. Install globally:
dotnet tool install --global GiTime --add-source ./GiTime/bin/Release

Update

dotnet tool update --global GiTime

Uninstall

dotnet tool uninstall --global GiTime

Version 3.0 - Enhanced Visual Design! 🎨

Latest: Beautiful HTML reports with automatic repo color coding, improved typography, and modern visual hierarchy.

Previous: Comprehensive testing infrastructure with 100 unit tests, modern .NET 10 architecture, and production-ready quality.

Features

Git Analysis

  • Multi-Repository Analysis: Track commits across multiple git repositories
  • Weekly Grouping: Results organized by ISO 8601 weeks (Norwegian standard)
  • Daily Breakdown: See commits grouped by day within each week
  • Weekday Display: Always shows Mon-Fri, includes weekends only when commits exist
  • Verbose Mode: Show individual commit details with -v or --verbose
  • Time Range Filtering: Analyze commits from specific date ranges (defaults to last calendar month)
  • Author Filtering: Focus on your own commits using git user.email
  • Line Change Metrics: Single "Lines" column showing total change volume
  • Relative Paths: Add repositories using relative paths like . or .\myproject

Calendar Integration

  • Meeting Display: Shows meetings alongside commits for each day
  • Teams/Outlook Integration: Connects to your Microsoft 365 calendar
  • Meeting Summaries: Count and total duration in non-verbose mode
  • Meeting Details: Individual meeting times and durations in verbose mode
  • Local Timezone: All times displayed in your local timezone
  • Smart Filtering: Declined meetings automatically filtered out

HTML Reports (v3.0 Enhanced! 🎨)

  • Automatic Color Coding: Each repo gets a unique color (hash-based, no config)
  • Modern Visual Design: Improved typography hierarchy and spacing
  • 4px Colored Borders: Easy visual identification of repos at a glance
  • Interactive Reports: Generate beautiful dark-mode HTML reports with --html
  • Calendar Agenda View: Interactive timeline showing meetings and commits
  • Collapsible Weeks: Click to expand/collapse week details
  • Azure DevOps Links: Direct links to commits in Azure Repos
  • Print-Friendly: Optimized stylesheet for paper timesheets
  • Responsive Design: Works on desktop and mobile devices
  • No Dependencies: Single-file HTML with embedded CSS/JavaScript

Quality & Testing ✨

  • 100 Comprehensive Unit Tests: Full coverage of core business logic
  • Modern .NET 10: Latest framework with Microsoft.Testing.Platform
  • Fast Test Execution: All tests run in ~3 seconds
  • Zero External Dependencies: Tests use mocking for complete isolation
  • Production Ready: CI/CD ready with excellent code coverage

Usage

First Run

On first run, GiTime creates a configuration file at:

  • Windows: %APPDATA%\.gitime\config.json
  • Linux/Mac: ~/.gitime/config.json

Your git user email is auto-detected from git config user.email.

Add Repositories

Add repositories using absolute or relative paths:

# Absolute path
gitime --add-repo C:\repos\my-project

# Relative path
cd C:\repos
gitime --add-repo .\my-project

# Current directory
cd C:\repos\my-project
gitime --add-repo .

All paths are converted to absolute paths and stored in the configuration.

List Configured Repositories

gitime --list-repos

Show Configuration

gitime --show-config

Analyze Commits (Default: Last Calendar Month)

gitime

Standard Output - Weekly grouping with daily summaries:

Analyzing commits from 1/1/26 to 31/1/26
Author(s): your.email@example.com

Week 4 (20/1/26 - 26/1/26)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Day       β”‚ Repository      β”‚ Commits β”‚ Lines β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Monday    β”‚ project-api     β”‚      10 β”‚  1176 β”‚
β”‚ Tuesday   β”‚ project-api     β”‚       8 β”‚   841 β”‚
β”‚           β”‚ project-infra   β”‚       2 β”‚   180 β”‚
β”‚ Wednesday β”‚ project-web     β”‚       3 β”‚     8 β”‚
β”‚           β”‚ project-api     β”‚       4 β”‚   750 β”‚
β”‚ Thursday  β”‚ project-api     β”‚       7 β”‚   276 β”‚
β”‚           β”‚ project-mobile  β”‚       9 β”‚  1343 β”‚
β”‚ Friday    β”‚ project-api     β”‚       4 β”‚    90 β”‚
β”‚           β”‚ project-mobile  β”‚       6 β”‚   167 β”‚
β”‚ TOTAL     β”‚                 β”‚      53 β”‚  4831 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜

OVERALL TOTAL: 53 commits, 4831 lines changed

Analyze Custom Date Range

gitime --from 2026-01-01 --to 2026-01-15

Verbose Mode - Show Individual Commits

gitime --verbose
# or
gitime -v --from 2026-01-20 --to 2026-01-25

Verbose Output - Includes individual commit details:

Week 4 (20/1/26 - 26/1/26)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Day       β”‚ Repository / Commit                                      β”‚ Commits β”‚ Lines β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Monday    β”‚ project-api                                              β”‚      10 β”‚  1176 β”‚
β”‚           β”‚   Fix authentication bug (a1b2c3d)                       β”‚       1 β”‚   120 β”‚
β”‚           β”‚   Add new feature endpoint (e4f5g6h)                     β”‚       1 β”‚   456 β”‚
β”‚           β”‚   Update dependencies (i7j8k9l)                          β”‚       1 β”‚    89 β”‚
β”‚           β”‚   Refactor user service (m0n1o2p)                        β”‚       1 β”‚   234 β”‚
β”‚           β”‚   Add unit tests (q3r4s5t)                               β”‚       1 β”‚   177 β”‚
β”‚           β”‚   ... (5 more commits shown)                             β”‚       5 β”‚   100 β”‚
β”‚ Tuesday   β”‚ project-api                                              β”‚       8 β”‚   841 β”‚
β”‚           β”‚   Update logging (u6v7w8x)                               β”‚       1 β”‚   234 β”‚
β”‚           β”‚   ... (7 more commits shown)                             β”‚       7 β”‚   607 β”‚
β”‚ TOTAL     β”‚                                                          β”‚      18 β”‚  2017 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜

Notes:

  • Uses Norwegian ISO 8601 week numbering (weeks start Monday, Week 1 = first week with Thursday)
  • Dates displayed in d/M/yy format (e.g., 3/2/26 for February 3rd, 2026)
  • Always shows Mon-Fri, includes Sat/Sun only if commits exist on those days
  • "Lines" column = total change volume (additions + deletions + modifications)
  • Multiple weeks show separate tables with an overall total at the end
  • Verbose mode shows ALL commits in chronological order (oldest first)
  • Verbose mode shows up to 5 commits per repo, then "... (N more commits)"

Remove Repository

Remove repositories using absolute or relative paths:

gitime --remove-repo C:\repos\my-project
# or
gitime --remove-repo .\my-project

Configuration File

The configuration file is automatically created in your user profile:

  • Windows: %APPDATA%\.gitime\config.json (typically C:\Users\YourName\AppData\Roaming\.gitime\config.json)
  • Linux/Mac: ~/.gitime/config.json

Example configuration:

{
  "Repositories": [
    "C:\\repos\\project1",
    "C:\\repos\\project2"
  ],
  "AuthorEmails": [
    "your.email@example.com",
    "another.email@example.com"
  ],
  "DefaultLookbackDays": 30,
  "AzureTenantId": "your-tenant-id",
  "AzureClientId": "your-client-id"
}

You can manually edit this file to:

  • Add multiple author emails (useful if you commit with different emails)
  • Modify the list of repositories
  • Change the default lookback period
  • Configure calendar integration (see below)

Calendar Integration

GiTime can show your Microsoft Teams/Outlook meetings alongside your commits!

Setup

  1. Create Azure AD app registration - See CALENDAR_SETUP.md for detailed instructions
  2. Add to config - Add AzureTenantId and AzureClientId to your config.json
  3. First run - GiTime will prompt you to sign in via browser (one-time setup)
  4. Done! - Meetings will now appear in your reports

Example Output with Meetings

Non-verbose:

Week 4 (20/1/26 - 23/1/26)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Day       β”‚ Repository      β”‚ Commits β”‚ Lines  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Tuesday   β”‚ [Meeting]       β”‚       5 β”‚ 3h 45m β”‚
β”‚           β”‚ project-api     β”‚       8 β”‚    841 β”‚
β”‚           β”‚ project-infra   β”‚       2 β”‚    180 β”‚

Verbose:

Week 4 (20/1/26 - 23/1/26)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Time   β”‚ Repository / Commit                    β”‚ Commits β”‚ Lines  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Tuesdayβ”‚ [Meeting]                              β”‚       5 β”‚ 3h 45m β”‚
β”‚ 09:00  β”‚ Daily standup                          β”‚         β”‚    15m β”‚
β”‚ 10:30  β”‚ Sprint planning                        β”‚         β”‚     2h β”‚
β”‚ 13:00  β”‚ Client review                          β”‚         β”‚     1h β”‚
β”‚        β”‚ project-api                            β”‚       8 β”‚    841 β”‚
β”‚ 12:58  β”‚ Fix authentication bug                 β”‚ 177d2d5 β”‚     18 β”‚

Note: Calendar integration is optional. If not configured, GiTime works normally showing only git commits.

Architecture & Quality

Design Principles

  • Clean Architecture: Separation of concerns with clear service boundaries
  • Dependency Injection: IoC container for testability and maintainability
  • Interface Segregation: Small, focused interfaces for each service
  • Single Responsibility: Each class has one clear purpose
  • SOLID Principles: Fully applied throughout the codebase

Testing Infrastructure ✨ v2.8.0

  • 94 Comprehensive Tests (100% pass rate):
    • 66 Unit Tests: Full coverage of core business logic
      • ArgumentParser: 17 tests
      • ConfigService: 12 tests
      • ConfigCommands: 11 tests
      • ReportService: 8 tests
      • HtmlReportGenerator: 10 tests
      • CSS/JavaScript Generators: 12 tests
      • HelpService: 3 tests
    • 28 Integration Tests: End-to-end workflows
      • ArgumentParser integration: 7 tests
      • ConfigService integration: 4 tests
      • HTML generation workflows: 3 tests
      • End-to-end workflows: 8 tests
      • Report generation workflows: 6 tests
  • Modern Testing Stack:
    • TUnit - Modern, fast test framework
    • NSubstitute - Flexible mocking library
    • Shouldly - Readable assertion syntax
    • System.IO.Abstractions - File system mocking
  • Fast Execution: All tests run in ~1.6 seconds
  • Complete Isolation: Zero external dependencies (no file I/O, no browser windows)
  • CI/CD Ready: Production-quality test infrastructure

See TESTING.md and TEST_ORGANIZATION.md for comprehensive testing documentation.

Visual Regression Tests πŸ“Έ NEW!

  • 6 Visual Test Scenarios: Screenshot-based UI testing
    • Empty state validation
    • Single/multi-week report layouts
    • High commit volume rendering
    • Calendar meeting integration UI
    • Mobile responsive design
  • Technology Stack:
    • Microsoft.Playwright - Headless browser automation
    • Verify.Playwright - Snapshot comparison testing
    • Baseline management with git version control
  • Automated Workflow: Run .\run-visual-tests.ps1 to execute
  • CI/CD Ready: Detect visual regressions in pull requests

See VISUAL_TESTING.md for setup and usage guide.

Performance Benchmarks πŸƒ

  • BenchmarkDotNet Integration: Professional performance testing
  • 4 Benchmark Suites: ArgumentParser, ConfigService, HTML Generation, Report Workflows
  • Key Performance Targets:
    • Argument parsing: < 1 ΞΌs
    • Config operations: < 1 ms
    • HTML generation (4 weeks): < 20 ms
    • Complete report workflow: < 30 ms
  • Memory Diagnostics: Track allocations and GC pressure
  • Run Benchmarks: .\run-benchmarks.ps1

See BENCHMARKS.md for detailed benchmarking guide.

Code Quality

  • ~85% Code Coverage: Comprehensive testing of business logic
  • XML Documentation: All public APIs documented
  • .NET 10: Latest framework features and performance
  • Central Package Management: Modern dependency management
  • No Warnings: Clean builds with all warnings addressed

For detailed setup instructions, see CALENDAR_SETUP.md.

Command Reference

Command Description
gitime Analyze commits for last calendar month (default)
gitime --verbose or -v Show individual commit details
gitime --add-repo <path> Add a repository to the configuration
gitime --remove-repo <path> Remove a repository from the configuration
gitime --list-repos List all configured repositories
gitime --show-config Show current configuration details
gitime --from <date> --to <date> Analyze specific date range (YYYY-MM-DD)
gitime --help Show help message

Output Format

Week Numbering

GiTime uses ISO 8601 week numbering (Norwegian standard):

  • Weeks start on Monday
  • Week 1 is the week containing the first Thursday of the year
  • Week numbers range from 1 to 52 (or 53 in some years)

Display Rules

  • Weekdays: Monday-Friday always shown (even with 0 commits)
  • Weekends: Saturday/Sunday only shown if commits exist on those days
  • Multiple repos per day: Day name shown on first row, blank on subsequent rows
  • Week totals: Sum shown at bottom of each week's table
  • Overall totals: Grand total displayed after all weeks (when multiple weeks present)

Metrics Explained

  • Commits: Number of commits made on that day in that repository
  • Lines: Total line changes (additions + deletions + modifications combined)
    • Represents the total volume of code changes
    • Useful for estimating time/effort spent on different projects

Development

Build and Test Locally

cd GiTime
dotnet build
dotnet run -- --help

Run Tests

# Unit tests (66 tests)
dotnet test GiTime.Tests

# Integration tests (28 tests)
dotnet test GiTime.IntegrationTests

# Visual regression tests (6 tests)
.\run-visual-tests.ps1

# Performance benchmarks
.\run-benchmarks.ps1

Package Structure

GiTime/
β”œβ”€β”€ GiTime.csproj               (Tool package configuration)
β”œβ”€β”€ Program.cs                  (Main CLI logic)
β”œβ”€β”€ Models/
β”‚   β”œβ”€β”€ GiTimeConfig.cs         (Configuration model)
β”‚   β”œβ”€β”€ DailyRepoSummary.cs     (Daily summary model)
β”‚   β”œβ”€β”€ WeeklySummary.cs        (Weekly grouping model)
β”‚   └── CommitDetail.cs         (Individual commit details)
β”œβ”€β”€ Services/
β”‚   β”œβ”€β”€ ConfigService.cs        (JSON config management)
β”‚   β”œβ”€β”€ GitAnalysisService.cs   (LibGit2Sharp integration)
β”‚   β”œβ”€β”€ CalendarService.cs      (Microsoft Graph integration)
β”‚   └── Html/
β”‚       β”œβ”€β”€ HtmlReportGenerator.cs
β”‚       β”œβ”€β”€ CssGenerator.cs
β”‚       └── JavaScriptGenerator.cs
└── Commands/
    └── ConfigCommands.cs       (Repository management commands)

GiTime.Tests/                   (66 unit tests)
GiTime.IntegrationTests/        (28 integration tests)
GiTime.VisualTests/             (6 visual regression tests)
GiTime.Benchmarks/              (Performance benchmarks)

Version History

  • 2.0.0: Weekly grouping with Norwegian week numbers, verbose mode, simplified metrics
  • 1.0.0: Initial release with daily summaries

License

MIT License - feel free to use and modify as needed.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
3.0.4 71 2/4/2026
3.0.3 75 2/4/2026
3.0.0 77 2/4/2026