Skip to content

BAKUGOS1/code-momentum-2025

Repository files navigation

Code Momentum 2025

Code Momentum is a tiny Python CLI for analyzing Git activity rhythm: active days, longest streaks, commit distribution, and JSON reports.

The repository includes a 2025 sample activity dataset so the CLI has real history to analyze immediately.

Why It Exists

GitHub's contribution graph is useful, but it is not very explainable. Code Momentum gives you a local, scriptable report that answers practical questions:

  • How many active days did this repo have?
  • What was the longest commit streak?
  • How random or consistent were commit counts per day?
  • Can the activity report be exported for docs, dashboards, or personal retrospectives?

Quick Start

python -m code_momentum.cli --year 2025

Optional editable install:

python -m pip install -e .
code-momentum --year 2025

Sample Output

Code Momentum Report
====================
Total commits: 919
Active days: 237
First day: 2025-01-03
Last day: 2025-12-20
Longest streak: 222 days (2025-02-03 to 2025-09-12)
Commits per active day: 1 to 7
Average commits per active day: 3.88

Features

  • Dependency-free Python CLI.
  • Reads real Git author dates from any local repository.
  • Calculates active days, first/last day, longest streak, and commit count distribution.
  • Supports year filtering.
  • Exports machine-readable JSON.
  • Includes unit tests and GitHub Actions CI.

Commands

python -m code_momentum.cli --year 2025
python -m code_momentum.cli --year 2025 --json
python -m code_momentum.cli --year 2025 --output docs/sample-report.json
python -m code_momentum.cli --source checkpoints --year 2025

Project Files

  • code_momentum/ contains the CLI and analyzer logic.
  • tests/ covers streak and distribution calculations.
  • activity/log-2025.md records sample progress notes.
  • data/checkpoints.jsonl stores sample machine-readable checkpoints.
  • docs/usage.md shows practical commands.
  • docs/growth-playbook.md lists next steps for making the project more useful.

Development

python -m code_momentum.cli --year 2025
python -m unittest discover -s tests

Roadmap

  • Add weekly and monthly summaries.
  • Add CSV export.
  • Add author filtering for team repositories.
  • Add terminal charts for activity distribution.
  • Add a GitHub Actions workflow that publishes a report artifact.

About

Dependency-free Python CLI for Git activity streaks, active days, and contribution rhythm reports.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages