@cookielab.io/klovi 2.0.0 → 3.0.0-beta.17
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 +55 -146
- package/dist/cli.js +2861 -0
- package/dist/server.js +2346 -1820
- package/dist/web/index-6620fj3p.js +301 -0
- package/dist/web/index-q7qn6we4.css +1 -0
- package/dist/web/index.html +13 -0
- package/package.json +22 -58
- package/dist/public/apple-touch-icon-n3tc3d5w.png +0 -0
- package/dist/public/favicon-ntgw22d7.ico +0 -0
- package/dist/public/index-cq4jk40s.css +0 -1743
- package/dist/public/index-g1psfqj1.js +0 -56318
- package/dist/public/index.html +0 -23
- /package/dist/{public → web}/favicon-39pjvakn.svg +0 -0
package/README.md
CHANGED
|
@@ -1,164 +1,73 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @cookielab.io/klovi
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/@cookielab.io/klovi)
|
|
5
|
-
[](https://www.npmjs.com/package/@cookielab.io/klovi)
|
|
6
|
-
[](LICENSE.md)
|
|
3
|
+
Browse and present AI coding session history. Supports Claude Code, Codex (CLI & app), and OpenCode.
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-

|
|
11
|
-

|
|
5
|
+
## Quick Start
|
|
12
6
|
|
|
13
|
-
|
|
7
|
+
```bash
|
|
8
|
+
# Run with Node.js
|
|
9
|
+
npx @cookielab.io/klovi
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
# Run with Bun
|
|
12
|
+
bunx @cookielab.io/klovi
|
|
13
|
+
```
|
|
16
14
|
|
|
17
|
-
Klovi
|
|
15
|
+
Klovi starts a local server on `http://127.0.0.1:3583` and opens your browser. All data stays on your machine — sessions are read directly from each tool's local storage.
|
|
18
16
|
|
|
19
|
-
##
|
|
17
|
+
## CLI Options
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
```
|
|
20
|
+
klovi [options]
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
yarn dlx @cookielab.io/klovi@latest
|
|
27
|
-
pnpm dlx @cookielab.io/klovi@latest
|
|
22
|
+
Options:
|
|
23
|
+
--port NUMBER Override the default port (default: 3583)
|
|
24
|
+
--no-browser Start the server without opening a browser
|
|
28
25
|
```
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
## Environment Variables
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
| Variable | Default | Description |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| `KLOVI_PORT` | `3583` | Server port |
|
|
32
|
+
| `KLOVI_HOST` | `127.0.0.1` | Bind address (localhost-only by default) |
|
|
33
|
+
| `KLOVI_STATIC_DIR` | (auto) | Override the static assets directory |
|
|
34
|
+
| `KLOVI_SETTINGS_PATH` | `~/.klovi/settings.json` | Override the settings file used by the CLI |
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
## Programmatic API
|
|
38
37
|
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
klovi
|
|
42
|
-
```
|
|
38
|
+
```ts
|
|
39
|
+
import { startKloviServer } from "@cookielab.io/klovi/server";
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
const server = await startKloviServer({
|
|
42
|
+
host: "127.0.0.1",
|
|
43
|
+
port: 3583,
|
|
44
|
+
});
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
console.log(`Klovi listening on ${server.url}`);
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
bun run dev
|
|
48
|
+
// Later:
|
|
49
|
+
server.stop();
|
|
51
50
|
```
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- Collapsible tool calls with smart summaries (file paths for Read/Write/Edit, commands for Bash, patterns for Grep/Glob)
|
|
76
|
-
- Collapsible thinking/reasoning blocks
|
|
77
|
-
- Token usage display (input/output/cache tokens per assistant message)
|
|
78
|
-
- Timestamps on messages (relative time format)
|
|
79
|
-
- Tool result images rendered as clickable thumbnails with fullscreen lightbox
|
|
80
|
-
- File references (`@filepath.ext`) highlighted as green badges
|
|
81
|
-
- Image attachments displayed as media-type badges
|
|
82
|
-
- Slash commands shown with green `> /command` badge
|
|
83
|
-
|
|
84
|
-
**Presentation Mode**
|
|
85
|
-
- Step-through navigation: each conversation turn is a step, assistant turns have sub-steps (each text block is a step, consecutive non-text blocks like thinking and tool calls are grouped together)
|
|
86
|
-
- Keyboard controls: Arrow keys / Space to advance, Escape to exit, F for fullscreen
|
|
87
|
-
- Progress bar with step counter at the bottom
|
|
88
|
-
- Sidebar hidden, content full-width with larger font
|
|
89
|
-
- Fade-in animation for each revealed step
|
|
90
|
-
|
|
91
|
-
**Theme & Display**
|
|
92
|
-
- Light and dark themes (toggle in header, persisted to localStorage)
|
|
93
|
-
- System theme auto-detection
|
|
94
|
-
- Font size control (+/- buttons) for projector readability
|
|
95
|
-
|
|
96
|
-
**CLI**
|
|
97
|
-
- `--port <number>` — specify server port (default: 3583)
|
|
98
|
-
- `--claude-code-dir <path>` — path to Claude Code data directory (default: `~/.claude`)
|
|
99
|
-
- `--codex-cli-dir <path>` — path to Codex CLI data directory (default: `~/.codex`)
|
|
100
|
-
- `--opencode-dir <path>` — path to OpenCode data directory (default: `~/.local/share/opencode`)
|
|
101
|
-
- `--accept-risks` — skip the startup security warning
|
|
102
|
-
- `--help` / `-h` — show usage information
|
|
103
|
-
|
|
104
|
-
## Scripts
|
|
105
|
-
|
|
106
|
-
| Script | Description |
|
|
107
|
-
|---|---|
|
|
108
|
-
| `bun run dev` | Build frontend + start dev server with watch (port 3583) |
|
|
109
|
-
| `bun run start` | Start production server (`node dist/server.js`) |
|
|
110
|
-
| `bun run build` | Build frontend + server for production |
|
|
111
|
-
| `bun run build:frontend` | Bundle frontend into `dist/public/` |
|
|
112
|
-
| `bun run build:server` | Bundle server into `dist/server.js` (Node.js target) |
|
|
113
|
-
| `bun run build:compile` | Compile standalone binaries for multiple platforms |
|
|
114
|
-
| `bun test` | Run all tests |
|
|
115
|
-
| `bun run typecheck` | TypeScript type checking (`tsc --noEmit`) |
|
|
116
|
-
| `bun run lint` | Lint with Biome |
|
|
117
|
-
| `bun run format` | Format with Biome |
|
|
118
|
-
| `bun run check` | Biome check (lint + format, no write) |
|
|
119
|
-
| `bun run check:fix` | Biome check + auto-fix |
|
|
120
|
-
|
|
121
|
-
## API
|
|
122
|
-
|
|
123
|
-
| Endpoint | Description |
|
|
124
|
-
|---|---|
|
|
125
|
-
| `GET /api/version` | Server version information |
|
|
126
|
-
| `GET /api/stats` | Aggregate dashboard statistics (projects, sessions, tokens, models) |
|
|
127
|
-
| `GET /api/projects` | List all discovered projects |
|
|
128
|
-
| `GET /api/projects/:encodedPath/sessions` | List sessions for a project |
|
|
129
|
-
| `GET /api/sessions/:id?project=:encodedPath` | Full parsed session with turns |
|
|
130
|
-
| `GET /api/sessions/:id/subagents/:agentId?project=:encodedPath` | Sub-agent session data |
|
|
131
|
-
|
|
132
|
-
## Tech Stack
|
|
133
|
-
|
|
134
|
-
- [Bun](https://bun.sh) - runtime, bundler, test runner; [Node.js](https://nodejs.org) - production HTTP server
|
|
135
|
-
- React 19 + TypeScript (strict mode)
|
|
136
|
-
- react-markdown + remark-gfm
|
|
137
|
-
- react-syntax-highlighter (Prism, oneDark theme)
|
|
138
|
-
- CSS custom properties for theming (no CSS framework)
|
|
139
|
-
- Biome for linting and formatting
|
|
140
|
-
- happy-dom + @testing-library/react for tests
|
|
141
|
-
|
|
142
|
-
## Documentation
|
|
143
|
-
|
|
144
|
-
See [docs/](docs/) for detailed documentation:
|
|
145
|
-
|
|
146
|
-
- [Architecture](docs/architecture.md) - project structure, data flow, component hierarchy
|
|
147
|
-
- [JSONL Format](docs/jsonl-format.md) - session file format specification
|
|
148
|
-
- [Components](docs/components.md) - frontend component guide and patterns
|
|
149
|
-
- [Testing](docs/testing.md) - test setup, patterns, and conventions
|
|
150
|
-
- [Content Types](CONTENT_TYPES.md) - catalog of all JSONL content types and rendering status
|
|
151
|
-
|
|
152
|
-
## Contributing
|
|
153
|
-
|
|
154
|
-
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
|
|
155
|
-
|
|
156
|
-
Please note that this project follows a [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
157
|
-
|
|
158
|
-
## Built With
|
|
159
|
-
|
|
160
|
-
This project was built with love using [Claude Code](https://claude.ai/claude-code).
|
|
161
|
-
|
|
162
|
-
## Trademark Notice
|
|
163
|
-
|
|
164
|
-
"Claude" and "Claude Code" are trademarks of Anthropic, PBC. "Codex" is a trademark of OpenAI. This project is not affiliated with, endorsed by, or sponsored by Anthropic, OpenAI, or any other AI tool vendor. All trademarks and registered trademarks are the property of their respective owners.
|
|
52
|
+
### `startKloviServer(options?)`
|
|
53
|
+
|
|
54
|
+
Starts the Klovi backend server. Returns `{ url, stop() }`.
|
|
55
|
+
|
|
56
|
+
| Option | Type | Default | Description |
|
|
57
|
+
|---|---|---|---|
|
|
58
|
+
| `host` | `string` | `"127.0.0.1"` | Bind address |
|
|
59
|
+
| `port` | `number` | `0` (auto) | Server port |
|
|
60
|
+
| `version` | `string` | `"dev"` | Version string |
|
|
61
|
+
| `commit` | `string` | `""` | Commit hash |
|
|
62
|
+
| `settingsPath` | `string` | `~/.klovi/settings.json` | Settings file path |
|
|
63
|
+
| `runtime` | `"auto" \| "bun" \| "node"` | `"auto"` | Runtime selection |
|
|
64
|
+
|
|
65
|
+
## Supported Tools
|
|
66
|
+
|
|
67
|
+
- **Claude Code** — reads from `~/.claude/projects/`
|
|
68
|
+
- **Codex** (CLI & app) — reads from `~/.codex/sessions/`
|
|
69
|
+
- **OpenCode** — reads from `~/.local/share/opencode/opencode.db`
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
MIT
|