gitglimpse 0.1.3__tar.gz → 0.1.4__tar.gz

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.
Files changed (31) hide show
  1. gitglimpse-0.1.4/PKG-INFO +391 -0
  2. gitglimpse-0.1.4/README.md +366 -0
  3. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/pyproject.toml +3 -2
  4. gitglimpse-0.1.4/src/gitglimpse/__init__.py +1 -0
  5. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/cli.py +36 -141
  6. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/commands/pr.md +1 -1
  7. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/commands/report.md +1 -1
  8. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/commands/standup.md +1 -1
  9. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/commands/week.md +1 -1
  10. gitglimpse-0.1.3/PKG-INFO +0 -23
  11. gitglimpse-0.1.3/src/gitglimpse/__init__.py +0 -1
  12. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/.gitignore +0 -0
  13. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/LICENSE +0 -0
  14. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/commands/__init__.py +0 -0
  15. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/config.py +0 -0
  16. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/estimation.py +0 -0
  17. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/formatters/__init__.py +0 -0
  18. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/formatters/json.py +0 -0
  19. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/formatters/markdown.py +0 -0
  20. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/formatters/pr.py +0 -0
  21. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/formatters/template.py +0 -0
  22. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/git.py +0 -0
  23. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/grouping.py +0 -0
  24. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/onboarding.py +0 -0
  25. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/providers/__init__.py +0 -0
  26. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/providers/base.py +0 -0
  27. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/providers/claude.py +0 -0
  28. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/providers/gemini.py +0 -0
  29. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/providers/local.py +0 -0
  30. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/providers/openai.py +0 -0
  31. {gitglimpse-0.1.3 → gitglimpse-0.1.4}/src/gitglimpse/py.typed +0 -0
@@ -0,0 +1,391 @@
1
+ Metadata-Version: 2.4
2
+ Name: gitglimpse
3
+ Version: 0.1.4
4
+ Summary: Extract structured context from your git history — PR descriptions, standups, weekly reports, and LLM-ready JSON.
5
+ Project-URL: Homepage, https://github.com/dino/gitglimpse
6
+ Project-URL: Repository, https://github.com/dino/gitglimpse
7
+ Project-URL: Bug Tracker, https://github.com/dino/gitglimpse/issues
8
+ Author: Dino
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: cli,developer-tools,git,standup
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Requires-Python: >=3.11
17
+ Requires-Dist: inquirerpy>=0.3.4
18
+ Requires-Dist: platformdirs>=4.0
19
+ Requires-Dist: rich>=13.0
20
+ Requires-Dist: tomli-w>=1.2
21
+ Requires-Dist: typer[all]>=0.9.0
22
+ Provides-Extra: llm
23
+ Requires-Dist: httpx>=0.27; extra == 'llm'
24
+ Description-Content-Type: text/markdown
25
+
26
+ <div align="center">
27
+
28
+ <img src="docs/gitglimpse.png" alt="gitglimpse" width="120">
29
+
30
+ # gitglimpse
31
+
32
+ **Extract structured context from your git history. Standups, PR descriptions, weekly reports, and LLM-ready JSON — from one command.**
33
+
34
+ 50KB of raw diffs → 1KB of structured signal. Less noise, fewer tokens, better output.
35
+
36
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-3776AB?logo=python&logoColor=white)](https://python.org)
37
+ [![License: MIT](https://img.shields.io/badge/license-MIT-F59E0B)](LICENSE)
38
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](CONTRIBUTING.md)
39
+
40
+ <br>
41
+
42
+ </div>
43
+
44
+ ---
45
+
46
+ ## Why gitglimpse?
47
+
48
+ Modern development (especially with AI) creates **more changes across more files than ever**.
49
+
50
+ Git tracks *what changed* — but not in a way that's easy to understand quickly.
51
+
52
+ gitglimpse bridges that gap.
53
+
54
+ It turns raw git history into:
55
+
56
+ - 🧠 **Structured context (JSON)** for LLMs and tools
57
+ - 📝 **Standups & reports** for humans
58
+ - 🔍 **Clean summaries** without opening diffs or PRs
59
+
60
+ > Think of it as a **context extraction layer for your codebase**.
61
+
62
+ ---
63
+
64
+ ## ✨ Demo
65
+
66
+ <!-- TODO: Replace with real GIF -->
67
+ ![Standup Demo](docs/demo-standup.gif)
68
+
69
+ ---
70
+
71
+ ## Quick Start
72
+
73
+ ```bash
74
+ pip install gitglimpse
75
+ cd your-project
76
+ glimpse standup
77
+ ````
78
+
79
+ That’s it. No API keys, no setup required.
80
+
81
+ ---
82
+
83
+ ## Core Idea
84
+
85
+ gitglimpse is not just a “standup generator”.
86
+
87
+ It’s a **Git → Structured Context engine**.
88
+
89
+ ```bash
90
+ glimpse standup --json | your-llm
91
+ ```
92
+
93
+ Instead of dumping raw diffs into an LLM, you give it:
94
+
95
+ * grouped tasks
96
+ * extracted tickets
97
+ * filtered noise
98
+ * optional diffs
99
+ * structured JSON
100
+
101
+ ---
102
+
103
+ ## 🚀 Commands
104
+
105
+ ### `glimpse pr`
106
+
107
+ Generate PR summaries from your branch.
108
+
109
+ ```bash
110
+ glimpse pr
111
+ glimpse pr --json
112
+ glimpse pr --base develop
113
+ ```
114
+
115
+ ---
116
+
117
+ ### `glimpse standup`
118
+
119
+ Generate a daily summary or structured context.
120
+
121
+ ```bash
122
+ glimpse standup
123
+ glimpse standup --json
124
+ glimpse standup --since "3 days ago"
125
+ glimpse standup --format markdown
126
+ ```
127
+
128
+ Example:
129
+
130
+ ```
131
+ Yesterday:
132
+ • Add rate limiting middleware (AUTH-42, ~1.5h)
133
+ • Fix pagination bug (BUG-87, ~1h)
134
+
135
+ Estimated effort: 2.5h
136
+ ```
137
+
138
+ ---
139
+
140
+ ### `glimpse week`
141
+
142
+ Weekly breakdown grouped by day.
143
+
144
+ ```bash
145
+ glimpse week
146
+ glimpse week --json
147
+ ```
148
+
149
+ ---
150
+
151
+ ### `glimpse init`
152
+
153
+ Install Claude Code / Cursor slash commands.
154
+
155
+ ```bash
156
+ glimpse init
157
+ ```
158
+
159
+ Then in your editor:
160
+
161
+ ```
162
+ /standup
163
+ /pr
164
+ /week
165
+ ```
166
+
167
+ ---
168
+
169
+ ### `glimpse config`
170
+
171
+ View or edit configuration.
172
+
173
+ ```bash
174
+ glimpse config show
175
+ glimpse config setup
176
+ ```
177
+
178
+ ---
179
+
180
+ ## 🧩 Output Modes
181
+
182
+ | Mode | Description |
183
+ | ------------- | ------------------------------- |
184
+ | **Template** | Fast, deterministic, no LLM |
185
+ | **Local LLM** | Uses Ollama (privacy-first) |
186
+ | **Cloud API** | OpenAI / Anthropic / Gemini |
187
+ | **JSON** | Structured output for pipelines |
188
+
189
+ ---
190
+
191
+ ## 🔥 What Makes It Different
192
+
193
+ ### 1. Noise Filtering (by default)
194
+
195
+ Removes:
196
+
197
+ * merge commits
198
+ * lock files
199
+ * formatting changes
200
+
201
+ So you only see meaningful work.
202
+
203
+ ---
204
+
205
+ ### 2. Task Grouping
206
+
207
+ Commits → grouped into **real tasks**:
208
+
209
+ ```
210
+ 3 commits → 1 task
211
+ ```
212
+
213
+ ---
214
+
215
+ ### 3. Ticket Extraction
216
+
217
+ Automatically parses:
218
+
219
+ ```
220
+ feature/AUTH-42-login → AUTH-42
221
+ ```
222
+
223
+ ---
224
+
225
+ ### 4. Works Without LLMs
226
+
227
+ No AI required.
228
+
229
+ * Good commits → good summaries
230
+ * Bad commits → fallback heuristics
231
+ * LLM → optional enhancement
232
+
233
+ ---
234
+
235
+ ### 5. Built for LLM Workflows
236
+
237
+ Instead of:
238
+
239
+ ```bash
240
+ git diff | llm
241
+ ```
242
+
243
+ You do:
244
+
245
+ ```bash
246
+ glimpse standup --json | llm
247
+ ```
248
+
249
+ Cleaner input → better output.
250
+
251
+ ---
252
+
253
+ ## 🤖 Claude Code Integration
254
+
255
+ <!-- TODO: Add GIF showing /standup usage -->
256
+
257
+ ```bash
258
+ glimpse init
259
+ git add .claude/commands/
260
+ git commit -m "add glimpse commands"
261
+ ```
262
+
263
+ Now every dev on your team gets:
264
+
265
+ ```
266
+ /standup
267
+ /pr
268
+ /week
269
+ ```
270
+
271
+ 📌 The repo becomes the distribution channel.
272
+
273
+ ---
274
+
275
+ ## GitHub Action
276
+
277
+ Add automatic PR context to your repository:
278
+
279
+ ```yaml
280
+ - uses: dino-zecevic/gitglimpse@main
281
+ with:
282
+ github-token: ${{ secrets.GITHUB_TOKEN }}
283
+ ```
284
+
285
+ Every pull request gets a structured summary with changes, ticket IDs, and effort estimates. The comment updates on each push.
286
+
287
+ See [action/README.md](action/README.md) for full configuration options.
288
+
289
+ ---
290
+
291
+ ## 🧠 Multi-Project Mode
292
+
293
+ Run from a parent folder:
294
+
295
+ ```bash
296
+ cd ~/projects
297
+ glimpse standup
298
+ ```
299
+
300
+ gitglimpse will:
301
+
302
+ * detect repos automatically
303
+ * merge timelines
304
+ * group by project or task
305
+
306
+ <!-- TODO: Add multi-project GIF -->
307
+
308
+ ---
309
+
310
+ ## ⚙️ Configuration
311
+
312
+ ```bash
313
+ glimpse config setup
314
+ ```
315
+
316
+ Stored in:
317
+
318
+ ```
319
+ ~/.config/gitglimpse/config.toml
320
+ ```
321
+
322
+ Supports:
323
+
324
+ * local models (Ollama)
325
+ * cloud APIs
326
+ * context modes (`commits`, `diffs`, `both`)
327
+
328
+ ---
329
+
330
+ ## Philosophy
331
+
332
+ * **Privacy-first** — works fully offline
333
+ * **LLM-optional** — useful without AI
334
+ * **Developer-first** — not a manager tool
335
+ * **Composable** — JSON output for pipelines
336
+ * **Honest** — no fake precision (effort is approximate)
337
+
338
+ ---
339
+
340
+ ## When It’s Actually Useful
341
+
342
+ * Weekly summaries across repos
343
+ * PR descriptions
344
+ * Feeding context into coding agents
345
+ * Remembering what you did yesterday
346
+
347
+ ---
348
+
349
+ ## ⚠️ Limitations
350
+
351
+ * Only sees **code changes** (not meetings, docs, etc.)
352
+ * Effort estimation is **heuristic, not accurate**
353
+ * Depends on git history quality
354
+
355
+ ---
356
+
357
+ ## Installation
358
+
359
+ ```bash
360
+ pip install gitglimpse
361
+ ```
362
+
363
+ Requirements:
364
+
365
+ * Python 3.11+
366
+ * git
367
+ * (optional) Ollama or API key
368
+
369
+ ---
370
+
371
+ ## Contributing
372
+
373
+ PRs welcome — especially for:
374
+
375
+ * better effort estimation
376
+ * smarter task grouping
377
+ * improved noise filtering
378
+
379
+ ---
380
+
381
+ ## License
382
+
383
+ MIT
384
+
385
+ ---
386
+
387
+ <div align="center">
388
+
389
+ Built by Dino
390
+
391
+ </div>
@@ -0,0 +1,366 @@
1
+ <div align="center">
2
+
3
+ <img src="docs/gitglimpse.png" alt="gitglimpse" width="120">
4
+
5
+ # gitglimpse
6
+
7
+ **Extract structured context from your git history. Standups, PR descriptions, weekly reports, and LLM-ready JSON — from one command.**
8
+
9
+ 50KB of raw diffs → 1KB of structured signal. Less noise, fewer tokens, better output.
10
+
11
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-3776AB?logo=python&logoColor=white)](https://python.org)
12
+ [![License: MIT](https://img.shields.io/badge/license-MIT-F59E0B)](LICENSE)
13
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](CONTRIBUTING.md)
14
+
15
+ <br>
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## Why gitglimpse?
22
+
23
+ Modern development (especially with AI) creates **more changes across more files than ever**.
24
+
25
+ Git tracks *what changed* — but not in a way that's easy to understand quickly.
26
+
27
+ gitglimpse bridges that gap.
28
+
29
+ It turns raw git history into:
30
+
31
+ - 🧠 **Structured context (JSON)** for LLMs and tools
32
+ - 📝 **Standups & reports** for humans
33
+ - 🔍 **Clean summaries** without opening diffs or PRs
34
+
35
+ > Think of it as a **context extraction layer for your codebase**.
36
+
37
+ ---
38
+
39
+ ## ✨ Demo
40
+
41
+ <!-- TODO: Replace with real GIF -->
42
+ ![Standup Demo](docs/demo-standup.gif)
43
+
44
+ ---
45
+
46
+ ## Quick Start
47
+
48
+ ```bash
49
+ pip install gitglimpse
50
+ cd your-project
51
+ glimpse standup
52
+ ````
53
+
54
+ That’s it. No API keys, no setup required.
55
+
56
+ ---
57
+
58
+ ## Core Idea
59
+
60
+ gitglimpse is not just a “standup generator”.
61
+
62
+ It’s a **Git → Structured Context engine**.
63
+
64
+ ```bash
65
+ glimpse standup --json | your-llm
66
+ ```
67
+
68
+ Instead of dumping raw diffs into an LLM, you give it:
69
+
70
+ * grouped tasks
71
+ * extracted tickets
72
+ * filtered noise
73
+ * optional diffs
74
+ * structured JSON
75
+
76
+ ---
77
+
78
+ ## 🚀 Commands
79
+
80
+ ### `glimpse pr`
81
+
82
+ Generate PR summaries from your branch.
83
+
84
+ ```bash
85
+ glimpse pr
86
+ glimpse pr --json
87
+ glimpse pr --base develop
88
+ ```
89
+
90
+ ---
91
+
92
+ ### `glimpse standup`
93
+
94
+ Generate a daily summary or structured context.
95
+
96
+ ```bash
97
+ glimpse standup
98
+ glimpse standup --json
99
+ glimpse standup --since "3 days ago"
100
+ glimpse standup --format markdown
101
+ ```
102
+
103
+ Example:
104
+
105
+ ```
106
+ Yesterday:
107
+ • Add rate limiting middleware (AUTH-42, ~1.5h)
108
+ • Fix pagination bug (BUG-87, ~1h)
109
+
110
+ Estimated effort: 2.5h
111
+ ```
112
+
113
+ ---
114
+
115
+ ### `glimpse week`
116
+
117
+ Weekly breakdown grouped by day.
118
+
119
+ ```bash
120
+ glimpse week
121
+ glimpse week --json
122
+ ```
123
+
124
+ ---
125
+
126
+ ### `glimpse init`
127
+
128
+ Install Claude Code / Cursor slash commands.
129
+
130
+ ```bash
131
+ glimpse init
132
+ ```
133
+
134
+ Then in your editor:
135
+
136
+ ```
137
+ /standup
138
+ /pr
139
+ /week
140
+ ```
141
+
142
+ ---
143
+
144
+ ### `glimpse config`
145
+
146
+ View or edit configuration.
147
+
148
+ ```bash
149
+ glimpse config show
150
+ glimpse config setup
151
+ ```
152
+
153
+ ---
154
+
155
+ ## 🧩 Output Modes
156
+
157
+ | Mode | Description |
158
+ | ------------- | ------------------------------- |
159
+ | **Template** | Fast, deterministic, no LLM |
160
+ | **Local LLM** | Uses Ollama (privacy-first) |
161
+ | **Cloud API** | OpenAI / Anthropic / Gemini |
162
+ | **JSON** | Structured output for pipelines |
163
+
164
+ ---
165
+
166
+ ## 🔥 What Makes It Different
167
+
168
+ ### 1. Noise Filtering (by default)
169
+
170
+ Removes:
171
+
172
+ * merge commits
173
+ * lock files
174
+ * formatting changes
175
+
176
+ So you only see meaningful work.
177
+
178
+ ---
179
+
180
+ ### 2. Task Grouping
181
+
182
+ Commits → grouped into **real tasks**:
183
+
184
+ ```
185
+ 3 commits → 1 task
186
+ ```
187
+
188
+ ---
189
+
190
+ ### 3. Ticket Extraction
191
+
192
+ Automatically parses:
193
+
194
+ ```
195
+ feature/AUTH-42-login → AUTH-42
196
+ ```
197
+
198
+ ---
199
+
200
+ ### 4. Works Without LLMs
201
+
202
+ No AI required.
203
+
204
+ * Good commits → good summaries
205
+ * Bad commits → fallback heuristics
206
+ * LLM → optional enhancement
207
+
208
+ ---
209
+
210
+ ### 5. Built for LLM Workflows
211
+
212
+ Instead of:
213
+
214
+ ```bash
215
+ git diff | llm
216
+ ```
217
+
218
+ You do:
219
+
220
+ ```bash
221
+ glimpse standup --json | llm
222
+ ```
223
+
224
+ Cleaner input → better output.
225
+
226
+ ---
227
+
228
+ ## 🤖 Claude Code Integration
229
+
230
+ <!-- TODO: Add GIF showing /standup usage -->
231
+
232
+ ```bash
233
+ glimpse init
234
+ git add .claude/commands/
235
+ git commit -m "add glimpse commands"
236
+ ```
237
+
238
+ Now every dev on your team gets:
239
+
240
+ ```
241
+ /standup
242
+ /pr
243
+ /week
244
+ ```
245
+
246
+ 📌 The repo becomes the distribution channel.
247
+
248
+ ---
249
+
250
+ ## GitHub Action
251
+
252
+ Add automatic PR context to your repository:
253
+
254
+ ```yaml
255
+ - uses: dino-zecevic/gitglimpse@main
256
+ with:
257
+ github-token: ${{ secrets.GITHUB_TOKEN }}
258
+ ```
259
+
260
+ Every pull request gets a structured summary with changes, ticket IDs, and effort estimates. The comment updates on each push.
261
+
262
+ See [action/README.md](action/README.md) for full configuration options.
263
+
264
+ ---
265
+
266
+ ## 🧠 Multi-Project Mode
267
+
268
+ Run from a parent folder:
269
+
270
+ ```bash
271
+ cd ~/projects
272
+ glimpse standup
273
+ ```
274
+
275
+ gitglimpse will:
276
+
277
+ * detect repos automatically
278
+ * merge timelines
279
+ * group by project or task
280
+
281
+ <!-- TODO: Add multi-project GIF -->
282
+
283
+ ---
284
+
285
+ ## ⚙️ Configuration
286
+
287
+ ```bash
288
+ glimpse config setup
289
+ ```
290
+
291
+ Stored in:
292
+
293
+ ```
294
+ ~/.config/gitglimpse/config.toml
295
+ ```
296
+
297
+ Supports:
298
+
299
+ * local models (Ollama)
300
+ * cloud APIs
301
+ * context modes (`commits`, `diffs`, `both`)
302
+
303
+ ---
304
+
305
+ ## Philosophy
306
+
307
+ * **Privacy-first** — works fully offline
308
+ * **LLM-optional** — useful without AI
309
+ * **Developer-first** — not a manager tool
310
+ * **Composable** — JSON output for pipelines
311
+ * **Honest** — no fake precision (effort is approximate)
312
+
313
+ ---
314
+
315
+ ## When It’s Actually Useful
316
+
317
+ * Weekly summaries across repos
318
+ * PR descriptions
319
+ * Feeding context into coding agents
320
+ * Remembering what you did yesterday
321
+
322
+ ---
323
+
324
+ ## ⚠️ Limitations
325
+
326
+ * Only sees **code changes** (not meetings, docs, etc.)
327
+ * Effort estimation is **heuristic, not accurate**
328
+ * Depends on git history quality
329
+
330
+ ---
331
+
332
+ ## Installation
333
+
334
+ ```bash
335
+ pip install gitglimpse
336
+ ```
337
+
338
+ Requirements:
339
+
340
+ * Python 3.11+
341
+ * git
342
+ * (optional) Ollama or API key
343
+
344
+ ---
345
+
346
+ ## Contributing
347
+
348
+ PRs welcome — especially for:
349
+
350
+ * better effort estimation
351
+ * smarter task grouping
352
+ * improved noise filtering
353
+
354
+ ---
355
+
356
+ ## License
357
+
358
+ MIT
359
+
360
+ ---
361
+
362
+ <div align="center">
363
+
364
+ Built by Dino
365
+
366
+ </div>
@@ -4,8 +4,9 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "gitglimpse"
7
- version = "0.1.3"
8
- description = "Analyze git history and generate standup updates, daily reports, and weekly summaries."
7
+ version = "0.1.4"
8
+ description = "Extract structured context from your git history PR descriptions, standups, weekly reports, and LLM-ready JSON."
9
+ readme = "README.md"
9
10
  authors = [{ name = "Dino" }]
10
11
  license = { text = "MIT" }
11
12
  requires-python = ">=3.11"
@@ -0,0 +1 @@
1
+ __version__ = "0.1.4"
@@ -50,6 +50,7 @@ def _app_callback(
50
50
  """Analyze git history and generate standup updates, reports, and summaries."""
51
51
 
52
52
  console = Console()
53
+ _stderr_console = Console(stderr=True)
53
54
 
54
55
  # ---------------------------------------------------------------------------
55
56
  # Helpers
@@ -214,7 +215,7 @@ def _resolve_repo_paths(
214
215
  raise typer.Exit(1)
215
216
 
216
217
  names = ", ".join(r.name for r in repos)
217
- console.print(f"[dim]Found {len(repos)} projects: {names}[/dim]", highlight=False)
218
+ _stderr_console.print(f"[dim]Found {len(repos)} projects: {names}[/dim]", highlight=False)
218
219
  return [(r, r.name) for r in repos]
219
220
 
220
221
 
@@ -370,6 +371,14 @@ def standup(
370
371
  typer.Option("--filter-noise/--no-filter-noise",
371
372
  help="Filter out noise commits (merges, formatting, lock files)."),
372
373
  ] = None,
374
+ fmt: Annotated[
375
+ Optional[str],
376
+ typer.Option("--format", help="Output format: 'default' (Rich) or 'markdown'."),
377
+ ] = None,
378
+ output: Annotated[
379
+ Optional[str],
380
+ typer.Option("--output", "-o", help="Save output to file instead of printing."),
381
+ ] = None,
373
382
  skip_setup: Annotated[
374
383
  bool,
375
384
  typer.Option("--skip-setup", help="Skip first-run onboarding.", hidden=True),
@@ -382,7 +391,7 @@ def standup(
382
391
  glimpse standup
383
392
  glimpse standup --since "2 days ago"
384
393
  glimpse standup --json
385
- glimpse standup --context diffs
394
+ glimpse standup --format markdown -o daily.md
386
395
  glimpse standup --repos "api,frontend,landing"
387
396
  """
388
397
  cfg = _load_or_onboard(skip_setup)
@@ -439,6 +448,8 @@ def standup(
439
448
  print(json_str)
440
449
  return
441
450
 
451
+ use_markdown = fmt and fmt.lower() == "markdown"
452
+
442
453
  if filtered_count > 0:
443
454
  console.print(f"[dim]Filtered {filtered_count} noise commits (merges, formatting, dependencies)[/dim]",
444
455
  highlight=False)
@@ -455,131 +466,28 @@ def standup(
455
466
  )
456
467
  else:
457
468
  active_provider = provider
458
- llm_output = provider.summarize_standup(tasks, report_date, diff_snippets)
469
+ if use_markdown:
470
+ llm_output = provider.summarize_report(tasks, report_date, diff_snippets)
471
+ else:
472
+ llm_output = provider.summarize_standup(tasks, report_date, diff_snippets)
459
473
 
460
474
  _print_status_line(resolved_author, active_provider, ctx_mode)
461
- if llm_output:
462
- console.print(llm_output, markup=False, highlight=False)
463
- else:
464
- console.print(
465
- format_standup(tasks, report_date, group_by=group_by if multi else "project"),
466
- highlight=False,
467
- )
468
-
469
-
470
- # ---------------------------------------------------------------------------
471
- # report
472
- # ---------------------------------------------------------------------------
473
-
474
- @app.command()
475
- def report(
476
- no_llm: Annotated[bool, typer.Option("--no-llm", help="Skip LLM, use Markdown formatter.")] = False,
477
- local_llm: Annotated[bool, typer.Option("--local-llm", help="Use local LLM (Ollama).")] = False,
478
- local_llm_url: Annotated[
479
- Optional[str],
480
- typer.Option("--local-llm-url", help="Override local LLM base URL."),
481
- ] = None,
482
- model: Annotated[
483
- Optional[str],
484
- typer.Option("--model", help="LLM model to use (e.g. qwen2.5-coder:latest)."),
485
- ] = None,
486
- since: Annotated[
487
- str, typer.Option("--since", help="Show commits since this date or period.")] = _SENTINEL_SINCE,
488
- author: Annotated[
489
- Optional[str],
490
- typer.Option("--author", help="Filter by author email."),
491
- ] = None,
492
- repo: Annotated[
493
- Optional[str],
494
- typer.Option("--repo", help="Path to git repository. Defaults to current directory."),
495
- ] = None,
496
- repos: Annotated[
497
- Optional[str],
498
- typer.Option("--repos", help="Comma-separated list of repo paths for multi-project mode."),
499
- ] = None,
500
- output: Annotated[
501
- Optional[str],
502
- typer.Option("--output", "-o", help="Save report to this file instead of printing."),
503
- ] = None,
504
- context: Annotated[
505
- Optional[str],
506
- typer.Option("--context", help="LLM context: 'commits', 'diffs', or 'both'."),
507
- ] = None,
508
- filter_noise: Annotated[
509
- Optional[bool],
510
- typer.Option("--filter-noise/--no-filter-noise",
511
- help="Filter out noise commits (merges, formatting, lock files)."),
512
- ] = None,
513
- skip_setup: Annotated[
514
- bool,
515
- typer.Option("--skip-setup", help="Skip first-run onboarding.", hidden=True),
516
- ] = False,
517
- ) -> None:
518
- """Generate a daily Markdown report from git commits.
519
475
 
520
- \b
521
- Examples:
522
- glimpse report
523
- glimpse report -o daily.md
524
- glimpse report --since 2025-03-01
525
- """
526
- cfg = _load_or_onboard(skip_setup)
527
- effective = _effective_since(since, cfg.default_since)
528
- ctx_mode = context or cfg.context_mode
529
- resolved_author = _resolve_author(author, cfg.author_email)
530
- do_filter = filter_noise if filter_noise is not None else cfg.filter_noise
531
-
532
- repo_pairs = _resolve_repo_paths(repo, repos)
533
- multi = len(repo_pairs) > 1
534
-
535
- filtered_count = 0
536
- if multi:
537
- tasks, filtered_count = _collect_multi_project(
538
- repo_pairs, effective, None, resolved_author, do_filter=do_filter,
539
- )
540
- else:
541
- repo_path = repo_pairs[0][0] if repo_pairs[0][1] else (Path(repo) if repo else None)
542
- try:
543
- commits = get_commits(repo_path=repo_path, since=effective, author=resolved_author)
544
- except GitError as exc:
545
- console.print(f"[bold red]Error:[/bold red] {exc}")
546
- raise typer.Exit(1)
547
- if do_filter:
548
- original_count = len(commits)
549
- commits = filter_noise_commits(commits)
550
- filtered_count = original_count - len(commits)
551
- tasks = group_commits_into_tasks(commits)
552
-
553
- report_date = _report_date(effective)
554
-
555
- if filtered_count > 0:
556
- console.print(f"[dim]Filtered {filtered_count} noise commits (merges, formatting, dependencies)[/dim]",
557
- highlight=False)
558
-
559
- active_provider: object | None = None
560
- llm_output: str | None = None
561
- if not no_llm:
562
- provider = _resolve_provider(cfg, local_llm, local_llm_url, model, context_mode=ctx_mode)
563
- if provider is not None:
564
- if isinstance(provider, LocalProvider) and not provider.is_available():
565
- if local_llm:
566
- console.print(
567
- "[yellow]⚠ Local LLM not reachable — falling back to Markdown formatter.[/yellow]"
568
- )
569
- else:
570
- diff_snippets = _collect_diff_snippets(tasks, None, all_commits=True) if ctx_mode in ("diffs",
571
- "both") else None
572
- active_provider = provider
573
- llm_output = provider.summarize_report(tasks, report_date, diff_snippets)
574
-
575
- md = llm_output if llm_output else format_report(tasks, report_date)
576
-
577
- _print_status_line(resolved_author, active_provider, ctx_mode)
578
- if output:
579
- Path(output).write_text(md, encoding="utf-8")
580
- console.print(f"Report saved to [bold]{output}[/bold]")
476
+ if use_markdown:
477
+ md = llm_output if llm_output else format_report(tasks, report_date)
478
+ if output:
479
+ Path(output).write_text(md, encoding="utf-8")
480
+ console.print(f"Report saved to [bold]{output}[/bold]")
481
+ else:
482
+ console.print(md, markup=False, highlight=False)
581
483
  else:
582
- console.print(md, markup=False, highlight=False)
484
+ if llm_output:
485
+ console.print(llm_output, markup=False, highlight=False)
486
+ else:
487
+ console.print(
488
+ format_standup(tasks, report_date, group_by=group_by if multi else "project"),
489
+ highlight=False,
490
+ )
583
491
 
584
492
 
585
493
  # ---------------------------------------------------------------------------
@@ -951,12 +859,6 @@ def init(
951
859
  """
952
860
  root = Path(repo) if repo else Path.cwd()
953
861
 
954
- try:
955
- cfg = load_config()
956
- context_mode = cfg.context_mode
957
- except Exception:
958
- context_mode = "commits"
959
-
960
862
  targets: list[tuple[Path, str]] = [
961
863
  (root / ".claude" / "commands", "Claude Code"),
962
864
  ]
@@ -966,8 +868,6 @@ def init(
966
868
  created: list[Path] = []
967
869
  skipped: list[Path] = []
968
870
 
969
- console.print(f"[dim]Context mode: {context_mode} (change with: glimpse config setup)[/dim]")
970
-
971
871
  for commands_dir, tool_name in targets:
972
872
  console.print(f"\n[bold]{tool_name}[/bold] → {commands_dir}")
973
873
  for name in _COMMAND_TEMPLATES:
@@ -977,16 +877,6 @@ def init(
977
877
  except Exception as exc:
978
878
  console.print(f" [red]Could not read template {name}: {exc}[/red]")
979
879
  continue
980
- content = content.replace(
981
- "glimpse standup --json",
982
- f"glimpse standup --json --context {context_mode}",
983
- ).replace(
984
- "glimpse week --json",
985
- f"glimpse week --json --context {context_mode}",
986
- ).replace(
987
- "glimpse pr --json",
988
- f"glimpse pr --json --context {context_mode}",
989
- )
990
880
  written = _write_command_file(dest, content, force=force, dry_run=False)
991
881
  if written:
992
882
  console.print(f" [green]✓[/green] Created {dest.relative_to(root)}")
@@ -996,9 +886,14 @@ def init(
996
886
 
997
887
  console.print()
998
888
  if created:
889
+ commands_dir = created[0].parent
999
890
  console.print(
1000
891
  f"[bold green]Done.[/bold green] "
1001
892
  f"Created {len(created)} file{'s' if len(created) != 1 else ''}."
1002
893
  )
894
+ console.print(
895
+ f"[dim]Commands use --context both for maximum LLM context. "
896
+ f"Edit the files in {commands_dir.relative_to(root)}/ to change this.[/dim]"
897
+ )
1003
898
  else:
1004
899
  console.print("[yellow]No files were created.[/yellow]")
@@ -3,7 +3,7 @@ Generate a pull request summary from your current branch.
3
3
  Run the following shell command and capture its output:
4
4
 
5
5
  ```
6
- glimpse pr --json
6
+ glimpse pr --json --context both
7
7
  ```
8
8
 
9
9
  Then format the JSON result into a clean PR description using this structure:
@@ -3,7 +3,7 @@ Generate a detailed daily report from your git commits.
3
3
  Run the following shell command and capture its output:
4
4
 
5
5
  ```
6
- glimpse standup --json
6
+ glimpse standup --json --context both
7
7
  ```
8
8
 
9
9
  Then format the JSON result into a **Markdown daily report** using this structure:
@@ -3,7 +3,7 @@ Generate a standup update from your recent git commits.
3
3
  Run the following shell command and capture its output:
4
4
 
5
5
  ```
6
- glimpse standup --json
6
+ glimpse standup --json --context both
7
7
  ```
8
8
 
9
9
  Then format the JSON result into a clean standup update using **exactly** this structure:
@@ -3,7 +3,7 @@ Generate a weekly summary of your git activity.
3
3
  Run the following shell command and capture its output:
4
4
 
5
5
  ```
6
- glimpse week --json
6
+ glimpse week --json --context both
7
7
  ```
8
8
 
9
9
  Then format the JSON result into a **weekly summary** using this structure:
gitglimpse-0.1.3/PKG-INFO DELETED
@@ -1,23 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: gitglimpse
3
- Version: 0.1.3
4
- Summary: Analyze git history and generate standup updates, daily reports, and weekly summaries.
5
- Project-URL: Homepage, https://github.com/dino/gitglimpse
6
- Project-URL: Repository, https://github.com/dino/gitglimpse
7
- Project-URL: Bug Tracker, https://github.com/dino/gitglimpse/issues
8
- Author: Dino
9
- License: MIT
10
- License-File: LICENSE
11
- Keywords: cli,developer-tools,git,standup
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.13
16
- Requires-Python: >=3.11
17
- Requires-Dist: inquirerpy>=0.3.4
18
- Requires-Dist: platformdirs>=4.0
19
- Requires-Dist: rich>=13.0
20
- Requires-Dist: tomli-w>=1.2
21
- Requires-Dist: typer[all]>=0.9.0
22
- Provides-Extra: llm
23
- Requires-Dist: httpx>=0.27; extra == 'llm'
@@ -1 +0,0 @@
1
- __version__ = "0.1.3"
File without changes
File without changes