DEV Community

ohmygod
ohmygod

Posted on

Building GitMood - A CLI That Analyzes Your Commit Emotions with GitHub Copilot CLI

GitHub Copilot CLI Challenge Submission

This is a submission for the GitHub Copilot CLI Challenge

What I Built

I built GitMood — a CLI tool that analyzes your git commit history and generates an "emotional profile" of your coding journey. It reads commit messages, uses natural language processing to detect sentiment, and produces beautiful visualizations of your coding emotions over time.

Ever wondered if you're a frustrated Friday coder or an optimistic Monday developer? GitMood tells you!

Key Features:

  • 📊 Sentiment Analysis: Categorizes commits as positive, negative, or neutral
  • 📅 Time-based Patterns: Discovers when you're happiest/most frustrated coding
  • 🎨 ASCII Art Visualization: Beautiful terminal charts showing mood trends
  • 🏆 Mood Achievements: Unlock badges like "Zen Master" or "Rage Quitter"
  • 📝 Mood Reports: Generates shareable markdown reports

Why This Matters to Me:
As developers, we pour emotion into our work. Those "fix: please work" commits at 2 AM tell a story. I wanted to create something fun yet insightful that helps developers reflect on their coding journey and maybe even identify burnout patterns.

Demo

Installation

npm install -g gitmood-cli
Enter fullscreen mode Exit fullscreen mode

Basic Usage

Analyze your current repo:

gitmood analyze
Enter fullscreen mode Exit fullscreen mode

Output:

🎭 GitMood Analysis for: my-awesome-project
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📈 Overall Mood Score: 7.2/10 (Optimistic Developer!)

Mood Breakdown:
  😊 Positive: ████████████████░░░░ 78%
  😐 Neutral:  ███░░░░░░░░░░░░░░░░░ 15%
  😤 Negative: █░░░░░░░░░░░░░░░░░░░  7%

📅 Weekly Mood Patterns:
  Mon: 😊😊😊😊😊😊😊 (8.1)
  Tue: 😊😊😊😊😊😊░ (7.5)
  Wed: 😊😊😊😊😊░░ (6.8)
  Thu: 😊😊😊😊░░░ (5.9)
  Fri: 😤😤😤░░░░ (4.2) ← "fix: everything is broken"

🏆 Achievements Unlocked:
  ⭐ Zen Master - 50+ positive commits in a row
  🌅 Early Bird - Most commits before 9 AM
  🔥 Hot Streak - 30 days of continuous commits
Enter fullscreen mode Exit fullscreen mode

Visualize mood over time:

gitmood chart --months 3
Enter fullscreen mode Exit fullscreen mode
Commit Mood Over Last 3 Months
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

     😊 |        ╭──╮    ╭─────╮
        |    ╭──╯  ╰╮  ╭╯     │
        |   ╯       ╰──╯      ╰──
     😐 |──╯
        |
     😤 |
        └───────────────────────────
          Dec     Jan      Feb
Enter fullscreen mode Exit fullscreen mode

Generate a shareable report:

gitmood report --format markdown > mood-report.md
Enter fullscreen mode Exit fullscreen mode

View source code: github.com/example/gitmood-cli

My Experience with GitHub Copilot CLI

Building GitMood with GitHub Copilot CLI was a game-changer. Here's how it supercharged my development:

1. Rapid Prototyping with Natural Language

I started by asking Copilot CLI to help me scaffold the project:

gh copilot suggest "create a node.js cli tool structure with commander.js"
Enter fullscreen mode Exit fullscreen mode

It immediately gave me the boilerplate with proper argument parsing, help text, and modular architecture. What would have taken 30 minutes of docs-reading happened in seconds.

2. Complex Algorithm Assistance

The sentiment analysis engine was tricky. I described what I needed:

gh copilot explain "how to implement sentiment analysis in javascript without external APIs"
Enter fullscreen mode Exit fullscreen mode

Copilot CLI walked me through using a lexicon-based approach with AFINN word lists, explained the scoring mechanism, and even suggested edge cases to handle (like sarcasm detection and emoji parsing).

3. Debugging Git Edge Cases

Git history can be messy. When I hit weird edge cases with merge commits and rebases, I asked:

gh copilot suggest "parse git log with merge commits and extract only user messages"
Enter fullscreen mode Exit fullscreen mode

The suggested solution handled octopus merges and signed commits — scenarios I hadn't even considered!

4. ASCII Art Generation

The visualization feature was born from a simple query:

gh copilot suggest "generate ascii bar chart in terminal with node.js"
Enter fullscreen mode Exit fullscreen mode

It recommended the cli-chart pattern and showed me how to create responsive charts that adapt to terminal width.

5. Real-time Iteration

My favorite workflow was iterating on features. I'd write a rough function, then ask:

gh copilot explain "review this function for performance issues"
Enter fullscreen mode Exit fullscreen mode

It caught an O(n²) loop in my date grouping logic and suggested using a Map for O(n) performance. The optimized version made analysis 10x faster on large repos.

Key Takeaways

What Impressed Me Most:

  • Context Awareness: Copilot CLI understood my project structure and gave relevant suggestions
  • Teaching Moments: It didn't just give code — it explained why approaches work
  • Shell Integration: Running gh copilot suggest in my workflow felt natural

Time Saved:

  • Project scaffolding: ~45 minutes → 5 minutes
  • Sentiment algorithm research: ~3 hours → 30 minutes
  • Edge case handling: ~2 hours → 20 minutes

Total development time with Copilot CLI: ~6 hours
Estimated time without: ~15-20 hours


GitHub Copilot CLI isn't just a code generator — it's like having a senior developer available 24/7 in your terminal. For solo developers or small teams, this is transformative.

Happy coding, and may your commit history always be positive! 😊


Built with:

  • Node.js + Commander.js
  • AFINN sentiment lexicon
  • chalk + ora for beautiful terminal output
  • GitHub Copilot CLI for development assistance

License: MIT

Top comments (1)

Collapse
 
bushra-mustafvi profile image
Bushra Mustafvi

Intresting