SwiftintermediatecliAI generated

Git Commit Stats CLI Tool

Write a command-line tool in Swift that parses local git log output to report commit frequency per author, busiest days of the week, and largest commits. Learners practice Swift Process/shell invocation, string parsing, and building formatted terminal reports.

Estimate
~10.5h
Steps
6
Completed by
0
Proposed by
codeseed.app

Foundation · ArgumentParser

Project roadmap

  1. 01

    Set up the Swift package with ArgumentParser

    ~1.5h

    Scaffold a CLI tool using ArgumentParser for options like repository path and date range.

  2. 02

    Invoke git log via Process

    ~2h

    Run git log with a custom format and capture its output using Foundation's Process API.

  3. 03

    Parse commit metadata

    ~2h

    Parse author, date, and message from each log line using regular expressions.

  4. 04

    Aggregate statistics

    ~2h

    Compute commit counts per author and per weekday.

  5. 05

    Detect largest commits

    ~1.5h

    Parse diff stats to identify the largest commits by lines changed.

  6. 06

    Print a formatted report

    ~1.5h

    Print a colored, aligned terminal report summarizing all statistics.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~10.5h · 6 steps

Tech stack

FoundationArgumentParser