swelog-cli 0.7.0 → 0.9.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.
- package/README.md +386 -87
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- markdownlint-disable MD033-->
|
|
1
|
+
<!-- markdownlint-disable MD033 -->
|
|
2
2
|
|
|
3
3
|
# swelog-cli
|
|
4
4
|
|
|
@@ -9,138 +9,449 @@
|
|
|
9
9
|
swelog-cli
|
|
10
10
|
</h1>
|
|
11
11
|
|
|
12
|
-
## Description
|
|
13
|
-
|
|
14
12
|
`swelog-cli` is a Rust CLI for tracking daily accomplishments in Obsidian.
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Then, aggregate the daily logs into a weekly log for more long-term tracking.
|
|
14
|
+
Capture raw notes and optional integration activity throughout the day, summarize
|
|
15
|
+
them into daily logs with an LLM, and combine daily logs into a weekly summary.
|
|
19
16
|
|
|
20
17
|
## Installation
|
|
21
18
|
|
|
22
|
-
Install with npm:
|
|
19
|
+
Install the CLI with npm:
|
|
23
20
|
|
|
24
21
|
```sh
|
|
25
22
|
npm install -g swelog-cli
|
|
26
23
|
```
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### Getting Started
|
|
31
|
-
|
|
32
|
-
- Run `swelog init` to create a default config file
|
|
33
|
-
|
|
34
|
-
- Update the config file with your Obsidian vault path and model provider
|
|
35
|
-
|
|
36
|
-
- Run `swelog setup` to create the default swelog files in your Obsidian vault
|
|
37
|
-
|
|
38
|
-
- Update the context file with information about your role, team, and current priorities
|
|
39
|
-
|
|
40
|
-
### Daily Workflow
|
|
25
|
+
Confirm the installation:
|
|
41
26
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- Run `swelog summarize` or `swelog summarize day` to generate a daily log
|
|
27
|
+
```sh
|
|
28
|
+
swelog --help
|
|
29
|
+
```
|
|
47
30
|
|
|
48
|
-
|
|
31
|
+
## Quick Start
|
|
49
32
|
|
|
50
|
-
###
|
|
33
|
+
### 1. Create the configuration file
|
|
51
34
|
|
|
52
|
-
|
|
35
|
+
```sh
|
|
36
|
+
swelog init
|
|
37
|
+
```
|
|
53
38
|
|
|
54
|
-
|
|
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.
|
|
55
41
|
|
|
56
|
-
|
|
42
|
+
### 2. Configure your Obsidian vault
|
|
57
43
|
|
|
58
|
-
`swelog
|
|
59
|
-
|
|
60
|
-
default config looks like this:
|
|
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.
|
|
61
46
|
|
|
62
47
|
```json
|
|
63
48
|
{
|
|
64
|
-
"obsidianVaultPath": "",
|
|
49
|
+
"obsidianVaultPath": "/absolute/path/to/your/vault",
|
|
65
50
|
"swelogFolderName": "swelog",
|
|
66
51
|
"workFileName": "WORK.md",
|
|
67
52
|
"contextFileName": "CONTEXT.md",
|
|
68
53
|
"dailyLogFolderName": "Daily",
|
|
69
54
|
"weeklyLogFolderName": "Weekly",
|
|
70
55
|
"llm": "ollama",
|
|
71
|
-
"llmModel": "llama3.2"
|
|
56
|
+
"llmModel": "llama3.2",
|
|
57
|
+
"linearUsername": null
|
|
72
58
|
}
|
|
73
59
|
```
|
|
74
60
|
|
|
75
|
-
|
|
76
|
-
|
|
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
|
+
```
|
|
77
99
|
|
|
78
|
-
|
|
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 |
|
|
79
160
|
| --- | --- |
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `dailyLogFolderName` | Name of the folder (inside the swelog folder) where generated daily logs are stored. |
|
|
85
|
-
| `weeklyLogFolderName` | Name of the folder (inside the swelog folder) where generated weekly logs are stored. |
|
|
86
|
-
| `llm` | LLM provider used for summarization. One of `ollama`, `openAi`, or `openRouter`. |
|
|
87
|
-
| `llmModel` | Model used for summarization, interpreted by whichever provider `llm` names. Examples: `llama3.2` for `ollama`, `gpt-5.4-mini` for `openAi`, `openai/gpt-5.4-mini` for `openRouter`. |
|
|
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` |
|
|
88
165
|
|
|
89
|
-
|
|
166
|
+
`swelog log` and `swelog reset` need no date; they act on `WORK.md`, which holds
|
|
167
|
+
whichever day you are currently assembling.
|
|
90
168
|
|
|
91
|
-
|
|
169
|
+
Linear backfill is best-effort. See [Linear](#linear) for what it can and cannot
|
|
170
|
+
recover.
|
|
92
171
|
|
|
93
|
-
|
|
172
|
+
## Configuration
|
|
94
173
|
|
|
95
|
-
|
|
174
|
+
All generated files and directories live inside
|
|
175
|
+
`<obsidianVaultPath>/<swelogFolderName>`.
|
|
96
176
|
|
|
97
|
-
|
|
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. |
|
|
98
188
|
|
|
99
|
-
|
|
100
|
-
`swelog summarize`:
|
|
189
|
+
Display the current configuration and its location:
|
|
101
190
|
|
|
102
191
|
```sh
|
|
103
|
-
|
|
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
|
|
289
|
+
|
|
290
|
+
Integrations are optional. The default work file contains only `## Focus` and
|
|
291
|
+
`## Log`; integration sections are created lazily when activity is fetched.
|
|
292
|
+
|
|
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
|
|
104
370
|
```
|
|
105
371
|
|
|
106
|
-
|
|
372
|
+
When no issues match, Swelog removes its managed Linear section.
|
|
373
|
+
|
|
374
|
+
#### What `--date` can and cannot recover
|
|
107
375
|
|
|
108
|
-
|
|
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.
|
|
109
380
|
|
|
110
|
-
|
|
111
|
-
|
|
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:
|
|
112
390
|
|
|
113
391
|
```sh
|
|
114
|
-
|
|
392
|
+
swelog auth clear linear
|
|
393
|
+
swelog fetch linear
|
|
115
394
|
```
|
|
116
395
|
|
|
117
|
-
|
|
396
|
+
The next fetch starts a new browser authorization flow.
|
|
397
|
+
|
|
398
|
+
## Authentication
|
|
118
399
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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.
|
|
122
403
|
|
|
123
|
-
|
|
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 |
|
|
124
410
|
|
|
125
|
-
|
|
411
|
+
Review what is stored — values are never printed:
|
|
126
412
|
|
|
127
413
|
```sh
|
|
128
|
-
|
|
414
|
+
swelog auth status
|
|
129
415
|
```
|
|
130
416
|
|
|
131
|
-
|
|
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. |
|
|
132
445
|
|
|
133
446
|
## Contributing
|
|
134
447
|
|
|
135
448
|
### Prerequisites
|
|
136
449
|
|
|
137
|
-
Please have the following installed on your machine:
|
|
138
|
-
|
|
139
450
|
- Rust
|
|
140
451
|
- Just
|
|
141
|
-
- Ollama, when using the default Ollama provider
|
|
142
|
-
- An OpenAI / OpenRouter API key, when using the OpenAI / OpenRouter provider
|
|
143
452
|
- Obsidian
|
|
453
|
+
- Ollama when testing the default summarization provider
|
|
454
|
+
- Provider credentials when testing hosted models or integrations
|
|
144
455
|
|
|
145
456
|
### Development
|
|
146
457
|
|
|
@@ -188,23 +499,11 @@ just update-release-version <release-tag>
|
|
|
188
499
|
|
|
189
500
|
### Pull Request Process
|
|
190
501
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
To contribute, please create a new branch and make a pull request.
|
|
194
|
-
|
|
195
|
-
The rules for branch names are lax, just be sure to include your name.
|
|
196
|
-
|
|
197
|
-
An example branch name for a change that adds weekly log generation would be:
|
|
198
|
-
|
|
199
|
-
```text
|
|
200
|
-
rudra-weekly-log-generation
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
Your pull request title must follow the conventional commits specification. An
|
|
204
|
-
example of a valid pull request title is:
|
|
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:
|
|
205
504
|
|
|
206
505
|
```text
|
|
207
|
-
feat:
|
|
506
|
+
feat: add weekly log generation
|
|
208
507
|
```
|
|
209
508
|
|
|
210
|
-
All
|
|
509
|
+
All pull requests must pass `just pr`.
|