@claude-transcripts/cli 0.0.12
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 +21 -0
- package/README.md +120 -0
- package/dist/cli.js +42226 -0
- package/package.json +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 vredchenko
|
|
4
|
+
|
|
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:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# @claude-transcripts/cli
|
|
2
|
+
|
|
3
|
+
**Self-hosted history for your [Claude Code](https://claude.com/claude-code)
|
|
4
|
+
sessions** — the command-line interface.
|
|
5
|
+
|
|
6
|
+
[Claude Transcripts](https://github.com/vredchenko/claude-transcripts) records every
|
|
7
|
+
Claude Code session — events, an end-of-session summary (counts, tool usage, token
|
|
8
|
+
usage), and the full transcript — to **your own** CouchDB + S3-compatible storage. A
|
|
9
|
+
web API serves it back; a web UI, this CLI, and AI agents read it. Everything runs on
|
|
10
|
+
your own infrastructure and nothing leaves your network.
|
|
11
|
+
|
|
12
|
+
This CLI sets the whole system up, controls it, and reads the history back.
|
|
13
|
+
|
|
14
|
+
> ### ⚠️ Early — a preview, not something to depend on
|
|
15
|
+
>
|
|
16
|
+
> Breaking changes land without notice, and stored data may still have to be discarded
|
|
17
|
+
> between revisions. There is **no auth and no security model** — it assumes a single
|
|
18
|
+
> user on a single trusted machine, so don't expose it to a network or point it at
|
|
19
|
+
> anything you can't afford to lose. Issues and feedback are welcome.
|
|
20
|
+
|
|
21
|
+
## Requires Bun
|
|
22
|
+
|
|
23
|
+
This package is a [Bun](https://bun.sh)-runnable bundle and **needs `bun` on your
|
|
24
|
+
`PATH` at runtime** — it uses Bun's file, hashing, and subprocess APIs. It does not run
|
|
25
|
+
on Node.
|
|
26
|
+
|
|
27
|
+
| | |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `bunx @claude-transcripts/cli` | ✅ |
|
|
30
|
+
| `bun add -g @claude-transcripts/cli` | ✅ |
|
|
31
|
+
| `npx` / `npm i -g` | ⚠️ works only if Bun is already installed |
|
|
32
|
+
| Node | ❌ |
|
|
33
|
+
|
|
34
|
+
**If you don't have Bun, don't use this package** — use the standalone binaries below
|
|
35
|
+
instead. They embed their own runtime and need nothing installed.
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
### The easy way — no Bun, no clone
|
|
40
|
+
|
|
41
|
+
One command. It fetches the release binary for your platform, verifies its checksum,
|
|
42
|
+
and hands over to `claude-transcripts install`, which generates this instance's secrets
|
|
43
|
+
and ports, starts the backing services, provisions the stores, starts the app, sets up
|
|
44
|
+
search, and registers the hook with Claude Code:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
curl -fsSL https://raw.githubusercontent.com/vredchenko/claude-transcripts/main/install.sh | sh
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Needs **Docker** and **Claude Code**. Standalone binaries for Linux and macOS (x64 and
|
|
51
|
+
arm64), with SHA-256 sums, are attached to
|
|
52
|
+
[every release](https://github.com/vredchenko/claude-transcripts/releases/latest) if
|
|
53
|
+
you'd rather fetch one yourself.
|
|
54
|
+
|
|
55
|
+
### With Bun
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bunx @claude-transcripts/cli install # one-off
|
|
59
|
+
bun add -g @claude-transcripts/cli # or install it globally
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Quick start
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
claude-transcripts install # set up stores, app, and the Claude Code hook
|
|
66
|
+
claude-transcripts doctor # smoke-test write → read → search, end to end
|
|
67
|
+
claude-transcripts sessions # what's been recorded
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The web UI is at `http://127.0.0.1:<WEBAPI_PORT>/app` — `install` prints the address,
|
|
71
|
+
and picks a free port block per instance rather than assuming one. Re-running `install`
|
|
72
|
+
upgrades in place: it's idempotent and keeps your history.
|
|
73
|
+
|
|
74
|
+
## Commands
|
|
75
|
+
|
|
76
|
+
| Command | What it does |
|
|
77
|
+
|---|---|
|
|
78
|
+
| `install` | Set up everything: stores, app, and the Claude Code hook |
|
|
79
|
+
| `uninstall` | Remove the instance (history is kept unless `--purge`) |
|
|
80
|
+
| `stack <up\|down\|restart\|logs\|ps>` | Control the container stack |
|
|
81
|
+
| `provision` | Create the CouchDB databases and the S3 bucket + key |
|
|
82
|
+
| `hook <run\|install\|uninstall\|status>` | The Claude Code hook, and its registration |
|
|
83
|
+
| `sessions [id]` | List sessions, or show one in detail |
|
|
84
|
+
| `setup` | Register the hook + generate runtime config |
|
|
85
|
+
| `export <dir>` | Export session data to a portable bundle |
|
|
86
|
+
| `import <dir>` | Restore session data from a portable bundle |
|
|
87
|
+
| `backfill` | Adopt on-disk `~/.claude` transcripts as first-class history |
|
|
88
|
+
| `migrate <up\|down\|status>` | Run CouchDB migrations |
|
|
89
|
+
| `reindex` | Rebuild the search indexes from CouchDB |
|
|
90
|
+
| `doctor` | Smoke-test the write/read/search path end to end |
|
|
91
|
+
|
|
92
|
+
Run `claude-transcripts` with no arguments for the full help, including every flag.
|
|
93
|
+
Full reference:
|
|
94
|
+
[docs/reference/cli.md](https://github.com/vredchenko/claude-transcripts/blob/main/docs/reference/cli.md).
|
|
95
|
+
|
|
96
|
+
## This is a CLI, not a library
|
|
97
|
+
|
|
98
|
+
The package exposes a `bin` and nothing else — there's no `main`, no `exports`, and no
|
|
99
|
+
type declarations, so it can't be imported. That's deliberate: the supported
|
|
100
|
+
programmatic interface is the **web API**, whose OpenAPI spec is the contract clients
|
|
101
|
+
are generated from. See
|
|
102
|
+
[docs/reference/webapi.md](https://github.com/vredchenko/claude-transcripts/blob/main/docs/reference/webapi.md).
|
|
103
|
+
|
|
104
|
+
## Links
|
|
105
|
+
|
|
106
|
+
- **Project site** — https://vredchenko.github.io/claude-transcripts/
|
|
107
|
+
- **Source** — https://github.com/vredchenko/claude-transcripts
|
|
108
|
+
- **Installation guide** —
|
|
109
|
+
[docs/start/installation.md](https://github.com/vredchenko/claude-transcripts/blob/main/docs/start/installation.md)
|
|
110
|
+
- **Changelog** —
|
|
111
|
+
[CHANGELOG.md](https://github.com/vredchenko/claude-transcripts/blob/main/CHANGELOG.md)
|
|
112
|
+
- **Issues** — https://github.com/vredchenko/claude-transcripts/issues
|
|
113
|
+
|
|
114
|
+
Every component is lockstep-versioned: one `vMAJOR.MINOR.PATCH` release versions the
|
|
115
|
+
hook, web API, web UI, and CLI as a set — so this package's version is also the version
|
|
116
|
+
of the instance it expects to talk to.
|
|
117
|
+
|
|
118
|
+
## License
|
|
119
|
+
|
|
120
|
+
MIT © vredchenko
|