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 +12 -17
- package/README.md +131 -31
- package/api/dist/drizzle/0000_safe_slapstick.sql +6 -0
- package/api/dist/drizzle/meta/0000_snapshot.json +57 -0
- package/api/dist/drizzle/meta/_journal.json +13 -0
- package/api/dist/index.js +5708 -176
- package/package.json +3 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
Copyright (C) 2026 Eva Wu
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
13
|
-
|
|
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
|
-
|
|
16
|
-
|
|
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
|
-
|
|
3
|
+
> _Where your AI conversations live._
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
23
|
+
Design principles:
|
|
24
24
|
|
|
25
|
-
|
|
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
|
-
##
|
|
80
|
+
## Architecture
|
|
60
81
|
|
|
61
|
-
|
|
82
|
+
Monorepo with two workspaces, published as a single npm package:
|
|
62
83
|
|
|
63
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
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
|
-
[
|
|
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,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
|
+
}
|