chat-logbook 0.2.0 → 0.3.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/LICENSE CHANGED
@@ -1,21 +1,16 @@
1
- MIT License
1
+ Copyright (C) 2026 Eva Wu
2
2
 
3
- Copyright (c) 2026 Eva Wu
3
+ This program is free software: you can redistribute it and/or modify
4
+ it under the terms of the GNU Affero General Public License as published by
5
+ the Free Software Foundation, version 3 of the License.
4
6
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
7
+ This program is distributed in the hope that it will be useful,
8
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
+ GNU Affero General Public License for more details.
11
11
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
12
+ You should have received a copy of the GNU Affero General Public License
13
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
14
14
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
15
+ The full text of the GNU Affero General Public License version 3
16
+ can be found at: https://www.gnu.org/licenses/agpl-3.0.txt
package/README.md CHANGED
@@ -1,28 +1,49 @@
1
1
  # chat-logbook
2
2
 
3
- A local-first conversation manager for Claude Code.
3
+ > _Where your AI conversations live._
4
4
 
5
- Browse, tag, annotate, and organize your Claude Code conversation history — all from your browser.
5
+ chat-logbook is a local-first library for your AI conversations. It reads the
6
+ files AI assistants write on your machine — starting with Claude Code, with
7
+ more tools planned — and presents them as a single browsable, searchable,
8
+ organizable history.
6
9
 
7
- ## Features
10
+ > **Status:** Early release (v0.3.0). Browsing, rendering, and
11
+ > soft-delete with Trash are working today. Search, tags, and
12
+ > annotations are on the way. See [Roadmap](#roadmap).
8
13
 
9
- - **Conversation browser** — Three-column interface (filters | session list | conversation content) for navigating all your Claude Code sessions
10
- - **Full-text search** — Find conversations by keywords across all projects
11
- - **Project filtering** — Focus on conversations within a specific project, or view everything at once
12
- - **Real-time streaming** — Watch active Claude Code conversations update live in your browser via SSE
13
- - **Collapsible tool calls** — Tool calls are collapsed by default with a one-line summary (e.g., "Read: src/index.ts")
14
- - **Collapsible thinking blocks** — Thinking blocks are collapsed by default, expandable when you want to inspect Claude's reasoning
15
- - **Soft delete & restore** — Hide sessions you don't need; restore them anytime
16
- - **Keyboard shortcuts** — `↑↓` to switch sessions, `/` to search, `Esc` to go back
17
- - **Dark theme** — Easy on the eyes, consistent with Claude Code's terminal aesthetic
14
+ ## About
18
15
 
19
- ## Quick Start
16
+ You open chat-logbook from the command line, and a browser window opens onto
17
+ your conversation history. You can browse it, find anything in it, tag what
18
+ matters, and pick up where you left off.
20
19
 
21
- ### Prerequisites
20
+ Nothing leaves your machine. There is no account to create. The original
21
+ files written by your AI tools are never modified.
22
22
 
23
- - Node.js >= 20
23
+ Design principles:
24
24
 
25
- ### Usage
25
+ - **Read-only access to source directories.** Original conversation files are
26
+ never modified. Today that means `~/.claude/`; the same rule applies to
27
+ every agent we add.
28
+ - **Local-only.** No telemetry, no analytics, no third-party calls.
29
+ - **Zero configuration.** Install and run.
30
+ - **Drive everything from the keyboard.** A `/` or `⌘K` overlay finds any
31
+ past conversation in seconds. The mouse still works, but every primary
32
+ action has a binding.
33
+
34
+ The full problem statement, user stories, and direction live in the
35
+ [PRD](docs/PRD.md).
36
+
37
+ ## What works today
38
+
39
+ - **Three-column layout** — Resizable panels for filters, session list, and conversation content
40
+ - **Rich conversation rendering** — Markdown, syntax-highlighted code blocks, collapsible tool calls with one-line summaries, and collapsible thinking blocks
41
+ - **Virtual scrolling** — Handles long conversations smoothly with virtualized rendering
42
+ - **Solarized Dark theme** — Easy on the eyes, consistent with Claude Code's terminal aesthetic
43
+
44
+ ## Quick start
45
+
46
+ Requirements: Node.js 20+.
26
47
 
27
48
  Install globally for a shorter command:
28
49
 
@@ -56,19 +77,53 @@ By default, chat-logbook runs on port 3100. Use `PORT=8080 chat-log` to specify
56
77
  **Updating to the latest version**
57
78
  Run `npm install -g chat-logbook@latest` to update. If you use npx, the `@latest` tag ensures you always run the newest version.
58
79
 
59
- ## How It Works
80
+ ## Architecture
60
81
 
61
- chat-logbook reads conversation data directly from the JSONL files that Claude Code stores in `~/.claude/`. It **never modifies** these files — your original conversation data is always left untouched.
82
+ Monorepo with two workspaces, published as a single npm package:
62
83
 
63
- User-created data (custom titles, tags, annotations, highlights) is stored in a separate SQLite database at `~/.chat-logbook/data.db`, using the session ID as the link between the two data sources.
84
+ | Directory | Role | Stack |
85
+ | --------- | ------------------------------------------------------------------------- | --------------------------------------- |
86
+ | `api/` | Backend — reads `~/.claude/` JSONL files, serves session and message data | Hono + @hono/node-server |
87
+ | `web/` | Frontend — three-column SPA with conversation rendering | React + Vite + Tailwind CSS + shadcn/ui |
64
88
 
65
- Because chat-logbook relies on what Claude Code persists to disk, **only conversations that are written to `~/.claude/` are visible**. Ephemeral interactions that Claude Code does not persist (such as `/btw` side questions) are not captured by Claude Code's storage and therefore cannot be displayed.
89
+ In production, Hono serves both the API endpoints and the static frontend
90
+ assets from a single Node.js process. During development, Vite proxies `/api`
91
+ requests to the Hono dev server.
66
92
 
67
- ## FAQ
93
+ ### How it reads conversations
94
+
95
+ chat-logbook reads conversation data directly from the JSONL files that Claude
96
+ Code stores in `~/.claude/`. It **never modifies** these files — your original
97
+ conversation data is always left untouched.
98
+
99
+ Only conversations that are written to `~/.claude/` are visible. Ephemeral
100
+ interactions that Claude Code does not persist (such as `/btw` side questions)
101
+ cannot be displayed.
102
+
103
+ ## Development
104
+
105
+ Requirements: Node.js 20+ and pnpm 10+.
106
+
107
+ ```bash
108
+ git clone https://github.com/evaaaaawu/chat-logbook.git
109
+ cd chat-logbook
110
+ pnpm install
111
+ pnpm dev
112
+ ```
113
+
114
+ ### Scripts
115
+
116
+ | Command | What it does |
117
+ | ---------------- | --------------------------------------------------- |
118
+ | `pnpm dev` | Start dev servers for both workspaces (Vite + Hono) |
119
+ | `pnpm build` | Build frontend and backend for production |
120
+ | `pnpm test` | Run all tests (Vitest) |
121
+ | `pnpm typecheck` | Type-check all workspaces |
68
122
 
69
- ### Is my data safe?
123
+ A Husky `pre-commit` hook runs Prettier on staged files, type-checks, and runs
124
+ the test suite on every commit.
70
125
 
71
- Yes. chat-logbook is fully local — no data ever leaves your machine. It only **reads** from `~/.claude/` and never modifies your original conversation files. The SQLite database it creates for your tags, annotations, and other metadata is stored separately at `~/.chat-logbook/`.
126
+ ## FAQ
72
127
 
73
128
  ### Does chat-logbook work with Claude Code on the web?
74
129
 
@@ -76,17 +131,62 @@ No. chat-logbook reads from local `~/.claude/` files, which are only created by
76
131
 
77
132
  ### Why can't I see my `/btw` conversations?
78
133
 
79
- The `/btw` feature in Claude Code is designed to be ephemeral — questions and answers appear in a temporary overlay and are never written to conversation history files. Since chat-logbook reads from these files, `/btw` exchanges are not available.
80
-
81
- This is by design: `/btw` is intended for quick, throwaway questions. If you want a conversation to be preserved and visible in chat-logbook, use a regular message instead of `/btw`.
134
+ `/btw` is designed to be ephemeral — questions and answers appear in a temporary overlay and are never written to conversation history files. If you want a conversation to be preserved and visible in chat-logbook, use a regular message instead of `/btw`.
82
135
 
83
136
  ## Roadmap
84
137
 
85
- - **Title editing** — Customize session titles for easier identification
86
- - **Tag system** Add color-coded tags to sessions, filter by multiple tags (AND logic)
87
- - **Annotations** Add notes next to any message in a conversation
88
- - **Highlights** Mark important text within conversations
138
+ The headline feature on the way is **Spotlight Search** — a `⌘K` / `/` overlay
139
+ that searches across sessions, messages, tags, and projects with full keyboard
140
+ navigation, full-text matching (SQLite FTS5 trigram), and message-level jump +
141
+ highlight. It is tracked as the [Spotlight Search epic (#5)](https://github.com/evaaaaawu/chat-logbook/issues/5).
142
+
143
+ Work is grouped into release milestones:
144
+
145
+ ### [v0.3.0 — Spotlight Alpha](https://github.com/evaaaaawu/chat-logbook/milestone/1)
146
+
147
+ - **Spotlight overlay skeleton** — `⌘K` / `/` opens an overlay; sessions picker; `Enter` opens, `Esc` closes
148
+ - **SQLite + soft delete & restore** — hide sessions you don't need; recover them anytime
149
+ - **Full keyboard contract** — Browse + Spotlight bindings unified
150
+
151
+ ### [v0.4.0 — Spotlight v1](https://github.com/evaaaaawu/chat-logbook/milestone/2)
152
+
153
+ - **FTS5 full-text messages search** — fast keyword search across all conversations, including CJK and file paths mentioned in tool calls
154
+ - **Incremental reindex** — newly-arrived messages are searchable within seconds
155
+ - **Message-level jump** — Spotlight matches scroll to the exact message and highlight the matched term, with a `n / m matches ↑↓ Esc` navigator bar
156
+ - **Tags & Projects pickers** — `Tab`-cycle picker scopes; tag/project selection applies the same filter pipeline as the navigation panel
157
+ - **Tag system + tag filtering** — color-coded tags, multi-tag AND filtering
158
+ - **Project filtering** — focus on conversations within a specific project
159
+ - **Title editing** — customize session titles for easier identification
160
+
161
+ ### [v0.5.0 — Cross-vendor foundation](https://github.com/evaaaaawu/chat-logbook/milestones)
162
+
163
+ - **Parser plugin architecture** — one plugin per agent, behind a stable
164
+ interface, so adding a new tool is a contained change
165
+ - **First additional agents** — Codex CLI and Aider plugins, alongside the
166
+ existing Claude Code reader
167
+ - **`SyncProvider` interface stub** — a no-op default in the OSS core, leaving
168
+ the integration point open for an opt-in cloud product later
169
+
170
+ ### Later
171
+
172
+ - **Real-time streaming** — watch active conversations update live via SSE
173
+ - **Annotations** — add notes next to any message in a conversation
174
+ - **Highlights** — mark important text within conversations
175
+ - **`#tag` / `@project` prefix syntax** in Spotlight (fast-follow)
176
+ - **Recent-sessions empty state + onboarding hint** in Spotlight (fast-follow)
177
+
178
+ Explicit non-goals: semantic / vector search, cloud sync inside the OSS core,
179
+ and any modification of source directories like `~/.claude/`. See the
180
+ [PRD](docs/PRD.md) for the full out-of-scope list.
181
+
182
+ This project is **not affiliated with Anthropic, OpenAI, or any other AI
183
+ provider.** It reads files those tools write on your machine; it does not
184
+ talk to their servers and is not endorsed by them.
89
185
 
90
186
  ## License
91
187
 
92
- [MIT](LICENSE)
188
+ This project is licensed under the [GNU Affero General Public License v3.0](LICENSE) (AGPL-3.0-only).
189
+
190
+ You are free to use, modify, and distribute this software under the terms of the AGPL-3.0. If you modify the program and make it available over a network, you must release your modified source code under the same license.
191
+
192
+ For commercial licensing inquiries, please contact the author.
@@ -0,0 +1,6 @@
1
+ CREATE TABLE `sessions_meta` (
2
+ `session_id` text PRIMARY KEY NOT NULL,
3
+ `is_deleted` integer DEFAULT false NOT NULL,
4
+ `created_at` integer NOT NULL,
5
+ `updated_at` integer NOT NULL
6
+ );
@@ -0,0 +1,57 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "bc9f920f-c5a0-4f4f-b813-9ea2c69e0f7e",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "sessions_meta": {
8
+ "name": "sessions_meta",
9
+ "columns": {
10
+ "session_id": {
11
+ "name": "session_id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "is_deleted": {
18
+ "name": "is_deleted",
19
+ "type": "integer",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false,
23
+ "default": false
24
+ },
25
+ "created_at": {
26
+ "name": "created_at",
27
+ "type": "integer",
28
+ "primaryKey": false,
29
+ "notNull": true,
30
+ "autoincrement": false
31
+ },
32
+ "updated_at": {
33
+ "name": "updated_at",
34
+ "type": "integer",
35
+ "primaryKey": false,
36
+ "notNull": true,
37
+ "autoincrement": false
38
+ }
39
+ },
40
+ "indexes": {},
41
+ "foreignKeys": {},
42
+ "compositePrimaryKeys": {},
43
+ "uniqueConstraints": {},
44
+ "checkConstraints": {}
45
+ }
46
+ },
47
+ "views": {},
48
+ "enums": {},
49
+ "_meta": {
50
+ "schemas": {},
51
+ "tables": {},
52
+ "columns": {}
53
+ },
54
+ "internal": {
55
+ "indexes": {}
56
+ }
57
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "sqlite",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "6",
8
+ "when": 1777980160883,
9
+ "tag": "0000_safe_slapstick",
10
+ "breakpoints": true
11
+ }
12
+ ]
13
+ }