dev-report 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +350 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h1 align="center">dev-report</h1>
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>AI-powered developer work report generator.</strong><br>
|
|
5
|
+
Reads your Git commits → generates a structured daily work report. Automatically.
|
|
6
|
+
</p>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="#install">Install</a> •
|
|
11
|
+
<a href="#setup">Setup (5 min)</a> •
|
|
12
|
+
<a href="#api-keys">API Keys</a> •
|
|
13
|
+
<a href="#usage">Usage</a> •
|
|
14
|
+
<a href="#vs-code-extension">VS Code</a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
# Task Module Description Time Spent Status
|
|
21
|
+
1 Added return amount to doctor summary Hospital Return amount column added 1h 25m Completed
|
|
22
|
+
2 Excel export for MR list Hospital Users can export MR list to Excel 2h 50m Completed
|
|
23
|
+
3 Fixed input bug in suggestion screen Store Text input fixed in suggestion 1h 10m Completed
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
### npm — Windows, Mac, Linux
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install -g dev-report
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The npm package automatically downloads the correct pre-built binary for your OS.
|
|
37
|
+
|
|
38
|
+
### Homebrew — Mac only
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
brew tap TonmoyTalukder/dev-report
|
|
42
|
+
brew install dev-report
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### VS Code / Open VSX Extension
|
|
46
|
+
|
|
47
|
+
Search **"Dev Report"** in the Extensions panel, or install from [open-vsx.org](https://open-vsx.org/).
|
|
48
|
+
|
|
49
|
+
### Direct Binary
|
|
50
|
+
|
|
51
|
+
Download for your platform from [GitHub Releases](https://github.com/TonmoyTalukder/dev-report/releases), unzip, and put the binary on your PATH.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Setup
|
|
56
|
+
|
|
57
|
+
This is a one-time setup. Run it once per project (or globally).
|
|
58
|
+
|
|
59
|
+
### Step 1 — Run the setup wizard
|
|
60
|
+
|
|
61
|
+
Open a terminal in your project folder and run:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
dev-report init
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
This starts an interactive wizard that asks:
|
|
68
|
+
|
|
69
|
+
- **Git author name** — your name as it appears in `git log` (e.g. `TonmoyTalukder`)
|
|
70
|
+
- **AI provider** — which AI to use (default: `groq`)
|
|
71
|
+
- **API key** — for the provider you chose
|
|
72
|
+
- **Default output format** — `table`, `markdown`, `excel`, or `json`
|
|
73
|
+
|
|
74
|
+
When done, a `dev-report.config.json` file is created in your project.
|
|
75
|
+
|
|
76
|
+
### Step 2 — Review your config
|
|
77
|
+
|
|
78
|
+
Open `dev-report.config.json` — it looks like this:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"user": "TonmoyTalukder",
|
|
83
|
+
"aiProvider": "groq",
|
|
84
|
+
"groqApiKey": "gsk_...",
|
|
85
|
+
"groqModel": "llama-3.3-70b-versatile",
|
|
86
|
+
"geminiApiKey": "",
|
|
87
|
+
"openRouterApiKey": "",
|
|
88
|
+
"ollamaUrl": "http://localhost:11434",
|
|
89
|
+
"ollamaModel": "llama3",
|
|
90
|
+
"defaultOutput": "table"
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Fill in only what you need. You just need the key for the provider you picked.
|
|
95
|
+
|
|
96
|
+
### Step 3 — Add config to .gitignore
|
|
97
|
+
|
|
98
|
+
Your config file contains your API key. **Add it to `.gitignore`** so it never gets committed:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
echo "dev-report.config.json" >> .gitignore
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
> **No one else will ever see your API key.** Each developer has their own `dev-report.config.json` with their own key. The tool does not bundle any API keys.
|
|
105
|
+
|
|
106
|
+
### Step 4 — Generate your first report
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
dev-report generate --checkin=09:00 --checkout=18:00
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Done! ✅
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## API Keys
|
|
117
|
+
|
|
118
|
+
> All supported AI providers offer a **free tier**. No credit card required.
|
|
119
|
+
|
|
120
|
+
### Groq *(default — fastest)*
|
|
121
|
+
|
|
122
|
+
1. Go to [console.groq.com](https://console.groq.com) → sign up (free)
|
|
123
|
+
2. Click **API Keys** → **Create API Key**
|
|
124
|
+
3. Copy the key (starts with `gsk_...`)
|
|
125
|
+
4. Paste it in `dev-report.config.json`:
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"aiProvider": "groq",
|
|
129
|
+
"groqApiKey": "gsk_your_key_here"
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Free models you can use:**
|
|
134
|
+
| Model | Speed | Quality |
|
|
135
|
+
|-------|-------|---------|
|
|
136
|
+
| `llama-3.3-70b-versatile` *(default)* | Fast | High |
|
|
137
|
+
| `llama3-8b-8192` | Very fast | Good |
|
|
138
|
+
| `gemma2-9b-it` | Fast | Good |
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### Google Gemini
|
|
143
|
+
|
|
144
|
+
1. Go to [aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey) → sign in with Google
|
|
145
|
+
2. Click **Create API Key** → select a project
|
|
146
|
+
3. Copy the key (starts with `AIza...`)
|
|
147
|
+
4. Paste it in `dev-report.config.json`:
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"aiProvider": "gemini",
|
|
151
|
+
"geminiApiKey": "AIza_your_key_here"
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
### Ollama *(runs locally — no API key needed)*
|
|
158
|
+
|
|
159
|
+
1. Download and install Ollama from [ollama.com](https://ollama.com)
|
|
160
|
+
2. Pull a model:
|
|
161
|
+
```bash
|
|
162
|
+
ollama pull llama3
|
|
163
|
+
```
|
|
164
|
+
3. Add to `dev-report.config.json`:
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"aiProvider": "ollama",
|
|
168
|
+
"ollamaUrl": "http://localhost:11434",
|
|
169
|
+
"ollamaModel": "llama3"
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
No API key, no internet required once the model is downloaded.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### OpenRouter *(access to many free models)*
|
|
178
|
+
|
|
179
|
+
1. Go to [openrouter.ai/keys](https://openrouter.ai/keys) → create account
|
|
180
|
+
2. Click **Create Key** → copy it (starts with `sk-or-...`)
|
|
181
|
+
3. Paste it in `dev-report.config.json`:
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"aiProvider": "openrouter",
|
|
185
|
+
"openRouterApiKey": "sk-or-your_key_here"
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Free models:**
|
|
190
|
+
| Model |
|
|
191
|
+
|-------|
|
|
192
|
+
| `meta-llama/llama-3.1-8b-instruct:free` *(default)* |
|
|
193
|
+
| `google/gemma-3-27b-it:free` |
|
|
194
|
+
| `mistralai/mistral-7b-instruct:free` |
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Usage
|
|
199
|
+
|
|
200
|
+
### Basic commands
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# Generate report for today (time range)
|
|
204
|
+
dev-report generate --checkin=09:00 --checkout=18:00
|
|
205
|
+
|
|
206
|
+
# With break time deducted (35 min break → subtracted from task time)
|
|
207
|
+
dev-report generate --checkin=09:00 --checkout=18:00 --adjust=35min
|
|
208
|
+
|
|
209
|
+
# Specific date
|
|
210
|
+
dev-report generate --date=2026-03-07 --checkin=09:00 --checkout=17:30
|
|
211
|
+
|
|
212
|
+
# Last N commits (no time range needed)
|
|
213
|
+
dev-report generate --last=10
|
|
214
|
+
|
|
215
|
+
# Filter by Git author
|
|
216
|
+
dev-report generate --user=TonmoyTalukder --checkin=09:00 --checkout=18:00
|
|
217
|
+
|
|
218
|
+
# Use a different AI provider for this run only
|
|
219
|
+
dev-report generate --checkin=09:00 --checkout=18:00 --ai=gemini
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Output formats
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Print table in terminal (default)
|
|
226
|
+
dev-report generate --checkin=09:00 --checkout=18:00
|
|
227
|
+
|
|
228
|
+
# Print as Markdown
|
|
229
|
+
dev-report generate --checkin=09:00 --checkout=18:00 --output=markdown
|
|
230
|
+
|
|
231
|
+
# Save as Markdown file
|
|
232
|
+
dev-report generate --checkin=09:00 --checkout=18:00 --output=markdown --out=report.md
|
|
233
|
+
|
|
234
|
+
# Export to Excel
|
|
235
|
+
dev-report generate --checkin=09:00 --checkout=18:00 --output=excel
|
|
236
|
+
|
|
237
|
+
# Save as JSON
|
|
238
|
+
dev-report generate --checkin=09:00 --checkout=18:00 --output=json
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### All flags
|
|
242
|
+
|
|
243
|
+
| Flag | Description | Example |
|
|
244
|
+
|------|-------------|---------|
|
|
245
|
+
| `--user` | Git author name filter | `--user=TonmoyTalukder` |
|
|
246
|
+
| `--date` | Date (default: today) | `--date=2026-03-07` |
|
|
247
|
+
| `--checkin` | Work start time | `--checkin=09:00` |
|
|
248
|
+
| `--checkout` | Work end time | `--checkout=18:00` |
|
|
249
|
+
| `--adjust` | Break time to subtract | `--adjust=35min`, `--adjust=1h30m` |
|
|
250
|
+
| `--last` | Last N commits | `--last=10` |
|
|
251
|
+
| `--ai` | AI provider override | `--ai=gemini` |
|
|
252
|
+
| `--output` | Output format | `--output=excel` |
|
|
253
|
+
| `--out` | Save to file | `--out=report.md` |
|
|
254
|
+
|
|
255
|
+
### How time is distributed
|
|
256
|
+
|
|
257
|
+
When you provide `--checkin` and `--checkout`, the tool calculates your **total task time budget**:
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
Budget = (checkout − checkin) − adjust
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Each task gets a proportional share based on:
|
|
264
|
+
|
|
265
|
+
- **Commit count** — tasks with more commits get more time
|
|
266
|
+
- **Time spread** — gap between first and last commit in the task
|
|
267
|
+
- **Files changed** — more files = more time
|
|
268
|
+
- **Lines changed** — larger diffs = more time
|
|
269
|
+
- **File complexity** — migrations, configs get a small boost
|
|
270
|
+
- **Commit type** — `feat:` > `fix:` > `chore:` as a multiplier
|
|
271
|
+
|
|
272
|
+
The sum of all time values always equals your budget exactly.
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## VS Code Extension
|
|
277
|
+
|
|
278
|
+
The VS Code extension lets you generate reports without leaving your editor.
|
|
279
|
+
|
|
280
|
+
### Install
|
|
281
|
+
|
|
282
|
+
Search **"Dev Report"** in the Extensions sidebar, or install from [open-vsx.org](https://open-vsx.org/).
|
|
283
|
+
|
|
284
|
+
### Commands
|
|
285
|
+
|
|
286
|
+
Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and search for:
|
|
287
|
+
|
|
288
|
+
| Command | What it does |
|
|
289
|
+
|---------|-------------|
|
|
290
|
+
| `Dev Report: Generate Work Report` | Generate with default settings |
|
|
291
|
+
| `Dev Report: Generate Work Report (with options)` | Opens a panel to set options |
|
|
292
|
+
| `Dev Report: Open Dev Report Panel` | Opens the sidebar panel |
|
|
293
|
+
| `Dev Report: Configure Dev Report` | Opens settings |
|
|
294
|
+
|
|
295
|
+
### Configure in VS Code settings
|
|
296
|
+
|
|
297
|
+
If you want one global configuration that applies to **all projects**, configure through VS Code instead of per-project `dev-report.config.json`:
|
|
298
|
+
|
|
299
|
+
1. Open VS Code Settings (`Ctrl+,` / `Cmd+,`)
|
|
300
|
+
2. Search for **Dev Report**
|
|
301
|
+
3. Fill in your values
|
|
302
|
+
|
|
303
|
+
Or in `settings.json`:
|
|
304
|
+
|
|
305
|
+
```json
|
|
306
|
+
{
|
|
307
|
+
"devReport.user": "TonmoyTalukder",
|
|
308
|
+
"devReport.aiProvider": "groq",
|
|
309
|
+
"devReport.groqApiKey": "gsk_...",
|
|
310
|
+
"devReport.geminiApiKey": "",
|
|
311
|
+
"devReport.openRouterApiKey": "",
|
|
312
|
+
"devReport.ollamaUrl": "http://localhost:11434",
|
|
313
|
+
"devReport.defaultOutput": "markdown"
|
|
314
|
+
}
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
> **Tip:** VS Code settings apply globally across all your projects. Per-project `dev-report.config.json` overrides VS Code settings for that specific project.
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Config Priority
|
|
322
|
+
|
|
323
|
+
Configuration is applied in this order (later overrides earlier):
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
VS Code settings
|
|
327
|
+
↓
|
|
328
|
+
dev-report.config.json (in your project folder)
|
|
329
|
+
↓
|
|
330
|
+
CLI flags (e.g. --ai=gemini)
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Build from Source
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
git clone https://github.com/TonmoyTalukder/dev-report
|
|
339
|
+
cd dev-report
|
|
340
|
+
go build -o dev-report .
|
|
341
|
+
|
|
342
|
+
# Windows
|
|
343
|
+
go build -o dev-report.exe .
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## License
|
|
349
|
+
|
|
350
|
+
MIT
|