agentrace 0.0.1 → 0.0.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 +132 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# AgenTrace CLI
|
|
2
|
+
|
|
3
|
+
A CLI tool to send Claude Code sessions to the AgenTrace server.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
AgenTrace is a self-hosted service that enables teams to review Claude Code conversations. Since Claude Code logs contain source code and environment information, AgenTrace is designed to run on your local machine or internal network rather than on the public internet.
|
|
8
|
+
|
|
9
|
+
This CLI uses Claude Code's hooks feature to automatically send session data to your AgenTrace server.
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
### 1. Start the Server
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Using Docker (recommended)
|
|
17
|
+
docker run -d --name agentrace -p 9080:9080 -v $(pwd)/data:/data satetsu888/agentrace:latest
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Docker Hub: <https://hub.docker.com/r/satetsu888/agentrace>
|
|
21
|
+
|
|
22
|
+
### 2. Initialize the CLI
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx agentrace init --url http://localhost:9080
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
A browser window will open displaying the registration/login page. After registration, hooks are automatically configured.
|
|
29
|
+
|
|
30
|
+
That's it! When you use Claude Code, sessions will be automatically sent to AgenTrace.
|
|
31
|
+
|
|
32
|
+
## Commands
|
|
33
|
+
|
|
34
|
+
| Command | Description |
|
|
35
|
+
| ---------------------------- | -------------------------------------- |
|
|
36
|
+
| `agentrace init --url <url>` | Initial setup + hooks installation |
|
|
37
|
+
| `agentrace login` | Open the web dashboard |
|
|
38
|
+
| `agentrace send` | Send transcript diff (used by hooks) |
|
|
39
|
+
| `agentrace on` | Enable hooks |
|
|
40
|
+
| `agentrace off` | Disable hooks |
|
|
41
|
+
| `agentrace uninstall` | Remove hooks and configuration |
|
|
42
|
+
|
|
43
|
+
## Command Details
|
|
44
|
+
|
|
45
|
+
### init
|
|
46
|
+
|
|
47
|
+
Sets up the server connection and installs Claude Code hooks.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx agentrace init --url http://localhost:9080
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Process flow:**
|
|
54
|
+
|
|
55
|
+
1. Opens the server's registration/login page in browser
|
|
56
|
+
2. After registration, API key is automatically retrieved
|
|
57
|
+
3. Claude Code hooks are configured
|
|
58
|
+
|
|
59
|
+
### login
|
|
60
|
+
|
|
61
|
+
Issues a login URL for the web dashboard and opens it in browser.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npx agentrace login
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### on / off
|
|
68
|
+
|
|
69
|
+
Toggle hooks enabled/disabled. Configuration is preserved.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Temporarily stop sending
|
|
73
|
+
npx agentrace off
|
|
74
|
+
|
|
75
|
+
# Resume sending
|
|
76
|
+
npx agentrace on
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### uninstall
|
|
80
|
+
|
|
81
|
+
Completely removes hooks and configuration files.
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npx agentrace uninstall
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### send
|
|
88
|
+
|
|
89
|
+
This command is automatically called by Claude Code's Stop hook. You normally don't need to run it manually.
|
|
90
|
+
|
|
91
|
+
## Configuration Files
|
|
92
|
+
|
|
93
|
+
Configuration is stored in the following locations:
|
|
94
|
+
|
|
95
|
+
| File | Location |
|
|
96
|
+
| -------------------- | --------------------------------- |
|
|
97
|
+
| AgenTrace config | `~/.config/agentrace/config.json` |
|
|
98
|
+
| Cursor data | `~/.config/agentrace/cursors/` |
|
|
99
|
+
| Claude Code hooks | `~/.claude/settings.json` |
|
|
100
|
+
|
|
101
|
+
## How It Works
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
┌─────────────────┐
|
|
105
|
+
│ Claude Code │
|
|
106
|
+
│ (Stop hook) │
|
|
107
|
+
└────────┬────────┘
|
|
108
|
+
│ npx agentrace send
|
|
109
|
+
↓
|
|
110
|
+
┌─────────────────┐
|
|
111
|
+
│ AgenTrace CLI │
|
|
112
|
+
│ Extract & Send │
|
|
113
|
+
└────────┬────────┘
|
|
114
|
+
│ POST /api/ingest
|
|
115
|
+
↓
|
|
116
|
+
┌─────────────────┐
|
|
117
|
+
│ AgenTrace Server│
|
|
118
|
+
│ Save to DB │
|
|
119
|
+
└─────────────────┘
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
- Only the transcript diff is sent to the server when a Claude Code conversation ends
|
|
123
|
+
- Errors do not block Claude Code's operation by design
|
|
124
|
+
|
|
125
|
+
## Requirements
|
|
126
|
+
|
|
127
|
+
- Node.js 18 or later
|
|
128
|
+
- Claude Code installed
|
|
129
|
+
|
|
130
|
+
## License
|
|
131
|
+
|
|
132
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentrace",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "CLI for
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "CLI for AgenTrace - Claude Code session tracker",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"agentrace": "./dist/index.js"
|