Skip to content

Commit 85acbbd

Browse files
committed
feat: type for the new daily report feature
1 parent cf08952 commit 85acbbd

2 files changed

Lines changed: 411 additions & 103 deletions

File tree

β€ŽREADME.mdβ€Ž

Lines changed: 228 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,275 @@
11
# πŸ“Š Commit Chronicle
22

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!**
44

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.
66

7-
## πŸš€ Super Simple Setup
7+
## ✨ Features
88

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
1026

1127
```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
1434

15-
# Reload your terminal
35+
# 3. Optional: Add to PATH for global access
36+
echo 'export PATH="$PATH:'"$(pwd)"'"' >> ~/.zshrc
1637
source ~/.zshrc
1738
```
1839

19-
### Step 2: Configure your repositories
40+
### Configuration
2041

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:
2243

2344
```bash
45+
# Open the script
46+
nano commit-chronicle # or use your preferred editor
47+
48+
# Find this section (around line 264):
2449
REPO_PATHS=(
2550
"/Users/ashish/work/forked/cx-saas-dashboard"
2651
"/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"
2854
)
29-
```
3055

31-
**Replace with your actual repository paths!** For example:
32-
```bash
56+
# Replace with YOUR repository paths:
3357
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
3661
)
3762
```
3863

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)
4069

41-
Now you can run `commit_chronicle` from anywhere in your terminal:
70+
Simply run the script and follow the prompts:
4271

4372
```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!
45106
```
46107

47108
## πŸ“‹ What You'll Get
48109

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`
54153
154+
---
155+
156+
## πŸ“ Commits Summary
55157

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+
```
57166
```
58-
πŸ“Š Monthly Development Report - September 2025
59167

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
65197
```
66198

67-
## πŸ”§ Optional: GitHub CLI Setup
199+
Follow the prompts to authenticate with your GitHub account.
68200

69-
For pull request data, install GitHub CLI:
201+
## πŸ› οΈ Advanced Configuration
70202

71-
**macOS:** `brew install gh`
72-
**Linux:** `sudo apt install gh`
73-
**Windows:** `winget install GitHub.cli`
203+
### Multiple Authors
74204

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.
76206

77-
## ❓ Common Questions
207+
### Custom Output Location
78208

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/`
81212

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`
84214

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
87216

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
90270

91271
---
92272

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

Comments
Β (0)