chat-logbook 0.1.0 → 0.1.2
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 +16 -7
- package/api/dist/index.js +15 -1
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -20,24 +20,30 @@ Browse, tag, annotate, and organize your Claude Code conversation history — al
|
|
|
20
20
|
|
|
21
21
|
### Prerequisites
|
|
22
22
|
|
|
23
|
-
- Node.js >=
|
|
23
|
+
- Node.js >= 20
|
|
24
24
|
|
|
25
25
|
### Usage
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Install globally for a shorter command:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
npm install -g chat-logbook
|
|
31
|
+
chat-log
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
Or
|
|
34
|
+
Or try without installing:
|
|
34
35
|
|
|
35
36
|
```bash
|
|
36
|
-
|
|
37
|
-
chat-log
|
|
37
|
+
npx chat-logbook@latest
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
You should see:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
chat-logbook is running at http://localhost:3100
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Your browser will open automatically, showing a list of your Claude Code sessions on the left and conversation content on the right.
|
|
41
47
|
|
|
42
48
|
### Troubleshooting
|
|
43
49
|
|
|
@@ -47,6 +53,9 @@ Make sure you have Claude Code conversation history at `~/.claude/`. chat-logboo
|
|
|
47
53
|
**Port already in use**
|
|
48
54
|
By default, chat-logbook runs on port 3100. Use `PORT=8080 chat-log` to specify a different port.
|
|
49
55
|
|
|
56
|
+
**Updating to the latest version**
|
|
57
|
+
Run `npm install -g chat-logbook@latest` to update. If you use npx, the `@latest` tag ensures you always run the newest version.
|
|
58
|
+
|
|
50
59
|
## How It Works
|
|
51
60
|
|
|
52
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.
|
package/api/dist/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
+
import fs2 from "fs";
|
|
2
3
|
import os from "os";
|
|
3
4
|
import path2 from "path";
|
|
5
|
+
import { exec } from "child_process";
|
|
4
6
|
import { fileURLToPath } from "url";
|
|
5
7
|
|
|
6
8
|
// ../node_modules/.pnpm/@hono+node-server@1.19.11_hono@4.12.9/node_modules/@hono/node-server/dist/index.mjs
|
|
@@ -574,6 +576,9 @@ var serve = (options, listeningListener) => {
|
|
|
574
576
|
return server2;
|
|
575
577
|
};
|
|
576
578
|
|
|
579
|
+
// src/index.ts
|
|
580
|
+
import updateNotifier from "update-notifier";
|
|
581
|
+
|
|
577
582
|
// ../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/compose.js
|
|
578
583
|
var compose = (middleware, onError, onNotFound) => {
|
|
579
584
|
return (context, next) => {
|
|
@@ -2962,12 +2967,21 @@ function createApp({ claudeDir: claudeDir2, webDistDir: webDistDir2 }) {
|
|
|
2962
2967
|
|
|
2963
2968
|
// src/index.ts
|
|
2964
2969
|
var __dirname = path2.dirname(fileURLToPath(import.meta.url));
|
|
2970
|
+
var pkgPath = path2.join(__dirname, "../../package.json");
|
|
2971
|
+
var pkg = JSON.parse(fs2.readFileSync(pkgPath, "utf-8"));
|
|
2972
|
+
updateNotifier({ pkg }).notify();
|
|
2965
2973
|
var claudeDir = path2.join(os.homedir(), ".claude");
|
|
2966
2974
|
var webDistDir = path2.join(__dirname, "../../web/dist");
|
|
2967
2975
|
var app = createApp({ claudeDir, webDistDir });
|
|
2968
2976
|
var port = Number(process.env.PORT) || 3100;
|
|
2977
|
+
function openBrowser(url) {
|
|
2978
|
+
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
2979
|
+
exec(`${cmd} ${url}`);
|
|
2980
|
+
}
|
|
2969
2981
|
var server = serve({ fetch: app.fetch, port }, (info) => {
|
|
2970
|
-
|
|
2982
|
+
const url = `http://localhost:${info.port}`;
|
|
2983
|
+
console.log(`chat-logbook is running at \x1B[36m${url}\x1B[0m`);
|
|
2984
|
+
openBrowser(url);
|
|
2971
2985
|
});
|
|
2972
2986
|
server.on("error", (err) => {
|
|
2973
2987
|
if (err.code === "EADDRINUSE") {
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chat-logbook",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A local-first conversation manager for Claude Code",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20"
|
|
9
|
+
},
|
|
7
10
|
"bin": {
|
|
8
11
|
"chat-logbook": "./bin/cli.js",
|
|
9
12
|
"chat-log": "./bin/cli.js"
|
|
@@ -27,6 +30,9 @@
|
|
|
27
30
|
"msw"
|
|
28
31
|
]
|
|
29
32
|
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"update-notifier": "^7.3.1"
|
|
35
|
+
},
|
|
30
36
|
"devDependencies": {
|
|
31
37
|
"husky": "^9.1.7",
|
|
32
38
|
"lint-staged": "^16.4.0",
|