Psychological analysis of Git repositories - understand your team's behavior patterns
Reason this release was yanked:
not ready
Project description
Git Therapy - Advanced Git Repository Psychological Analysis
git-therapy is a comprehensive CLI tool that psychoanalyzes Git repositories to build detailed psychological profiles of development teams. It transforms raw commit data into actionable insights about developer behavior, stress patterns, team dynamics, and workflow efficiency.
๐ Features
Core Analyzers
- ๐ฅ Rage Commit Detection: Identifies frustration patterns and stress indicators
- ๐ด Sleep Deprivation Analysis: Detects unhealthy work patterns and night coding sessions
- ๐ฆธโโ๏ธ Hero Moment Detection: Recognizes emergency responders and weekend saves
- ๐ฅ Personality Profiling: Classifies developers into 5 psychological types
- ๐ค Team Dynamics: Analyzes collaboration patterns and workflow efficiency
Advanced Features
- ๐ Interactive HTML Reports: Beautiful dashboards with Chart.js visualizations
- โ๏ธ Configurable Thresholds: YAML/JSON configuration for all analyzers
- ๐ Performance Optimizations: Parallel processing for large repositories
- ๐ก Actionable Insights: AI-powered recommendations and risk assessment
- ๐ Trend Analysis: Historical patterns and regression detection
๐ฆ Installation
# Install from source (recommended for development)
git clone https://github.com/yourusername/git-therapy.git
cd git-therapy
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
๐ฏ Quick Start
Basic Analysis
# Analyze current repository
git-therapy analyze
# Analyze specific repository with more commits
git-therapy analyze --path /path/to/repo --max-count 500
# Generate HTML report
git-therapy analyze --format html --output report.html
Advanced Analysis with Team Dynamics
# Pro CLI with advanced features
git-therapy-pro analyze --include-team --max-count 1000
# Team-specific analysis
git-therapy-pro team --max-count 500
# With custom configuration
git-therapy-pro --config custom.yaml analyze --include-team
Configuration Management
# Create default configuration
git-therapy-pro config --init
# View current settings
git-therapy-pro config --show
# Use custom config file
git-therapy-pro --config .git-therapy.yaml analyze
๐ Sample Output
Summary Report
Git Therapy Analysis
==================================================
Repository: my-awesome-project
Branch: main
Total commits: 847
Contributors: 5
Analyzed commits: 500
Quick Stats:
Lines added: +45,230
Lines removed: -12,847
Merge commits: 67
Team Dynamics:
Communication Health: 76.2%
Workflow Efficiency: 68.9%
Knowledge Silos: 2
Hot Files: 8
For detailed analysis:
git-therapy-pro analyze --format html --output report.html
Personality Types Detected
- ๐ฏ Perfezionista: Detailed commits, extensive testing, high quality
- ๐ค Cowboy: Large changes, infrequent commits, minimal tests
- ๐ Pompiere: Weekend fixes, emergency responses, irregular hours
- ๐ป Ghost: Rare but massive commits, minimal communication
- โ๏ธ Tuttofare: Balanced approach, consistent patterns
โ๏ธ Configuration
Create .git-therapy.yaml for custom thresholds:
rage:
high_rage_threshold: 0.8
medium_rage_threshold: 0.5
short_message_threshold: 15
sleep:
night_start_hour: 22
night_end_hour: 7
high_risk_threshold: 0.3
hero:
weekend_days: [5, 6] # Saturday, Sunday
emergency_keywords: ["urgent", "critical", "hotfix"]
personality:
min_commits_threshold: 5
verbose_output: false
max_workers: 4
๐ฌ Analysis Examples
Rage Commit Detection
# High rage detected: "FIX THE DAMN BUG!!!"
# Severity: HIGH | Score: 0.89 | Reasons: ALL_CAPS, SWEAR_WORDS, FRUSTRATION
Sleep Deprivation Patterns
# Alice Developer: 34% night work (HIGH RISK)
# - 67 commits between 00:00-06:00
# - 3 consecutive night sessions detected
# - Estimated sleep debt: 23 hours
Team Collaboration Health
# Communication Health: 68%
# - Good commit message quality
# - Moderate conflict resolution
# - Some knowledge silos detected
# Top Collaborations:
# Alice โ Bob: 23 shared files
# Carol โ Dave: 15 shared files (2 conflicts)
๐ Performance
git-therapy is optimized for repositories of all sizes:
- Small repos (<1K commits): ~2-5 seconds
- Medium repos (1K-10K commits): ~10-30 seconds
- Large repos (10K-100K commits): ~1-5 minutes
- Enterprise repos (100K+ commits): Use
--max-countfor faster results
Performance Tips
# Limit scope for faster analysis
git-therapy-pro analyze --max-count 1000 --since "2024-01-01"
# Use parallel processing
git-therapy-pro analyze --max-workers 8
# Cache results with configuration
git-therapy-pro --config .git-therapy.yaml analyze
๐งช Development
Run Tests
# All tests with coverage
python -m pytest --cov=git_therapy --cov-report=term-missing
# Specific analyzer tests
python -m pytest tests/test_rage_detector.py -v
# Integration tests
python -m pytest tests/test_advanced_cli.py -v
Code Quality
# Linting and formatting
ruff check git_therapy/ tests/
ruff format git_therapy/ tests/
# Type checking
mypy git_therapy/
# Pre-commit hooks
pre-commit run --all-files
Architecture Overview
git_therapy/
โโโ analyzers/ # Core psychological analyzers
โ โโโ rage.py # Rage commit detection
โ โโโ sleep.py # Sleep deprivation analysis
โ โโโ hero.py # Hero moment detection
โ โโโ personality.py # Developer personality profiling
โ โโโ team_dynamics.py # Team collaboration analysis
โ โโโ insights.py # AI-powered insights generation
โโโ parser/ # Git data extraction
โ โโโ git_log.py # GitPython integration
โโโ report/ # HTML report generation
โ โโโ generator.py # Jinja2 + Chart.js reports
โ โโโ templates/ # HTML templates
โโโ config/ # Configuration management
โ โโโ __init__.py # YAML/JSON config system
โโโ cli.py # Basic CLI interface
โโโ advanced_cli.py # Pro CLI with team features
โโโ performance.py # Optimization utilities
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Guidelines
- Maintain >80% test coverage
- Follow PEP 8 style guidelines
- Add type annotations for all functions
- Update documentation for new features
- Test on both Windows and Unix systems
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- GitPython for Git repository access
- Chart.js for beautiful visualizations
- Click for CLI framework
- Jinja2 for HTML templating
๐ Support
- ๐ง Email: support@git-therapy.dev
- ๐ Issues: GitHub Issues
- ๐ Docs: Documentation
- ๐ฌ Discord: Community Server
"Every commit tells a story. git-therapy helps you understand the human story behind the code."
Built with โค๏ธ for developers who want to understand their teams better.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_therapy-1.0.0.tar.gz.
File metadata
- Download URL: git_therapy-1.0.0.tar.gz
- Upload date:
- Size: 75.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdae96fbd045b0519f0d6364cc246f15ec848e38026d7e1abcc683a8bd454a09
|
|
| MD5 |
d4d934730196dabc4b912e0baf389d4a
|
|
| BLAKE2b-256 |
0a47d4d9ecb0dc3187163a1434afec91bc3d52263018e3206794201b2e8b4c0f
|
File details
Details for the file git_therapy-1.0.0-py3-none-any.whl.
File metadata
- Download URL: git_therapy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 48.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9b20acbd79185b4a2649884ffccb909a662b4a8a553263c518136dc8c35715b
|
|
| MD5 |
ead24222e76f2fa682e403eef2fdec42
|
|
| BLAKE2b-256 |
780e627596b824741c8731495f27212c1fb8ef81835e1908040f7ae52c01a91d
|