@ishaan812/devlog 0.0.1 → 0.0.3

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 (2) hide show
  1. package/README.md +152 -56
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -13,6 +13,8 @@
13
13
 
14
14
  Open-source, local-first AI work logging for developers who juggle<br>too many repos, too many branches, and too many standups.
15
15
 
16
+ **[devlog.ishaan812.com](https://devlog.ishaan812.com)**
17
+
16
18
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
17
19
  [![Go Version](https://img.shields.io/badge/go-%3E%3D1.21-blue.svg)](https://go.dev)
18
20
  [![Open Source](https://img.shields.io/badge/open%20source-%E2%9C%93-brightgreen.svg)](https://github.com/ishaan812/devlog)
@@ -22,7 +24,7 @@ Open-source, local-first AI work logging for developers who juggle<br>too many r
22
24
 
23
25
  You ship code across 5 repos, 12 branches, and 3 teams. Monday morning standup hits and you're scrolling through `git log` trying to remember what you did last Thursday.
24
26
 
25
- **DevLog fixes that.** It ingests your git history across every repo and branch you work on, and turns it into smart, structured work logs — automatically. No more "I think I worked on the auth thing?" Ask DevLog and get an answer in seconds.
27
+ **DevLog fixes that.** It ingests your git history across every repo and branch you work on, and turns it into smart, structured work logs — automatically. No more "I think I worked on the auth thing?" Get your work summary in seconds.
26
28
 
27
29
  ---
28
30
 
@@ -32,7 +34,9 @@ You ship code across 5 repos, 12 branches, and 3 teams. Monday morning standup h
32
34
  npm install -g @ishaan812/devlog # Install
33
35
  devlog onboard # Set up (works with free local Ollama)
34
36
  devlog ingest # Point it at your repos
37
+ devlog commit # Generate smart commit messages
35
38
  devlog worklog --days 7 # Get your week's work, organized by branch
39
+ devlog console # Browse worklogs in an interactive TUI
36
40
  ```
37
41
 
38
42
  That's it. Professional markdown work logs, generated from your actual commits. Multi-repo, multi-branch, zero effort.
@@ -60,24 +64,23 @@ DevLog is **local-first**. Run it with [Ollama](https://ollama.ai) and your data
60
64
  | Feature | Description |
61
65
  |---------|-------------|
62
66
  | **Smart Work Logs** | Auto-generated markdown summaries organized by branch, date, and repo — ready for standups, PRs, or performance reviews |
67
+ | **AI Commit Messages** | Generate contextual commit messages from your changes with interactive staging and commit workflow |
68
+ | **Interactive Console** | Full-screen terminal UI to browse repos and navigate through your cached worklogs day-by-day |
63
69
  | **Multi-Repo Ingestion** | Ingest as many repos as you want into a single profile. See your full picture. |
64
70
  | **Multi-Branch Tracking** | Branch-aware ingestion remembers your selections per repo. Track `main`, `develop`, and every feature branch. |
65
71
  | **Local-First AI** | Works completely offline with Ollama. Your code and history stay on your machine. |
66
- | **Cheap Cloud Fallback** | Optionally use Anthropic, OpenAI, OpenRouter, or AWS Bedrock — most queries cost fractions of a cent |
67
- | **Natural Language Queries** | Ask questions about your git history in plain English |
68
- | **Semantic Code Search** | Find code by describing what it does, not just grepping keywords |
72
+ | **Cheap Cloud Fallback** | Optionally use Anthropic, OpenAI, OpenRouter, or AWS Bedrock — most queries are very lightweight and would cost fractions of a cent |
69
73
  | **Profile System** | Isolated databases for work vs. personal, or per-client contexts |
70
74
  | **Incremental Updates** | Re-runs only process new commits. Fast even on large repos. |
71
- | **Codebase Visualization** | Generate structure diagrams and collaboration graphs |
72
75
 
73
76
  ## Quick Start
74
77
 
75
78
  ```bash
76
79
  # 1. Install DevLog
77
- npm install -g devlog
80
+ npm install -g @ishaan812/devlog
78
81
  # or: go install github.com/ishaan812/devlog/cmd/devlog@latest
79
82
 
80
- # 2. Run the setup wizard (picks up Ollama automatically)
83
+ # 2. Run the setup wizard
81
84
  devlog onboard
82
85
 
83
86
  # 3. Ingest your repositories
@@ -87,8 +90,6 @@ devlog ingest ~/projects/shared-lib
87
90
 
88
91
  # 4. See what you actually shipped
89
92
  devlog worklog --days 7
90
- devlog ask "What did I work on this week?"
91
- devlog search "error handling"
92
93
  ```
93
94
 
94
95
  ## Installation
@@ -105,6 +106,16 @@ npm install -g @ishaan812/devlog
105
106
  go install github.com/ishaan812/devlog/cmd/devlog@latest
106
107
  ```
107
108
 
109
+ **Note:** Make sure `$HOME/go/bin` (or `$GOPATH/bin`) is in your PATH. Add this to your shell config if needed:
110
+
111
+ ```bash
112
+ # For bash (~/.bashrc) or zsh (~/.zshrc)
113
+ export PATH="$HOME/go/bin:$PATH"
114
+
115
+ # For fish (~/.config/fish/config.fish)
116
+ set -gx PATH $HOME/go/bin $PATH
117
+ ```
118
+
108
119
  ### From Source
109
120
 
110
121
  ```bash
@@ -190,70 +201,68 @@ One command. Every repo. Every branch. Organized and summarized:
190
201
 
191
202
  That's your standup, done. Copy-paste it, email it, or drop it in Slack.
192
203
 
193
- ### 4. Query Your Activity
194
-
195
- ```bash
196
- # Ask natural language questions
197
- devlog ask "What features did I add this month?"
198
- devlog ask "Show me commits related to the payment system"
199
- devlog ask "Which files have I changed the most?"
200
-
201
- # Semantic code search
202
- devlog search "database connection pooling"
203
- devlog search "user authentication flow"
204
- ```
205
-
206
204
  ## Commands Reference
207
205
 
208
206
  ### `devlog ingest`
209
207
 
210
- Ingest git history and index your codebase for search.
208
+ Ingest git history from your repositories.
211
209
 
212
210
  ```bash
213
211
  devlog ingest # Current directory
214
212
  devlog ingest ~/projects/myapp # Specific path
215
213
  devlog ingest --days 90 # Last 90 days (default: 30)
216
214
  devlog ingest --all # Full git history
217
- devlog ingest --git-only # Skip codebase indexing
218
- devlog ingest --index-only # Skip git history
219
215
  devlog ingest --reselect-branches # Re-select branches
220
216
  devlog ingest --all-branches # Ingest all branches
221
217
  devlog ingest --fill-summaries # Generate missing commit summaries
222
218
  ```
223
219
 
224
- ### `devlog ask`
220
+ ### `devlog worklog`
225
221
 
226
- Query your development activity using natural language.
222
+ Generate formatted work logs from your commit history.
227
223
 
228
224
  ```bash
229
- devlog ask "What did I work on this week?"
230
- devlog ask "Show commits about authentication"
231
- devlog ask "Which files changed the most in January?"
232
- devlog ask --provider anthropic "Summarize my recent work"
225
+ devlog worklog # Default: last 7 days
226
+ devlog worklog --days 30 # Last 30 days
227
+ devlog worklog -o report.md # Custom output file
228
+ devlog worklog --no-llm # Skip AI summaries
229
+ devlog worklog --group-by date # Group by date instead of branch
233
230
  ```
234
231
 
235
- ### `devlog search`
232
+ ### `devlog commit`
236
233
 
237
- Semantic search across your indexed codebase.
234
+ Generate AI-powered commit messages from your changes.
238
235
 
239
236
  ```bash
240
- devlog search "authentication logic"
241
- devlog search "database queries"
242
- devlog search -n 20 "error handling" # More results
237
+ devlog commit # Analyze all changes (staged + unstaged)
238
+ devlog commit --staged-only # Only analyze staged changes
239
+ devlog commit --provider openai # Override LLM provider
240
+ devlog commit --model gpt-5.2 # Override model
243
241
  ```
244
242
 
245
- ### `devlog worklog`
243
+ After generating a commit message, DevLog launches an interactive TUI that:
244
+ 1. Shows the generated message and asks for approval
245
+ 2. Optionally stages all changes with `git add .`
246
+ 3. Commits with the generated message
246
247
 
247
- Generate formatted work logs from your commit history.
248
+ The command analyzes your git diff using AI to create meaningful, contextual commit messages. If you've run `devlog ingest`, it also uses your codebase summary for better context.
249
+
250
+ ### `devlog console`
251
+
252
+ Interactive terminal UI to browse repositories and worklogs.
248
253
 
249
254
  ```bash
250
- devlog worklog # Default: last 7 days
251
- devlog worklog --days 30 # Last 30 days
252
- devlog worklog -o report.md # Custom output file
253
- devlog worklog --no-llm # Skip AI summaries
254
- devlog worklog --group-by date # Group by date instead of branch
255
+ devlog console # Launch full-screen TUI
255
256
  ```
256
257
 
258
+ Features:
259
+ - Browse through all your ingested repositories
260
+ - Navigate day-by-day worklogs
261
+ - View formatted markdown content in the terminal
262
+ - Keyboard shortcuts for quick navigation (arrow keys, j/k, tab)
263
+
264
+ Requires at least one prior `devlog worklog` run to populate the cache.
265
+
257
266
  ### `devlog profile`
258
267
 
259
268
  Manage isolated profiles for different work contexts.
@@ -270,19 +279,9 @@ devlog profile delete old # Delete a profile
270
279
  Use a profile temporarily:
271
280
  ```bash
272
281
  devlog --profile work ingest ~/work/project
273
- devlog --profile personal ask "What did I do this weekend?"
282
+ devlog --profile personal worklog --days 7
274
283
  ```
275
284
 
276
- ### `devlog graph`
277
-
278
- Visualize your codebase structure.
279
-
280
- ```bash
281
- devlog graph # Folder structure
282
- devlog graph --type commits # Commit activity
283
- devlog graph --type files # File change heatmap
284
- devlog graph --type collab # Developer collaboration
285
- devlog graph -o diagram.md # Export as Mermaid markdown
286
285
  ```
287
286
 
288
287
  ### `devlog list`
@@ -374,6 +373,21 @@ DevLog stores all data in `~/.devlog/`:
374
373
 
375
374
  ## Tips & Tricks
376
375
 
376
+ ### AI-Powered Commit Messages
377
+
378
+ Never write a generic "fix stuff" commit message again:
379
+ ```bash
380
+ # Make your changes
381
+ git add . # Optional - devlog can stage for you
382
+ devlog commit
383
+
384
+ # Interactive flow:
385
+ # 1. Shows generated message
386
+ # 2. Asks to stage changes (if not staged)
387
+ # 3. Asks to commit
388
+ # Result: Professional commit message in seconds
389
+ ```
390
+
377
391
  ### Faster Ingestion
378
392
 
379
393
  Skip AI summaries for quick ingestion:
@@ -442,7 +456,6 @@ make install
442
456
 
443
457
  # Run development commands
444
458
  make run-ingest
445
- make run-ask
446
459
  make run-worklog
447
460
  ```
448
461
 
@@ -484,9 +497,92 @@ devlog ingest --skip-summaries
484
497
  - **Open source maintainers** who want to generate changelogs and activity summaries
485
498
  - **Anyone tired of `git log --oneline | head -50`** as a standup prep strategy
486
499
 
500
+ ## About the Project
501
+
502
+ ### The Problem That Started It All
503
+
504
+ Every Monday morning, the same ritual: staring at four terminal windows, trying to piece together what I shipped last week. Between juggling multiple feature branches, emergency hotfixes, and code reviews across frontend, backend, and infrastructure repos, I'd lose track of my own work.
505
+
506
+ Standup meetings became archaeology sessions. Performance reviews meant hours of manual git history diving and piecing together scraps I had left to remember what I worked on. I'd spend an awful amount of time *remembering* what I built.
507
+
508
+ The final straw? Missing a critical bug fix in a standup because it happened in a repo I forgot I'd touched. I realized: **git is the perfect source of truth, but humans are terrible at reading raw git logs across dozens of branches.**
509
+
510
+ What if your git history could just... explain itself?
511
+
512
+ ### What I Learned
513
+
514
+ Building DevLog taught me that **context is expensive, but structured data is cheap**:
515
+
516
+ 1. **LLM Integration Patterns**: Initially, I hardcoded Gemini. Bad idea. Abstracting provider interfaces taught me the value of flexibility—users shouldn't be forced into expensive APIs when Ollama runs free on their laptop. The `llm.Client` interface now supports 5+ providers with zero code changes to the core logic.
517
+
518
+ 2. **Git Isn't Just Text**: Walking a git repository efficiently is *hard*. I learned about git object databases, tree traversal algorithms, and how to use `git2go` (libgit2 bindings) to avoid shelling out to git commands thousands of times. The performance difference was \( O(n \log n) \to O(n) \) for large repos.
519
+
520
+ 3. **Terminal UIs That Don't Suck**: Building the interactive console with [Bubble Tea](https://github.com/charmbracelet/bubbletea) taught me functional reactive patterns in Go. State management in a TUI is surprisingly similar to React—every keypress is an event, every render is a pure function of state.
521
+
522
+ 4. **Distribution Complexity**: Shipping a Go binary via npm was trickier than expected. I learned about platform detection, cross-compilation, release automation with GitHub Actions, and why `install.js` scripts need extensive error handling. Supporting `npm install -g`, `go install`, and `brew` simultaneously meant tripling my packaging logic.
523
+
524
+ 5. **Privacy-First Design**: Making Ollama the default provider wasn't just philosophical—it forced architectural decisions that made the tool better. Every API call had to be justified. Every piece of data sent to an LLM had to be minimal. The result: most queries are < 2KB, even for large repos.
525
+
526
+ ### Challenges I Faced
527
+
528
+ 1. **Multi-Repo Timeline Merging**
529
+ **Problem**: Users work on 5+ repos simultaneously. How do you merge timelines across repos while keeping branch context clear?
530
+ **Solution**: Unified timestamp sorting with branch metadata preserved. WorkLogs group by `(date, repo, branch)` tuples, then sort commits within each group. The data model stores absolute timestamps, avoiding timezone hell.
531
+
532
+ 2. **LLM Prompt Engineering for Code**
533
+ **Problem**: Early summaries were terrible—either too verbose ("added semicolon to line 47") or too vague ("updated files").
534
+ **Solution**: Iterative prompt design with few-shot examples. I learned that LLMs need *explicit structure*:
535
+ ```
536
+ Given these commits, extract:
537
+ - High-level changes (what feature/fix)
538
+ - Technical approach (how it works)
539
+ - Files affected (why it matters)
540
+ ```
541
+ This increased summary quality by ~60% based on user feedback.
542
+
543
+ 3. **Performance on Large Repos**
544
+ **Problem**: A repo with 50,000 commits would take 2+ minutes to ingest. Unacceptable.
545
+ **Solution**: Incremental ingestion. DevLog tracks the last processed commit SHA per branch. Re-runs only walk new commits:
546
+ \[
547
+ T_{\text{ingest}} = O(k) \text{ where } k = \text{new commits}, \text{ not } O(n)
548
+ \]
549
+ Average re-ingest time dropped from 120s to 3s on active repos.
550
+
551
+ 4. **Cross-Platform Binary Distribution**
552
+ **Problem**: Go users want `go install`. JS developers want `npm install -g`. Both should work.
553
+ **Solution**: `package.json` includes a post-install script (`install.js`) that detects the platform, downloads the correct pre-built binary from GitHub releases, and symlinks it. Go users bypass npm entirely. One codebase, two package managers.
554
+
555
+ 5. **Making TUIs Feel Native**
556
+ **Problem**: Terminal UIs often feel sluggish or unresponsive. Arrow key lag, janky scrolling, unclear state changes.
557
+ **Solution**: Embraced Bubble Tea's Elm architecture. Every component is a pure state machine. Render logic never blocks. The result: 60 FPS terminal UIs with smooth vim-style navigation (`j`/`k` keys, `Ctrl+D`/`Ctrl+U` scrolling).
558
+
559
+ ### What's Next
560
+
561
+ - **Linear/Slack/Jira integrations**: To be able to gather informations from all work surfaces
562
+ - **Team mode**: Aggregate worklogs across teams for engineering manager reports
563
+ - **Git hooks**: Auto-commit worklogs to a markdown file in your repo on each commit
564
+
565
+ DevLog started as a personal itch—I was tired of forgetting my own work. It turned into a lesson in building tools that respect user privacy, embrace local-first principles, and make boring tasks (standup prep) disappear. If you've ever fumbled through your slack messages at 8:59am before a standup, this tool is for you.
566
+
487
567
  ## Contributing
488
568
 
489
- Contributions are welcome! Please feel free to submit a Pull Request.
569
+ Contributions are welcome! DevLog is open source and we'd love your help making it better.
570
+
571
+ **Ways to contribute:**
572
+ - 🐛 Report bugs or issues
573
+ - 💡 Suggest new features or improvements
574
+ - 📝 Improve documentation
575
+ - 🔧 Submit pull requests for bug fixes or features
576
+ - ⭐ Star the repo if you find it useful
577
+
578
+ **Getting started:**
579
+ 1. Fork the repository
580
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
581
+ 3. Make your changes and commit (`git commit -m 'feat: add amazing feature'`)
582
+ 4. Push to your branch (`git push origin feature/amazing-feature`)
583
+ 5. Open a Pull Request
584
+
585
+ See the [Development](#development) section for build instructions.
490
586
 
491
587
  ## License
492
588
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ishaan812/devlog",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "AI-powered development activity tracker and code intelligence tool. Local-first work logging for developers who juggle too many repos.",
5
5
  "bin": {
6
6
  "devlog": "./bin/devlog-wrapper.js"