claude-roi 0.8.3 → 0.8.5
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 +18 -16
- package/package.json +1 -1
- package/src/index.js +2 -2
package/README.md
CHANGED
|
@@ -12,29 +12,31 @@ Codelens AI ties Claude Code token usage to actual git output. It reads your loc
|
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
|
+
> **Previously published as `claude-roi`.** That package is deprecated — use `npx codelens-ai` going forward. The `claude-roi` command still works as a backward-compatible alias.
|
|
16
|
+
|
|
15
17
|
### Option 1: Run directly (no install)
|
|
16
18
|
|
|
17
19
|
```bash
|
|
18
|
-
npx
|
|
20
|
+
npx codelens-ai
|
|
19
21
|
```
|
|
20
22
|
|
|
21
23
|
### Option 2: Install globally
|
|
22
24
|
|
|
23
25
|
```bash
|
|
24
26
|
# npm
|
|
25
|
-
npm install -g
|
|
27
|
+
npm install -g codelens-ai
|
|
26
28
|
|
|
27
29
|
# pnpm
|
|
28
|
-
pnpm add -g
|
|
30
|
+
pnpm add -g codelens-ai
|
|
29
31
|
|
|
30
32
|
# yarn
|
|
31
|
-
yarn global add
|
|
33
|
+
yarn global add codelens-ai
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
Then run anywhere:
|
|
35
37
|
|
|
36
38
|
```bash
|
|
37
|
-
|
|
39
|
+
codelens-ai
|
|
38
40
|
```
|
|
39
41
|
|
|
40
42
|
### Option 3: Clone and run from source
|
|
@@ -63,7 +65,7 @@ node src/index.js
|
|
|
63
65
|
## Quick Start
|
|
64
66
|
|
|
65
67
|
```bash
|
|
66
|
-
npx
|
|
68
|
+
npx codelens-ai
|
|
67
69
|
```
|
|
68
70
|
|
|
69
71
|
This parses your `~/.claude/projects/` session data, analyzes your git repos, and opens a dashboard at `http://localhost:3457`.
|
|
@@ -88,14 +90,14 @@ This parses your `~/.claude/projects/` session data, analyzes your git repos, an
|
|
|
88
90
|
## CLI Options
|
|
89
91
|
|
|
90
92
|
```bash
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
codelens-ai # default: last 30 days, port 3457
|
|
94
|
+
codelens-ai --days 90 # look back 90 days
|
|
95
|
+
codelens-ai --port 8080 # custom port
|
|
96
|
+
codelens-ai --no-open # don't auto-open browser
|
|
97
|
+
codelens-ai --json # dump all metrics as JSON to stdout
|
|
98
|
+
codelens-ai --project techops # filter to a specific project
|
|
99
|
+
codelens-ai --refresh # force full re-parse (ignore cache)
|
|
100
|
+
codelens-ai --autonomy # print autonomy score to terminal and exit
|
|
99
101
|
```
|
|
100
102
|
|
|
101
103
|
## Dashboard
|
|
@@ -121,7 +123,7 @@ The dashboard includes:
|
|
|
121
123
|
|
|
122
124
|
### Caching
|
|
123
125
|
|
|
124
|
-
Parsed session data is cached at `~/.cache/
|
|
126
|
+
Parsed session data is cached at `~/.cache/agent-analytics/parsed-sessions.json`. On subsequent runs, only new or modified JSONL files are re-parsed, making startup near-instant. Use `--refresh` to force a full re-parse.
|
|
125
127
|
|
|
126
128
|
### Cost Calculation
|
|
127
129
|
|
|
@@ -170,7 +172,7 @@ git push --follow-tags
|
|
|
170
172
|
|
|
171
173
|
This automatically publishes to npm and creates a GitHub Release with auto-generated notes.
|
|
172
174
|
|
|
173
|
-
**Setup (one-time):** Configure [trusted publishing](https://docs.npmjs.com/trusted-publishers/) on npm for the `
|
|
175
|
+
**Setup (one-time):** Configure [trusted publishing](https://docs.npmjs.com/trusted-publishers/) on npm for the `codelens-ai` package, linking it to the GitHub Actions workflow. No tokens or secrets needed.
|
|
174
176
|
|
|
175
177
|
## Contributing
|
|
176
178
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -99,7 +99,7 @@ async function main() {
|
|
|
99
99
|
const days = parseInt(opts.days, 10);
|
|
100
100
|
|
|
101
101
|
const invokedAs = path.basename(process.argv[1]);
|
|
102
|
-
if (invokedAs
|
|
102
|
+
if (invokedAs.includes('claude-roi')) {
|
|
103
103
|
console.log(`\x1b[33m⚠ claude-roi has been renamed to codelens-ai\x1b[0m`);
|
|
104
104
|
console.log(` Switch to: \x1b[36mnpx codelens-ai\x1b[0m`);
|
|
105
105
|
console.log('');
|
|
@@ -109,7 +109,7 @@ async function main() {
|
|
|
109
109
|
const claudeDir = path.join(os.homedir(), '.claude', 'projects');
|
|
110
110
|
|
|
111
111
|
const payload = await buildPayload(claudeDir, days, opts.project, opts.refresh);
|
|
112
|
-
if (payload) payload.meta.invokedAs = invokedAs;
|
|
112
|
+
if (payload) payload.meta.invokedAs = invokedAs.includes('claude-roi') ? 'claude-roi' : 'codelens-ai';
|
|
113
113
|
|
|
114
114
|
if (!payload) {
|
|
115
115
|
console.log('\x1b[33mNo Claude Code sessions found.\x1b[0m');
|