@cocaxcode/logbook-mcp 0.4.11 → 0.5.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 CHANGED
@@ -2,7 +2,7 @@
2
2
  <h1 align="center">@cocaxcode/logbook-mcp</h1>
3
3
  <p align="center">
4
4
  <strong>Your developer logbook, always one sentence away.</strong><br/>
5
- Notes &middot; TODOs &middot; Reminders &middot; Code scanning &middot; Full-text search &middot; Zero config
5
+ Notes &middot; TODOs &middot; Reminders &middot; Code scanning &middot; Full-text search &middot; Obsidian mode &middot; Zero config
6
6
  </p>
7
7
  </p>
8
8
 
@@ -11,7 +11,7 @@
11
11
  <a href="https://www.npmjs.com/package/@cocaxcode/logbook-mcp"><img src="https://img.shields.io/npm/dm/@cocaxcode/logbook-mcp.svg?style=flat-square" alt="npm downloads" /></a>
12
12
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="License" /></a>
13
13
  <img src="https://img.shields.io/badge/node-%3E%3D20-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node" />
14
- <img src="https://img.shields.io/badge/tools-9-blueviolet?style=flat-square" alt="9 tools" />
14
+ <img src="https://img.shields.io/badge/tools-15-blueviolet?style=flat-square" alt="15 tools" />
15
15
  </p>
16
16
 
17
17
  <p align="center">
@@ -28,9 +28,11 @@
28
28
 
29
29
  ## Quick Overview
30
30
 
31
- logbook-mcp is an MCP server that turns your AI assistant into a persistent developer logbook. Capture decisions, track TODOs, set reminders, and search everything — without leaving your editor.
31
+ logbook-mcp is an MCP server that turns your AI assistant into a persistent developer logbook. Capture decisions, track TODOs, set reminders, scan code TODOs, and search everything with full-text search — without leaving your editor.
32
32
 
33
- It auto-detects your git project, stores everything in a local SQLite database, and works with any MCP-compatible client: Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Codex CLI, or Gemini CLI.
33
+ It auto-detects your git project, stores everything locally, and works with any MCP-compatible client: Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Codex CLI, or Gemini CLI. **All data stays on your machine — nothing is synced, nothing is tracked, nothing leaves your disk.** Notes are scoped per-project automatically, but you can search globally across all your projects at any time.
34
+
35
+ Two storage modes: **SQLite** (default, zero config) or **Obsidian** (markdown files with frontmatter, visible in your Obsidian vault with Graph View, Dataview, Tasks, and Calendar).
34
36
 
35
37
  ---
36
38
 
@@ -260,12 +262,13 @@ logbook-mcp auto-detects which git project you're in via `git rev-parse`. No con
260
262
 
261
263
  | Category | Tools | Count |
262
264
  |----------|-------|:-----:|
263
- | **Activity** | `logbook_log` `logbook_search` | 2 |
264
- | **Notes** | `logbook_note` | 1 |
265
+ | **Activity** | `logbook_log` `logbook_search` `logbook_timeline` | 3 |
266
+ | **Notes** | `logbook_note` `logbook_standup` `logbook_decision` `logbook_debug` | 4 |
265
267
  | **TODOs** | `logbook_todo_add` `logbook_todo_list` `logbook_todo_done` `logbook_todo_edit` `logbook_todo_rm` | 5 |
266
- | **Config** | `logbook_topics` | 1 |
268
+ | **Config** | `logbook_topics` `logbook_tags` | 2 |
269
+ | **Migration** | `logbook_migrate` | 1 |
267
270
  | **Resource** | `logbook://reminders` | — |
268
- | | | **9 tools + 1 resource** |
271
+ | | | **15 tools + 1 resource** |
269
272
 
270
273
  <details>
271
274
  <summary><code>logbook_log</code> — Activity for a period</summary>
@@ -375,20 +378,72 @@ Use this to stop recurring reminders permanently.
375
378
 
376
379
  ## Storage
377
380
 
378
- All data lives in a single SQLite database at `~/.logbook/logbook.db`.
381
+ ### SQLite mode (default)
379
382
 
380
- ```
381
- ~/.logbook/
382
- └── logbook.db
383
- ```
383
+ All data lives in a single SQLite database at `~/.logbook/logbook.db`. Zero config.
384
384
 
385
385
  - **WAL mode** for concurrent reads
386
386
  - **FTS5** virtual tables for instant full-text search
387
387
  - **Triggers** keep search indexes in sync automatically
388
- - **Foreign keys** with `ON DELETE SET NULL` — delete a project, notes remain
389
388
  - **Code TODO snapshots** — tracks which code TODOs existed, detects when they disappear
390
389
 
391
- > **Note:** The database is created automatically on first use. No setup required.
390
+ ### Obsidian mode
391
+
392
+ Writes markdown files with YAML frontmatter directly to your Obsidian vault. Configure with environment variables:
393
+
394
+ ```json
395
+ {
396
+ "mcpServers": {
397
+ "logbook-mcp": {
398
+ "command": "npx",
399
+ "args": ["@cocaxcode/logbook-mcp@latest", "--mcp"],
400
+ "env": {
401
+ "LOGBOOK_STORAGE": "obsidian",
402
+ "LOGBOOK_DIR": "/path/to/your/vault/logbook"
403
+ }
404
+ }
405
+ }
406
+ }
407
+ ```
408
+
409
+ Files are organized by workspace, project, and type:
410
+
411
+ ```
412
+ vault/logbook/
413
+ ├── cocaxcode/
414
+ │ ├── cocaxcode-api/
415
+ │ │ ├── notes/ ← logbook_note
416
+ │ │ ├── todos/ ← logbook_todo_add
417
+ │ │ ├── decisions/ ← logbook_decision
418
+ │ │ ├── debug/ ← logbook_debug
419
+ │ │ ├── standups/ ← logbook_standup
420
+ │ │ └── attachments/ ← copied files
421
+ │ └── cocaxcode-web/
422
+ ├── optimus/
423
+ │ └── optimus-hub/
424
+ ```
425
+
426
+ Each file has YAML frontmatter that Obsidian plugins can query:
427
+
428
+ ```yaml
429
+ ---
430
+ type: todo
431
+ date: 2026-03-21
432
+ project: cocaxcode-api
433
+ workspace: cocaxcode
434
+ status: pending
435
+ priority: high
436
+ due: 2026-03-25
437
+ tags: [auth, urgent]
438
+ ---
439
+ - [ ] Fix JWT refresh token 🔼 📅 2026-03-25
440
+ ```
441
+
442
+ **Recommended Obsidian plugins:** Dataview (SQL-like queries), Calendar (date view), Tasks (checkbox management), Graph View (built-in, shows connections via `[[wikilinks]]`).
443
+
444
+ **Migration from SQLite:** Run `logbook_migrate` with Obsidian mode enabled to convert existing data.
445
+
446
+ > **Tip:** Combine with [Self-hosted LiveSync](https://github.com/vrtmrz/obsidian-livesync) + CouchDB on your VPS to sync your vault across PC, Android, and iOS for free.
392
447
 
393
448
  ---
394
449
 
@@ -397,19 +452,18 @@ All data lives in a single SQLite database at `~/.logbook/logbook.db`.
397
452
  ```
398
453
  src/
399
454
  ├── index.ts # Entry: --mcp → server, else CLI
400
- ├── server.ts # createServer() — 9 tools + 1 resource
455
+ ├── server.ts # createServer() — 15 tools + 1 resource
401
456
  ├── cli.ts # CLI (help, version)
402
457
  ├── types.ts # Shared interfaces
403
- ├── db/
404
- │ ├── connection.ts # getDb() singleton → ~/.logbook/logbook.db
405
- │ ├── schema.ts # Tables + FTS5 + triggers + topic seed
406
- └── queries.ts # Typed query functions + reminder logic
407
- ├── git/
408
- ├── detect-repo.ts # Auto-detect project via git rev-parse
409
- │ └── code-todos.ts # Scan TODO/FIXME/HACK/BUG via git grep
410
- ├── resources/
411
- └── reminders.ts # MCP Resource: logbook://reminders
412
- └── tools/ # 9 MCP tools (one file each)
458
+ ├── storage/
459
+ │ ├── types.ts # StorageBackend interface
460
+ │ ├── index.ts # getStorage() factory (sqlite | obsidian)
461
+ ├── sqlite/ # SQLite backend (wraps db/)
462
+ │ └── obsidian/ # Obsidian backend (markdown + frontmatter)
463
+ ├── db/ # SQLite internals
464
+ ├── git/ # Git repo detection + code TODO scanning
465
+ ├── resources/ # MCP Resource: logbook://reminders
466
+ └── tools/ # 15 MCP tools (one file each)
413
467
  ```
414
468
 
415
469
  **Stack:** TypeScript &middot; MCP SDK &middot; better-sqlite3 &middot; Zod &middot; tsup
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/cli.ts
4
- var VERSION = true ? "0.4.11" : "0.0.0";
4
+ var VERSION = true ? "0.5.0" : "0.0.0";
5
5
  async function runCli(argv) {
6
6
  if (argv.includes("--version") || argv.includes("-v")) {
7
7
  console.log(`logbook-mcp v${VERSION}`);
package/dist/index.js CHANGED
@@ -6,13 +6,13 @@ async function main() {
6
6
  const hasMcpFlag = argv.includes("--mcp");
7
7
  if (hasMcpFlag) {
8
8
  const { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
9
- const { createServer } = await import("./server-YMKNQLDZ.js");
9
+ const { createServer } = await import("./server-WVSGAZ2E.js");
10
10
  const server = createServer();
11
11
  const transport = new StdioServerTransport();
12
12
  await server.connect(transport);
13
13
  console.error("logbook-mcp server running on stdio");
14
14
  } else {
15
- const { runCli } = await import("./cli-YOUH5FEY.js");
15
+ const { runCli } = await import("./cli-7NK5XS7T.js");
16
16
  await runCli(argv);
17
17
  }
18
18
  }