@drewpayment/mink 0.3.0 → 0.4.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 +80 -11
- package/dist/cli.js +583 -320
- package/package.json +1 -1
- package/src/cli.ts +10 -1
- package/src/commands/config.ts +1 -1
- package/src/commands/device.ts +65 -0
- package/src/commands/session-start.ts +16 -0
- package/src/core/device.ts +72 -0
- package/src/core/global-config.ts +72 -11
- package/src/core/paths.ts +12 -0
- package/src/core/sync.ts +12 -0
- package/src/types/config.ts +25 -0
package/README.md
CHANGED
|
@@ -21,6 +21,7 @@ Mink intercepts these lifecycle events and maintains structured state so the ass
|
|
|
21
21
|
- **Advise on frameworks** with a decision tree and migration guides
|
|
22
22
|
- **Build a cross-project wiki** that accumulates knowledge across all your projects
|
|
23
23
|
- **Capture notes from anywhere** with an AI-powered Claude Code skill that categorizes, tags, and links notes automatically
|
|
24
|
+
- **Sync across machines** with git-backed `~/.mink` syncing — auto-pull on session start, auto-push on session stop
|
|
24
25
|
|
|
25
26
|
## How It Works
|
|
26
27
|
|
|
@@ -69,7 +70,7 @@ All state lives in `~/.mink/` -- nothing is stored in your project repository.
|
|
|
69
70
|
- **Claude Code Skill** — `/mink:note` skill uses Claude as the AI brain for intelligent categorization, tagging, and wikilink insertion
|
|
70
71
|
- **Daily Notes** — `mink note --daily` creates or appends to daily journal entries
|
|
71
72
|
- **Vault Index** — Token-efficient file index for the vault, with search and tag aggregation
|
|
72
|
-
- **
|
|
73
|
+
- **External Linking** — Symlink external notes directories into the vault for a unified Obsidian experience
|
|
73
74
|
- **Templates** — 6 built-in templates (quick-capture, daily, meeting, project, area, person)
|
|
74
75
|
|
|
75
76
|
### Advanced
|
|
@@ -249,19 +250,77 @@ The vault is a standard markdown directory fully compatible with Obsidian:
|
|
|
249
250
|
|
|
250
251
|
Open the vault directory as an Obsidian vault and everything works out of the box.
|
|
251
252
|
|
|
252
|
-
###
|
|
253
|
+
### Link external notes
|
|
253
254
|
|
|
254
|
-
|
|
255
|
+
If you already have a notes repository, you can symlink it into the vault so everything appears together in Obsidian:
|
|
255
256
|
|
|
256
257
|
```bash
|
|
257
|
-
#
|
|
258
|
-
mink
|
|
258
|
+
# Symlink your existing notes into the vault
|
|
259
|
+
mink wiki link ~/dev/notes
|
|
259
260
|
|
|
260
|
-
#
|
|
261
|
-
|
|
261
|
+
# Result: ~/.mink/wiki/notes -> ~/dev/notes
|
|
262
|
+
|
|
263
|
+
# Custom name
|
|
264
|
+
mink wiki link ~/dev/notes my-notes
|
|
265
|
+
|
|
266
|
+
# List linked directories
|
|
267
|
+
mink wiki links
|
|
268
|
+
|
|
269
|
+
# Remove a link (original directory is untouched)
|
|
270
|
+
mink wiki unlink notes
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Open `~/.mink/wiki/` as your Obsidian vault and you'll see Mink's generated content (projects, patterns, inbox) alongside your own notes — with `[[wikilinks]]` working across both.
|
|
274
|
+
|
|
275
|
+
## Sync
|
|
276
|
+
|
|
277
|
+
Mink can sync your entire `~/.mink` directory (wiki, config, project knowledge) across machines using git.
|
|
278
|
+
|
|
279
|
+
### Set up sync
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
# Initialize sync with a remote repository
|
|
283
|
+
mink sync init git@github.com:you/mink-data.git
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
This initializes git in `~/.mink`, sets the remote, and creates a `.gitignore` that excludes machine-specific state (PIDs, logs, backups).
|
|
287
|
+
|
|
288
|
+
### Automatic sync
|
|
289
|
+
|
|
290
|
+
Once initialized, sync happens automatically:
|
|
291
|
+
|
|
292
|
+
- **Session start** — pulls remote changes (rebase-based, preserves local work)
|
|
293
|
+
- **Session stop** — commits and pushes local changes
|
|
294
|
+
|
|
295
|
+
No manual intervention needed. Your wiki, config, learning memory, and bug history stay in sync.
|
|
296
|
+
|
|
297
|
+
### Manual sync
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# Full sync (pull then push)
|
|
301
|
+
mink sync
|
|
302
|
+
|
|
303
|
+
# Individual operations
|
|
304
|
+
mink sync pull
|
|
305
|
+
mink sync push
|
|
306
|
+
|
|
307
|
+
# Check sync state
|
|
308
|
+
mink sync status
|
|
309
|
+
|
|
310
|
+
# Temporarily disable auto-sync
|
|
311
|
+
mink sync pause
|
|
312
|
+
mink sync resume
|
|
313
|
+
|
|
314
|
+
# Remove git tracking (data preserved)
|
|
315
|
+
mink sync disconnect
|
|
262
316
|
```
|
|
263
317
|
|
|
264
|
-
|
|
318
|
+
### Conflict handling
|
|
319
|
+
|
|
320
|
+
- Pull uses stash + rebase to preserve local changes
|
|
321
|
+
- If a rebase conflict occurs, the rebase is aborted and you're warned to resolve manually
|
|
322
|
+
- Push failures preserve the local commit — it will be included in the next push
|
|
323
|
+
- Git operations have timeouts (5-15s) so they never block your session
|
|
265
324
|
|
|
266
325
|
### Hook integration
|
|
267
326
|
|
|
@@ -292,9 +351,11 @@ mink config notes.default-category inbox
|
|
|
292
351
|
| `wiki.path` | `~/.mink/wiki/` | `MINK_WIKI_PATH` | Vault directory |
|
|
293
352
|
| `wiki.enabled` | `true` | `MINK_WIKI_ENABLED` | Toggle wiki feature |
|
|
294
353
|
| `wiki.sync-mode` | `immediate` | `MINK_WIKI_SYNC_MODE` | Update timing |
|
|
295
|
-
| `wiki.git-backup` | `false` | `MINK_WIKI_GIT_BACKUP` | Auto-commit and push |
|
|
296
|
-
| `wiki.git-remote` | `origin` | `MINK_WIKI_GIT_REMOTE` | Git remote for push |
|
|
297
354
|
| `notes.default-category` | `inbox` | `MINK_NOTES_DEFAULT_CATEGORY` | Default note category |
|
|
355
|
+
| `sync.enabled` | `false` | — | Enable git sync for ~/.mink |
|
|
356
|
+
| `sync.remote-url` | — | — | Git remote URL for sync |
|
|
357
|
+
| `sync.last-push` | — | — | Timestamp of last push |
|
|
358
|
+
| `sync.last-pull` | — | — | Timestamp of last pull |
|
|
298
359
|
|
|
299
360
|
## Architecture
|
|
300
361
|
|
|
@@ -379,7 +440,7 @@ mink/
|
|
|
379
440
|
│ │ ├── post-read.ts # Hook: post-read tracking
|
|
380
441
|
│ │ ├── pre-write.ts # Hook: write enforcement
|
|
381
442
|
│ │ ├── post-write.ts # Hook: post-write tracking
|
|
382
|
-
│ │ ├── wiki.ts # Wiki vault management (init, status, rebuild, organize)
|
|
443
|
+
│ │ ├── wiki.ts # Wiki vault management (init, status, link, unlink, rebuild, organize)
|
|
383
444
|
│ │ ├── note.ts # Note capture, list, and search
|
|
384
445
|
│ │ ├── skill.ts # Claude Code skill installer
|
|
385
446
|
│ │ ├── status.ts # Project health display
|
|
@@ -421,6 +482,7 @@ mink/
|
|
|
421
482
|
│ │ ├── note-writer.ts # Note creation, frontmatter, daily notes
|
|
422
483
|
│ │ ├── note-linker.ts # Wikilink extraction, insertion, backlinks
|
|
423
484
|
│ │ ├── note-index.ts # Vault file index with search
|
|
485
|
+
│ │ ├── sync.ts # Git-based ~/.mink sync engine
|
|
424
486
|
│ │ └── ... # Global config, backup, reflection, etc.
|
|
425
487
|
│ ├── dashboard/ # Embedded dashboard UI (HTML/CSS/JS generation)
|
|
426
488
|
│ │ ├── get-dashboard-html.ts # Main HTML assembly
|
|
@@ -491,6 +553,13 @@ bun src/cli.ts note --daily "Today I worked on mink"
|
|
|
491
553
|
bun src/cli.ts note list --recent 5
|
|
492
554
|
bun src/cli.ts note search "testing"
|
|
493
555
|
|
|
556
|
+
# Link external notes into the vault
|
|
557
|
+
bun src/cli.ts wiki link ~/dev/notes
|
|
558
|
+
|
|
559
|
+
# Set up cross-device sync
|
|
560
|
+
bun src/cli.ts sync init git@github.com:you/mink-data.git
|
|
561
|
+
bun src/cli.ts sync status
|
|
562
|
+
|
|
494
563
|
# Install the Claude Code skill
|
|
495
564
|
bun src/cli.ts skill install
|
|
496
565
|
```
|