@swestash/agent-lens 0.1.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 +21 -0
- package/README.md +67 -0
- package/dist/agent-lens.js +3572 -0
- package/dist/agent-lens.js.map +1 -0
- package/package.json +64 -0
- package/web/apple-touch-icon.png +0 -0
- package/web/assets/Dashboard-CPjOOCyK.js +69 -0
- package/web/assets/SessionView-iEtAsqjR.js +2 -0
- package/web/assets/SkillView-C6vlyg0Z.js +1 -0
- package/web/assets/SkillsView-B2W0OtAw.js +1 -0
- package/web/assets/WorkflowView-D5N-tAZr.js +1 -0
- package/web/assets/index-B0Y86jYR.css +1 -0
- package/web/assets/index-DaWyEmDk.js +68 -0
- package/web/assets/index-RKLKBrv5.js +29 -0
- package/web/assets/logo-Cd7Wsq5o.png +0 -0
- package/web/favicon-16.png +0 -0
- package/web/favicon-32.png +0 -0
- package/web/index.html +25 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SWEStash
|
|
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,67 @@
|
|
|
1
|
+
# Agent Lens
|
|
2
|
+
|
|
3
|
+
> Passively collect, browse, and analyze your Claude Code CLI session traces — **100% local**.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@swestash/agent-lens)
|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
Claude Code records rich per-session telemetry under `~/.claude/`, but prunes it on a rolling
|
|
11
|
+
**30-day window**. Agent Lens continuously copies that data out before it's lost, normalizes it into
|
|
12
|
+
a queryable SQLite store, and gives you a browsable transcript viewer plus analytics dashboards —
|
|
13
|
+
**without a single byte leaving your machine**.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g @swestash/agent-lens # or run ad-hoc: npx @swestash/agent-lens <command>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The installed command is **`agent-lens`** (the package is published under the `@swestash` scope).
|
|
22
|
+
Requires **Node.js ≥ 24**. The only native dependency, `better-sqlite3`, installs a prebuilt binary
|
|
23
|
+
for Node 24 across Linux (glibc + musl), macOS, and Windows; if no prebuild matches your platform it
|
|
24
|
+
is compiled from source (needs a C++ toolchain).
|
|
25
|
+
|
|
26
|
+
## Quick start
|
|
27
|
+
|
|
28
|
+
Agent Lens runs a three-stage local pipeline — `collect → ingest → serve`:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Configure which accounts to collect (defaults to one: ~/.claude).
|
|
32
|
+
# → agent-lens.config.json next to your data dir, or set AGENT_LENS_CONFIG
|
|
33
|
+
|
|
34
|
+
agent-lens collect --then-ingest # Stages 1–2: mirror transcripts to the archive, build the DB
|
|
35
|
+
agent-lens serve # Stage 3: browse → http://127.0.0.1:4477
|
|
36
|
+
|
|
37
|
+
# Make it permanent — install as OS services (survives reboot):
|
|
38
|
+
agent-lens service install # periodic collect+ingest AND the always-on UI
|
|
39
|
+
# ...or keep it fresh in the foreground instead:
|
|
40
|
+
agent-lens watch # a resident process that collects+ingests on file change
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Commands
|
|
44
|
+
|
|
45
|
+
| Command | What it does |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `agent-lens collect [--then-ingest]` | Mirror each configured account's transcripts into the local archive (never deletes, never copies secrets). |
|
|
48
|
+
| `agent-lens ingest` | Normalize the archive into the SQLite store. |
|
|
49
|
+
| `agent-lens serve` | Serve the web UI + read-only API at `http://127.0.0.1:4477`. |
|
|
50
|
+
| `agent-lens watch` | Foreground resident: collect + ingest on file change. |
|
|
51
|
+
| `agent-lens metrics` | Print store metrics to the terminal. |
|
|
52
|
+
| `agent-lens service <install\|uninstall\|status> [collector\|server\|all]` | Install/manage OS services (systemd / launchd / Windows Task Scheduler). |
|
|
53
|
+
|
|
54
|
+
## Privacy
|
|
55
|
+
|
|
56
|
+
Everything stays on your machine — no telemetry, no network calls, no accounts. The collector copies
|
|
57
|
+
transcript files only and skips anything that looks like a credential. See the
|
|
58
|
+
[privacy posture](https://github.com/SWEStash/agent-lens#privacy) for details.
|
|
59
|
+
|
|
60
|
+
## Documentation
|
|
61
|
+
|
|
62
|
+
Full docs, configuration reference, screenshots, architecture decisions, and the read-only demo live
|
|
63
|
+
in the repository: **https://github.com/SWEStash/agent-lens**
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
[MIT](https://github.com/SWEStash/agent-lens/blob/main/LICENSE) © SWEStash
|