|
1 | 1 | # π Commit Chronicle |
2 | 2 |
|
3 | | -**Generate beautiful monthly development reports from your git commits - organized by branch!** |
| 3 | +**Generate beautiful development reports from your git commits - organized by branch!** |
4 | 4 |
|
5 | | -Turn your git history into professional reports that show exactly what you worked on, organized by feature branches, bug fixes, and more. |
| 5 | +Turn your git history into professional reports that show exactly what you worked on, with support for both monthly and daily reports, organized by feature branches, bug fixes, and more. |
6 | 6 |
|
7 | | -## π Super Simple Setup |
| 7 | +## β¨ Features |
8 | 8 |
|
9 | | -### Step 1: Copy this to your terminal |
| 9 | +β
**Daily or Monthly Reports** - Choose between single-day or full month analysis |
| 10 | +β
**Branch-Based Organization** - See commits grouped by feature branches |
| 11 | +β
**Professional Markdown Reports** - Clean formatting with tables and statistics |
| 12 | +β
**Multi-Repository Support** - Analyze multiple projects at once |
| 13 | +β
**GitHub Integration** - Includes PR reviews and authored PRs |
| 14 | +β
**Cross-Platform** - Works on macOS, Linux, and Windows (Git Bash/WSL) |
| 15 | +β
**Auto-Save** - Reports saved to your Downloads folder |
| 16 | + |
| 17 | +## π Quick Start for Teams |
| 18 | + |
| 19 | +### Prerequisites |
| 20 | + |
| 21 | +- **git** (required) - Usually already installed |
| 22 | +- **gh** (optional) - GitHub CLI for PR data |
| 23 | +- **zsh** or **bash** shell |
| 24 | + |
| 25 | +### Installation |
10 | 26 |
|
11 | 27 | ```bash |
12 | | -# Add this line to your ~/.zshrc file |
13 | | -echo 'source /Users/ashish/projects/commit-chronicle/commit-chronicle' >> ~/.zshrc |
| 28 | +# 1. Clone the repository |
| 29 | +git clone https://github.com/yourusername/commit-chronicle.git |
| 30 | +cd commit-chronicle |
| 31 | + |
| 32 | +# 2. Make the script executable |
| 33 | +chmod +x commit-chronicle |
14 | 34 |
|
15 | | -# Reload your terminal |
| 35 | +# 3. Optional: Add to PATH for global access |
| 36 | +echo 'export PATH="$PATH:'"$(pwd)"'"' >> ~/.zshrc |
16 | 37 | source ~/.zshrc |
17 | 38 | ``` |
18 | 39 |
|
19 | | -### Step 2: Configure your repositories |
| 40 | +### Configuration |
20 | 41 |
|
21 | | -Open the script file and find this section (around line 162): |
| 42 | +Before running, configure your repository paths by editing the `commit-chronicle` script: |
22 | 43 |
|
23 | 44 | ```bash |
| 45 | +# Open the script |
| 46 | +nano commit-chronicle # or use your preferred editor |
| 47 | + |
| 48 | +# Find this section (around line 264): |
24 | 49 | REPO_PATHS=( |
25 | 50 | "/Users/ashish/work/forked/cx-saas-dashboard" |
26 | 51 | "/Users/ashish/work/forked/cx-saas-server" |
27 | | - # Add your repository paths here |
| 52 | + "/Users/ashish/work/cx-partners" |
| 53 | + "/Users/ashish/work/saas-super-admin" |
28 | 54 | ) |
29 | | -``` |
30 | 55 |
|
31 | | -**Replace with your actual repository paths!** For example: |
32 | | -```bash |
| 56 | +# Replace with YOUR repository paths: |
33 | 57 | REPO_PATHS=( |
34 | | - "/Users/yourname/projects/my-awesome-app" |
35 | | - "/Users/yourname/work/company-project" |
| 58 | + "/Users/yourname/projects/my-project" |
| 59 | + "/Users/yourname/work/team-repo" |
| 60 | + # Add as many repos as you need |
36 | 61 | ) |
37 | 62 | ``` |
38 | 63 |
|
39 | | -### Step 3: Done! π |
| 64 | +**π‘ Tip:** Use `pwd` inside your project folders to get the full path. |
| 65 | + |
| 66 | +## π Usage |
| 67 | + |
| 68 | +### Interactive Mode (Recommended) |
40 | 69 |
|
41 | | -Now you can run `commit_chronicle` from anywhere in your terminal: |
| 70 | +Simply run the script and follow the prompts: |
42 | 71 |
|
43 | 72 | ```bash |
44 | | -commit_chronicle |
| 73 | +./commit-chronicle |
| 74 | +``` |
| 75 | + |
| 76 | +You'll be asked to: |
| 77 | +1. **Choose report type**: Monthly (1) or Daily (2) |
| 78 | +2. **Enter date**: |
| 79 | + - Month format: `2025-10` (for monthly) |
| 80 | + - Date format: `2025-10-23` (for daily) |
| 81 | +3. **Enter your name**: e.g., "John Doe" |
| 82 | +4. **Enter GitHub username**: e.g., "johndoe" |
| 83 | + |
| 84 | +### Example Session |
| 85 | + |
| 86 | +``` |
| 87 | +π Development Report Generator |
| 88 | +======================================== |
| 89 | +π₯οΈ Platform: macos (Darwin) |
| 90 | +
|
| 91 | +π Report Type: |
| 92 | + 1) Month-based (entire month) |
| 93 | + 2) Date-based (specific day) |
| 94 | +Choose option [1]: 2 |
| 95 | +
|
| 96 | +π
Date-based report selected |
| 97 | +
|
| 98 | +π
Enter date (YYYY-MM-DD) [2025-10-23]: 2025-10-18 |
| 99 | +π€ Enter your full name [Ashish Patel]: John Doe |
| 100 | +π Enter GitHub username [ashishxcode]: johndoe |
| 101 | +
|
| 102 | +β
Found repository: /Users/john/projects/my-app |
| 103 | +---------------------------------------- |
| 104 | +π Extracting commits from 1 repositories... |
| 105 | +β
Report generated successfully! |
45 | 106 | ``` |
46 | 107 |
|
47 | 108 | ## π What You'll Get |
48 | 109 |
|
49 | | -β
**Branch-Based Organization** - See commits grouped by feature branches |
50 | | -β
**Professional Reports** - Clean markdown with tables and statistics |
51 | | -β
**Multi-Repository Support** - Analyze multiple projects at once |
52 | | -β
**GitHub Integration** - Includes PR data when available |
53 | | -β
**Saved to Downloads** - Reports automatically saved to your Downloads folder |
| 110 | +### Monthly Report Example |
| 111 | + |
| 112 | +```markdown |
| 113 | +# π Monthly Development Report - October 2025 |
| 114 | + |
| 115 | +> **Developer:** John Doe |
| 116 | +> **GitHub Username:** `johndoe` |
| 117 | +> **Reporting Period:** `2025-10-01 to 2025-10-31` |
| 118 | +
|
| 119 | +--- |
| 120 | + |
| 121 | +## π Pull Request Reviews |
| 122 | + |
| 123 | +### PRs Reviewed by Me |
| 124 | +**Total PRs Reviewed:** 5 |
| 125 | + |
| 126 | +### PRs Authored by Me |
| 127 | +**Total PRs Authored:** 3 |
| 128 | + |
| 129 | +--- |
| 130 | + |
| 131 | +## π Commits Summary |
| 132 | + |
| 133 | +### πΏ Commits Organized by Branch |
| 134 | + |
| 135 | +##### π± `my-app/feat/user-authentication` (15 commits) |
| 136 | +``` |
| 137 | +ββ 2025-10-15 14:23:45 |
| 138 | +ββ feat: add JWT token validation |
| 139 | + |
| 140 | +ββ 2025-10-15 16:45:12 |
| 141 | +ββ feat: implement refresh token mechanism |
| 142 | +``` |
| 143 | +``` |
| 144 | + |
| 145 | +### Daily Report Example |
| 146 | + |
| 147 | +```markdown |
| 148 | +# π Daily Development Report - October 18, 2025 |
| 149 | + |
| 150 | +> **Developer:** John Doe |
| 151 | +> **GitHub Username:** `johndoe` |
| 152 | +> **Reporting Period:** `2025-10-18` |
54 | 153 |
|
| 154 | +--- |
| 155 | + |
| 156 | +## π Commits Summary |
55 | 157 |
|
56 | | -### Sample Output: |
| 158 | +##### π± `my-app/fix/login-bug` (3 commits) |
| 159 | +``` |
| 160 | +ββ 2025-10-18 09:15:30 |
| 161 | +ββ fix: resolve login timeout issue |
| 162 | + |
| 163 | +ββ 2025-10-18 11:42:18 |
| 164 | +ββ test: add unit tests for login flow |
| 165 | +``` |
57 | 166 | ``` |
58 | | -π Monthly Development Report - September 2025 |
59 | 167 |
|
60 | | -πΏ Commits Organized by Branch: |
61 | | -βββ cx-saas-dashboard/feat/user-authentication (15 commits) |
62 | | -βββ cx-saas-dashboard/fix/login-bug (3 commits) |
63 | | -βββ my-app/feature/dark-mode (8 commits) |
64 | | -βββ my-app/main (2 commits) |
| 168 | +## π§ GitHub CLI Setup (Optional but Recommended) |
| 169 | + |
| 170 | +To include PR review data, install and authenticate with GitHub CLI: |
| 171 | + |
| 172 | +### Installation |
| 173 | + |
| 174 | +**macOS:** |
| 175 | +```bash |
| 176 | +brew install gh |
| 177 | +``` |
| 178 | + |
| 179 | +**Linux:** |
| 180 | +```bash |
| 181 | +sudo apt install gh |
| 182 | +# or |
| 183 | +sudo snap install gh |
| 184 | +``` |
| 185 | + |
| 186 | +**Windows:** |
| 187 | +```bash |
| 188 | +winget install GitHub.cli |
| 189 | +# or |
| 190 | +choco install gh |
| 191 | +``` |
| 192 | + |
| 193 | +### Authentication |
| 194 | + |
| 195 | +```bash |
| 196 | +gh auth login |
65 | 197 | ``` |
66 | 198 |
|
67 | | -## π§ Optional: GitHub CLI Setup |
| 199 | +Follow the prompts to authenticate with your GitHub account. |
68 | 200 |
|
69 | | -For pull request data, install GitHub CLI: |
| 201 | +## π οΈ Advanced Configuration |
70 | 202 |
|
71 | | -**macOS:** `brew install gh` |
72 | | -**Linux:** `sudo apt install gh` |
73 | | -**Windows:** `winget install GitHub.cli` |
| 203 | +### Multiple Authors |
74 | 204 |
|
75 | | -Then: `gh auth login` |
| 205 | +If you use different git author names across repos, the script automatically detects and uses the most common one. |
76 | 206 |
|
77 | | -## β Common Questions |
| 207 | +### Custom Output Location |
78 | 208 |
|
79 | | -**Q: Where do I find my repository paths?** |
80 | | -A: Use `pwd` command when you're inside your project folder |
| 209 | +Reports are saved to: |
| 210 | +- **macOS/Linux:** `~/Downloads/` |
| 211 | +- **Windows:** `%USERPROFILE%/Downloads/` |
81 | 212 |
|
82 | | -**Q: Can I change the output location?** |
83 | | -A: Reports are automatically saved to your Downloads folder |
| 213 | +Format: `October_2025_username_report.md` or `October_18_2025_username_report.md` |
84 | 214 |
|
85 | | -**Q: What if I don't see my commits?** |
86 | | -A: Make sure your git name matches what you enter when running the script |
| 215 | +### Cross-Platform Compatibility |
87 | 216 |
|
88 | | -**Q: Does this work on Windows?** |
89 | | -A: Yes! Works on Windows Git Bash, macOS, and Linux |
| 217 | +The script automatically detects your OS and adjusts: |
| 218 | +- Date calculations |
| 219 | +- Path handling |
| 220 | +- Temp file creation |
| 221 | +- Downloads directory location |
| 222 | + |
| 223 | +## β Troubleshooting |
| 224 | + |
| 225 | +### "No commits found" |
| 226 | + |
| 227 | +**Possible causes:** |
| 228 | +1. Git author name mismatch - Check with: `git config user.name` |
| 229 | +2. Wrong date range |
| 230 | +3. No commits in configured repositories for that period |
| 231 | + |
| 232 | +**Fix:** Make sure the name you enter matches your git configuration. |
| 233 | + |
| 234 | +### "Not a git repository" errors |
| 235 | + |
| 236 | +**Fix:** Update the `REPO_PATHS` array in the script with valid repository paths. |
| 237 | + |
| 238 | +### Permissions error |
| 239 | + |
| 240 | +**Fix:** Make the script executable: |
| 241 | +```bash |
| 242 | +chmod +x commit-chronicle |
| 243 | +``` |
| 244 | + |
| 245 | +### GitHub CLI not working |
| 246 | + |
| 247 | +**Fix:** |
| 248 | +1. Install: `brew install gh` (macOS) or `sudo apt install gh` (Linux) |
| 249 | +2. Authenticate: `gh auth login` |
| 250 | +3. Verify: `gh auth status` |
| 251 | + |
| 252 | +## π€ Contributing |
| 253 | + |
| 254 | +Contributions are welcome! Feel free to: |
| 255 | +- Report bugs via GitHub Issues |
| 256 | +- Submit feature requests |
| 257 | +- Create pull requests with improvements |
| 258 | + |
| 259 | +## π License |
| 260 | + |
| 261 | +MIT License - Feel free to use this in your team! |
| 262 | + |
| 263 | +## π― Pro Tips |
| 264 | + |
| 265 | +π‘ **Quarterly Reports:** Use month mode for each month, then combine reports |
| 266 | +π‘ **Daily Standup:** Use date mode to quickly see yesterday's work |
| 267 | +π‘ **Performance Reviews:** Generate reports for review periods |
| 268 | +π‘ **Team Sync:** Share reports in Slack/Teams to show progress |
| 269 | +π‘ **Automation:** Create a cron job for weekly auto-generated reports |
90 | 270 |
|
91 | 271 | --- |
92 | 272 |
|
93 | | -**π― Generate your development report in under 30 seconds!** |
| 273 | +**Made with β€οΈ for developers who want to track their work efficiently** |
| 274 | + |
| 275 | +Need help? Open an issue on GitHub! |
0 commit comments