codepulse 0.1.0

Measure the heartbeat of your codebase — visualize lines of code over time from git history
codepulse-0.1.0 is not a library.

codepulse

A Rust CLI tool that measures the heartbeat of your codebase—analyzing git history to visualize lines of code over time.

Features

  • Analyzes any git repository
  • Weekly aggregation for clear trends
  • Shows two metrics:
    • Blue bars: Lines of code added each week
    • Green line: Total lines of code (running total)
  • Outputs a PNG chart

Installation

cargo build --release

The binary will be at target/release/codepulse.

Usage

codepulse --repo <PATH_TO_GIT_REPO> [--output <FILE.png>]

Options

Option Short Description Default
--repo -r Path to the git repository (required)
--output -o Output PNG file path loc_chart.png

Examples

# Analyze a repository
codepulse --repo /path/to/my-project

# Custom output file
codepulse --repo /path/to/my-project --output my_chart.png

Testing Locally

Create a test repository:

mkdir /tmp/test-repo && cd /tmp/test-repo
git init
echo "line 1" > file.txt && git add . && git commit -m "First"
echo "line 2" >> file.txt && git add . && git commit -m "Second"
echo "line 3" >> file.txt && git add . && git commit -m "Third"

Run the analyzer:

cargo run -- --repo /tmp/test-repo --output test.png
open test.png  # macOS

Output

The chart shows:

  • Left Y-axis (blue): Lines added each week
  • Right Y-axis (green): Total lines of code
  • Blue bars: Weekly code additions
  • Green line + area: Running total of all code

License

MIT