swelog-cli 0.9.0 → 0.10.0

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 +19 -481
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,14 +1,5 @@
1
- <!-- markdownlint-disable MD033 -->
2
-
3
1
  # swelog-cli
4
2
 
5
- <h1 align="center">
6
- <br>
7
- <img src="./assets/repository-banner.png" alt="Repository Banner" width="20%">
8
- <br>
9
- swelog-cli
10
- </h1>
11
-
12
3
  `swelog-cli` is a Rust CLI for tracking daily accomplishments in Obsidian.
13
4
 
14
5
  Capture raw notes and optional integration activity throughout the day, summarize
@@ -28,482 +19,29 @@ Confirm the installation:
28
19
  swelog --help
29
20
  ```
30
21
 
31
- ## Quick Start
32
-
33
- ### 1. Create the configuration file
34
-
35
- ```sh
36
- swelog init
37
- ```
38
-
39
- This creates `swelog/swelog.json` inside your operating system's configuration
40
- directory. Run `swelog config` at any time to display the exact path.
41
-
42
- ### 2. Configure your Obsidian vault
43
-
44
- Open `swelog.json` and set `obsidianVaultPath` to the absolute path of your
45
- vault. You can also select a summarization provider and model at this point.
46
-
47
- ```json
48
- {
49
- "obsidianVaultPath": "/absolute/path/to/your/vault",
50
- "swelogFolderName": "swelog",
51
- "workFileName": "WORK.md",
52
- "contextFileName": "CONTEXT.md",
53
- "dailyLogFolderName": "Daily",
54
- "weeklyLogFolderName": "Weekly",
55
- "llm": "ollama",
56
- "llmModel": "llama3.2",
57
- "linearUsername": null
58
- }
59
- ```
60
-
61
- ### 3. Create the vault files
62
-
63
- ```sh
64
- swelog setup
65
- ```
66
-
67
- Swelog creates the work and context files plus the daily and weekly log
68
- directories under `<obsidianVaultPath>/<swelogFolderName>`.
69
-
70
- ### 4. Add your context
71
-
72
- Open `CONTEXT.md` and describe your role, team, systems, and priorities. Swelog
73
- includes this context when generating daily and weekly summaries.
74
-
75
- ### 5. Record and summarize work
76
-
77
- ```sh
78
- swelog log "Met with the payments team about retry failures"
79
- swelog summarize
80
- ```
81
-
82
- The first command adds a bullet to the `## Log` section of `WORK.md`. The second
83
- creates today's daily log and resets `WORK.md` unless `--keep` is provided.
84
-
85
- ## Daily Workflow
86
-
87
- 1. Add notes manually in Obsidian or from the terminal:
88
-
89
- ```sh
90
- swelog log "Reviewed the checkout migration plan"
91
- ```
92
-
93
- 2. Optionally fetch activity from GitHub or Linear:
94
-
95
- ```sh
96
- swelog fetch github
97
- swelog fetch linear
98
- ```
99
-
100
- 3. Review and edit `WORK.md`. Integration sections are created only after the
101
- corresponding integration is used.
102
-
103
- 4. Generate the daily log:
104
-
105
- ```sh
106
- swelog summarize
107
- ```
108
-
109
- 5. Generate a weekly log when ready:
110
-
111
- ```sh
112
- swelog summarize week
113
- ```
114
-
115
- ## Backfilling a Missed Day
116
-
117
- Every command that is tied to a day accepts `--date MM-DD-YYYY`, so a day you
118
- missed can be reconstructed later. `WORK.md` is always the scratch pad the
119
- summary is built from; the date flags only decide which day is fetched and which
120
- file the summary is written to.
121
-
122
- To backfill Monday, 08-17-2026:
123
-
124
- 1. Reset the work file so the day starts clean:
125
-
126
- ```sh
127
- swelog reset
128
- ```
129
-
130
- 2. Write Monday's notes in `WORK.md`, or add them from the terminal:
131
-
132
- ```sh
133
- swelog log "Debugged the retry storm in the payments worker"
134
- ```
135
-
136
- 3. Fetch Monday's integration activity:
137
-
138
- ```sh
139
- swelog fetch github --date 08-17-2026
140
- swelog fetch linear --date 08-17-2026
141
- ```
142
-
143
- 4. Summarize into Monday's daily log:
144
-
145
- ```sh
146
- swelog summarize day --date 08-17-2026
147
- ```
148
-
149
- This writes `Daily/08-17-2026.md` and resets `WORK.md`, so the next missed day
150
- can be backfilled straight away. Add `--force` to replace a daily log that
151
- already exists, or `--keep` to leave `WORK.md` alone.
152
-
153
- 5. Once the week's daily logs exist, summarize the week:
154
-
155
- ```sh
156
- swelog summarize week --week-of 08-17-2026
157
- ```
158
-
159
- | Command | Backfill flag |
160
- | --- | --- |
161
- | `swelog fetch github` | `--date MM-DD-YYYY` |
162
- | `swelog fetch linear` | `--date MM-DD-YYYY` |
163
- | `swelog summarize day` | `--date MM-DD-YYYY` |
164
- | `swelog summarize week` | `--week-of MM-DD-YYYY` |
165
-
166
- `swelog log` and `swelog reset` need no date; they act on `WORK.md`, which holds
167
- whichever day you are currently assembling.
168
-
169
- Linear backfill is best-effort. See [Linear](#linear) for what it can and cannot
170
- recover.
171
-
172
- ## Configuration
173
-
174
- All generated files and directories live inside
175
- `<obsidianVaultPath>/<swelogFolderName>`.
176
-
177
- | Field | Required | Description |
178
- | --- | --- | --- |
179
- | `obsidianVaultPath` | Yes | Absolute path to the Obsidian vault. Commands fail until this is configured. |
180
- | `swelogFolderName` | Yes | Folder created inside the vault for Swelog files. |
181
- | `workFileName` | Yes | Markdown file used to collect the current day's raw notes. |
182
- | `contextFileName` | Yes | Markdown file containing role, team, systems, and priority context. |
183
- | `dailyLogFolderName` | Yes | Directory containing generated daily logs. |
184
- | `weeklyLogFolderName` | Yes | Directory containing generated weekly logs. |
185
- | `llm` | Yes | Summarization provider: `ollama`, `openAi`, or `openRouter`. |
186
- | `llmModel` | Yes | Model identifier interpreted by the configured provider. |
187
- | `linearUsername` | No | Exact Linear assignee name used by `swelog fetch linear`. Leave as `null` when Linear is not used. |
188
-
189
- Display the current configuration and its location:
190
-
191
- ```sh
192
- swelog config
193
- ```
194
-
195
- ## Summarization
196
-
197
- Swelog uses the same configured model for daily and weekly summaries.
198
-
199
- ### Commands
200
-
201
- | Command | Behavior |
202
- | --- | --- |
203
- | `swelog summarize` | Generate today's daily log. Alias for `swelog summarize day`. |
204
- | `swelog summarize day` | Generate today's daily log and reset `WORK.md`. |
205
- | `swelog summarize day --keep` | Generate the daily log without resetting `WORK.md`. |
206
- | `swelog summarize day --force` | Replace an existing daily log for today. |
207
- | `swelog summarize day --date MM-DD-YYYY` | Write the daily log for the supplied date instead of today. |
208
- | `swelog summarize week` | Summarize available Monday-Friday daily logs for the default week. |
209
- | `swelog summarize week --week-of MM-DD-YYYY` | Summarize the week beginning on the supplied Monday. |
210
- | `swelog summarize week --force` | Replace an existing weekly log. |
211
-
212
- Without `--week-of`, weekly summarization uses the current week's Monday. When
213
- run on a Monday, it uses the previous Monday. The command skips missing weekday
214
- logs but fails when no daily logs exist for the selected week.
215
-
216
- Weekly summarization requires `WORK.md` to be empty/default so unfinished daily
217
- notes are not accidentally excluded from a daily log.
218
-
219
- Daily summarization always reads the current `WORK.md`. `--date` only chooses the
220
- file the summary is written to, so it is what you use to backfill a missed day.
221
- See [Backfilling a Missed Day](#backfilling-a-missed-day).
222
-
223
- ### Providers and Models
224
-
225
- | Provider | `llm` | Example `llmModel` | Setup | Authentication | Notes |
226
- | --- | --- | --- | --- | --- | --- |
227
- | Ollama | `ollama` | `llama3.2` | Install Ollama, pull the model, and run the local service. | None | Swelog connects to Ollama at `localhost:11434`. |
228
- | OpenAI | `openAi` | `gpt-5.4-mini` | Select an OpenAI model supported by the Responses API. | API key, prompted on first use | The model value is sent directly to OpenAI. |
229
- | OpenRouter | `openRouter` | `openai/gpt-5.4-mini` | Select an OpenAI Responses-compatible model through OpenRouter. | API key, prompted on first use | The current implementation expects OpenAI Responses API output. |
230
-
231
- Model names are examples, not a fixed allowlist. Set `llmModel` to a model that
232
- is installed locally or available from the selected provider.
233
-
234
- ### Ollama Setup
235
-
236
- 1. Install and start Ollama.
237
- 2. Pull the configured model:
238
-
239
- ```sh
240
- ollama pull llama3.2
241
- ```
242
-
243
- 3. Configure Swelog:
244
-
245
- ```json
246
- {
247
- "llm": "ollama",
248
- "llmModel": "llama3.2"
249
- }
250
- ```
251
-
252
- 4. Run `swelog summarize`. Ensure Ollama remains available at
253
- `localhost:11434` while the command runs.
254
-
255
- ### OpenAI Setup
256
-
257
- 1. Configure the provider and model:
258
-
259
- ```json
260
- {
261
- "llm": "openAi",
262
- "llmModel": "gpt-5.4-mini"
263
- }
264
- ```
265
-
266
- 2. Run `swelog summarize`. The first run asks for your
267
- [OpenAI API key](https://platform.openai.com/api-keys) and stores it in your
268
- operating system keyring.
269
-
270
- ### OpenRouter Setup
271
-
272
- 1. Configure the provider and an OpenAI Responses-compatible model:
273
-
274
- ```json
275
- {
276
- "llm": "openRouter",
277
- "llmModel": "openai/gpt-5.4-mini"
278
- }
279
- ```
280
-
281
- 2. Run `swelog summarize`. The first run asks for your
282
- [OpenRouter API key](https://openrouter.ai/keys) and stores it in your
283
- operating system keyring.
284
-
285
- Never store API keys in `swelog.json`. See [Authentication](#authentication) for
286
- how Swelog stores and clears them.
287
-
288
- ## Integrations
22
+ ## Getting Started
289
23
 
290
- Integrations are optional. The default work file contains only `## Focus` and
291
- `## Log`; integration sections are created lazily when activity is fetched.
24
+ Full documentation lives at
25
+ **[the swelog docs site](https://swelog-cli.vercel.app/)**, including:
292
26
 
293
- | Integration | Command | Configuration | Authentication | Work-file output |
294
- | --- | --- | --- | --- | --- |
295
- | GitHub | `swelog fetch github` | None | Personal access token, prompted on first use | Pull requests opened or merged on the selected date. |
296
- | Linear | `swelog fetch linear` | `linearUsername` | Browser OAuth on first use | Assigned issues grouped by their current status. |
297
-
298
- Swelog surrounds generated sections with invisible HTML markers. Treat the
299
- content inside these managed blocks as generated data because future fetches
300
- replace it.
301
-
302
- ### GitHub
303
-
304
- GitHub fetching records pull requests you opened or merged.
305
-
306
- 1. Fetch today's activity:
307
-
308
- ```sh
309
- swelog fetch github
310
- ```
311
-
312
- The first run asks for a
313
- [GitHub personal access token](https://github.com/settings/tokens) with the
314
- `repo` scope and stores it in your operating system keyring.
315
-
316
- 2. To fetch a previous date, provide `MM-DD-YYYY`:
317
-
318
- ```sh
319
- swelog fetch github --date 08-17-2026
320
- ```
321
-
322
- The command creates or updates a managed `## GitHub` section before `## Log`.
323
- Never store the GitHub token in `swelog.json`.
324
-
325
- ### Linear
326
-
327
- Linear fetching records issues assigned to a configured workspace user.
328
- Without `--date` it records your currently active issues and omits completed and
329
- canceled ones.
330
-
331
- 1. Set the exact Linear assignee name in `swelog.json`:
332
-
333
- ```json
334
- {
335
- "linearUsername": "Rudra Patel"
336
- }
337
- ```
338
-
339
- 2. Run the fetch command:
340
-
341
- ```sh
342
- swelog fetch linear
343
- ```
344
-
345
- 3. On first use, Swelog prints a Linear authorization URL and attempts to open
346
- it in your browser. If the browser does not open, use the printed URL.
347
-
348
- 4. Complete authorization. Swelog stores the resulting OAuth credentials in
349
- your operating system keyring and reuses or refreshes them on later runs.
350
-
351
- 5. To backfill a previous date, provide `MM-DD-YYYY`:
352
-
353
- ```sh
354
- swelog fetch linear --date 08-17-2026
355
- ```
356
-
357
- This records the issues Linear shows activity on for that date, including the
358
- ones you completed or canceled, because finishing an issue is exactly what a
359
- past day's log should capture.
360
-
361
- The generated section groups issues by status:
362
-
363
- ```markdown
364
- ## Linear
365
- ### In Progress
366
- - [ENG-123](https://linear.app/...) Implement OAuth callback handling
367
-
368
- ### Todo
369
- - [ENG-456](https://linear.app/...) Document the Linear integration
370
- ```
371
-
372
- When no issues match, Swelog removes its managed Linear section.
373
-
374
- #### What `--date` can and cannot recover
375
-
376
- The Linear MCP server does not expose issue history, so Swelog can only match on
377
- the timestamps Linear stores on the issue itself: `updatedAt`, `completedAt`,
378
- `canceledAt`, `startedAt`, and `createdAt`. An issue is recorded for a date when
379
- any of those lands on it, read in your local time zone.
380
-
381
- `completedAt`, `canceledAt`, `startedAt`, and `createdAt` never move, so issues
382
- you started, finished, canceled, or filed on a date are recovered no matter how
383
- much later you backfill. `updatedAt` only holds the most recent change, so an
384
- issue you touched on Monday and touched again on Tuesday is attributed to
385
- Tuesday alone. Backfill soon after the fact for the most complete result, and
386
- treat `--date` output as a prompt for your own notes rather than a full record.
387
-
388
- To switch Linear accounts or organizations, update `linearUsername` when needed,
389
- clear the stored authorization, and fetch again:
390
-
391
- ```sh
392
- swelog auth clear linear
393
- swelog fetch linear
394
- ```
395
-
396
- The next fetch starts a new browser authorization flow.
397
-
398
- ## Authentication
399
-
400
- Swelog stores every credential in your operating system's credential store —
401
- Keychain on macOS, Credential Manager on Windows, and the Secret Service on
402
- Linux. Nothing is written to `swelog.json` or any other file in your vault.
403
-
404
- | Credential | Used by | How it is obtained |
405
- | --- | --- | --- |
406
- | GitHub token | `swelog fetch github` | Prompted on first use |
407
- | OpenAI API key | `swelog summarize` with `"llm": "openAi"` | Prompted on first use |
408
- | OpenRouter API key | `swelog summarize` with `"llm": "openRouter"` | Prompted on first use |
409
- | Linear authorization | `swelog fetch linear` | Browser OAuth on first use |
410
-
411
- Review what is stored — values are never printed:
412
-
413
- ```sh
414
- swelog auth status
415
- ```
416
-
417
- If a credential is revoked or rejected, clear it and run the command again to
418
- enter a new one. Every authorization error names this command:
419
-
420
- ```sh
421
- swelog auth clear github
422
- swelog auth clear --all
423
- ```
424
-
425
- ### Environment variable overrides
426
-
427
- `GITHUB_TOKEN`, `OPENAI_API_KEY`, and `OPENROUTER_API_KEY` take precedence over
428
- the keyring when set, so CI and scripted runs work without a credential store.
429
- When one of these is set, `swelog auth status` reports it instead of the stored
430
- value.
431
-
432
- In a non-interactive session — a pipe, a cron job, a CI job — Swelog never
433
- prompts. It fails immediately with the name of the environment variable to set.
434
-
435
- ## Other Commands
436
-
437
- | Command | Behavior |
438
- | --- | --- |
439
- | `swelog log "message"` | Append a bullet to the `## Log` section. |
440
- | `swelog reset` | Reset `WORK.md` to its default Focus-and-Log template. |
441
- | `swelog setup --force` | Recreate and overwrite configured Swelog files. |
442
- | `swelog config` | Display the current configuration and config-file path. |
443
- | `swelog auth status` | Show which credentials are stored, without printing them. |
444
- | `swelog auth clear <credential>` | Remove a stored credential so the next command asks for it again. |
27
+ - [Quick Start](https://swelog-cli.vercel.app/getting-started/quick-start/)
28
+ configure your vault and record your first summarized day
29
+ - [Configuration](https://swelog-cli.vercel.app/getting-started/configuration/)
30
+ every field in `swelog.json`
31
+ - [Summarization](https://swelog-cli.vercel.app/summarization/) — daily and
32
+ weekly logs, and the Ollama, OpenAI, and OpenRouter providers
33
+ - [Integrations](https://swelog-cli.vercel.app/integrations/) pull activity
34
+ from GitHub and Linear
35
+ - [Authentication](https://swelog-cli.vercel.app/reference/authentication/) —
36
+ how credentials are stored and cleared
37
+ - [Command reference](https://swelog-cli.vercel.app/reference/commands/) — the
38
+ full command tree
445
39
 
446
40
  ## Contributing
447
41
 
448
- ### Prerequisites
449
-
450
- - Rust
451
- - Just
452
- - Obsidian
453
- - Ollama when testing the default summarization provider
454
- - Provider credentials when testing hosted models or integrations
455
-
456
- ### Development
457
-
458
- Run the binary locally:
42
+ Source, issues, and contributing guidelines live on
43
+ [GitHub](https://github.com/RudraPatel2003/swelog-cli).
459
44
 
460
- ```sh
461
- just run --help
462
- ```
463
-
464
- Format the workspace:
465
-
466
- ```sh
467
- just format
468
- ```
469
-
470
- Build the workspace:
471
-
472
- ```sh
473
- just build
474
- ```
475
-
476
- Run all tests:
477
-
478
- ```sh
479
- just test
480
- ```
481
-
482
- Run Clippy:
483
-
484
- ```sh
485
- just clippy
486
- ```
487
-
488
- Run the full pull request check:
489
-
490
- ```sh
491
- just pr
492
- ```
493
-
494
- Update the version of the CLI when preparing for a release:
495
-
496
- ```sh
497
- just update-release-version <release-tag>
498
- ```
499
-
500
- ### Pull Request Process
501
-
502
- Create a branch and open a pull request. Branch naming is flexible, but pull
503
- request titles must use Conventional Commit style, for example:
504
-
505
- ```text
506
- feat: add weekly log generation
507
- ```
45
+ ## License
508
46
 
509
- All pull requests must pass `just pr`.
47
+ `swelog-cli` is released under the MIT License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swelog-cli",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "A Rust CLI to track your daily accomplishments in Obsidian",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/RudraPatel2003/swelog-cli",