claude-roi 0.8.2 → 0.8.4
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/.agents/skills/frontend-design/LICENSE.txt +177 -0
- package/.agents/skills/frontend-design/SKILL.md +42 -0
- package/CLAUDE.md +11 -10
- package/package.json +6 -2
- package/src/dashboard.html +216 -0
- package/src/index.js +11 -4
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
|
|
8
|
+
|
|
9
|
+
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
|
|
10
|
+
|
|
11
|
+
## Design Thinking
|
|
12
|
+
|
|
13
|
+
Before coding, understand the context and commit to a BOLD aesthetic direction:
|
|
14
|
+
- **Purpose**: What problem does this interface solve? Who uses it?
|
|
15
|
+
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
|
|
16
|
+
- **Constraints**: Technical requirements (framework, performance, accessibility).
|
|
17
|
+
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
|
|
18
|
+
|
|
19
|
+
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
|
|
20
|
+
|
|
21
|
+
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
|
|
22
|
+
- Production-grade and functional
|
|
23
|
+
- Visually striking and memorable
|
|
24
|
+
- Cohesive with a clear aesthetic point-of-view
|
|
25
|
+
- Meticulously refined in every detail
|
|
26
|
+
|
|
27
|
+
## Frontend Aesthetics Guidelines
|
|
28
|
+
|
|
29
|
+
Focus on:
|
|
30
|
+
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
|
|
31
|
+
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
|
|
32
|
+
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
|
|
33
|
+
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
|
|
34
|
+
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
|
|
35
|
+
|
|
36
|
+
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
|
|
37
|
+
|
|
38
|
+
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
|
|
39
|
+
|
|
40
|
+
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
|
|
41
|
+
|
|
42
|
+
Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
|
package/CLAUDE.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Project Overview
|
|
4
4
|
|
|
5
|
-
**Codelens AI** (`
|
|
5
|
+
**Codelens AI** (`codelens-ai` on npm) is a CLI tool that measures ROI from AI coding agents by correlating Claude Code token usage with git commit output. It parses Claude Code session files, analyzes git history, and serves an interactive dashboard at `http://localhost:3457`.
|
|
6
6
|
|
|
7
|
-
**Version:** 0.
|
|
7
|
+
**Version:** 0.8.2
|
|
8
8
|
**License:** MIT
|
|
9
|
-
**npm package:** `claude-roi`
|
|
9
|
+
**npm package:** `codelens-ai` (alias: `claude-roi`)
|
|
10
10
|
|
|
11
11
|
## Tech Stack
|
|
12
12
|
|
|
@@ -63,13 +63,14 @@ Claude Sessions (JSONL) → claude-parser.js → [Cache] → git-analyzer.js
|
|
|
63
63
|
## CLI Usage
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
npx
|
|
67
|
-
npx
|
|
68
|
-
npx
|
|
69
|
-
npx
|
|
70
|
-
npx
|
|
71
|
-
npx
|
|
72
|
-
npx
|
|
66
|
+
npx codelens-ai # defaults: 30 days, port 3457
|
|
67
|
+
npx codelens-ai --days 90 # custom lookback
|
|
68
|
+
npx codelens-ai --port 8080 # custom port
|
|
69
|
+
npx codelens-ai --no-open # don't auto-open browser
|
|
70
|
+
npx codelens-ai --json # dump raw JSON to stdout
|
|
71
|
+
npx codelens-ai --project X # filter by project name
|
|
72
|
+
npx codelens-ai --refresh # force full re-parse
|
|
73
|
+
npx claude-roi # backward-compatible alias
|
|
73
74
|
```
|
|
74
75
|
|
|
75
76
|
## Development Commands
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-roi",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "Correlate
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"description": "Correlate AI coding agent token usage with git output to measure ROI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
+
"codelens-ai": "src/index.js",
|
|
7
8
|
"claude-roi": "src/index.js"
|
|
8
9
|
},
|
|
9
10
|
"main": "./src/index.js",
|
|
@@ -13,7 +14,10 @@
|
|
|
13
14
|
"test": "npx playwright test"
|
|
14
15
|
},
|
|
15
16
|
"keywords": [
|
|
17
|
+
"codelens",
|
|
16
18
|
"claude",
|
|
19
|
+
"codex",
|
|
20
|
+
"cursor",
|
|
17
21
|
"ai",
|
|
18
22
|
"roi",
|
|
19
23
|
"productivity",
|
package/src/dashboard.html
CHANGED
|
@@ -1860,6 +1860,203 @@
|
|
|
1860
1860
|
</div>
|
|
1861
1861
|
</header>
|
|
1862
1862
|
|
|
1863
|
+
<style>
|
|
1864
|
+
@keyframes dep-in {
|
|
1865
|
+
0% { opacity: 0; transform: translateX(32px) scale(0.96); }
|
|
1866
|
+
60% { opacity: 1; transform: translateX(-4px) scale(1.01); }
|
|
1867
|
+
100% { opacity: 1; transform: translateX(0) scale(1); }
|
|
1868
|
+
}
|
|
1869
|
+
@keyframes dep-out {
|
|
1870
|
+
0% { opacity: 1; transform: translateX(0) scale(1); }
|
|
1871
|
+
100% { opacity: 0; transform: translateX(32px) scale(0.96); }
|
|
1872
|
+
}
|
|
1873
|
+
@keyframes dep-pulse {
|
|
1874
|
+
0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.25), 0 16px 48px rgba(0,0,0,0.5); }
|
|
1875
|
+
50% { box-shadow: 0 0 0 6px rgba(245,158,11,0), 0 16px 48px rgba(0,0,0,0.5); }
|
|
1876
|
+
}
|
|
1877
|
+
@keyframes dep-scan {
|
|
1878
|
+
0% { transform: translateY(-100%); }
|
|
1879
|
+
100% { transform: translateY(400%); }
|
|
1880
|
+
}
|
|
1881
|
+
#deprecation-banner {
|
|
1882
|
+
display: none;
|
|
1883
|
+
position: fixed;
|
|
1884
|
+
bottom: 28px;
|
|
1885
|
+
right: 28px;
|
|
1886
|
+
z-index: 9999;
|
|
1887
|
+
width: 280px;
|
|
1888
|
+
max-width: calc(100vw - 40px);
|
|
1889
|
+
background: linear-gradient(160deg, var(--glass-bg-from) 0%, var(--glass-bg-to) 100%);
|
|
1890
|
+
border: 1px solid rgba(245,158,11,0.45);
|
|
1891
|
+
border-radius: 12px;
|
|
1892
|
+
overflow: hidden;
|
|
1893
|
+
font-family: var(--font-body);
|
|
1894
|
+
backdrop-filter: blur(20px) saturate(1.4);
|
|
1895
|
+
-webkit-backdrop-filter: blur(20px) saturate(1.4);
|
|
1896
|
+
}
|
|
1897
|
+
#deprecation-banner.visible {
|
|
1898
|
+
animation: dep-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards,
|
|
1899
|
+
dep-pulse 2.4s ease-in-out 0.5s infinite;
|
|
1900
|
+
}
|
|
1901
|
+
#deprecation-banner.hiding {
|
|
1902
|
+
animation: dep-out 0.22s ease-in forwards;
|
|
1903
|
+
}
|
|
1904
|
+
/* Light theme overrides */
|
|
1905
|
+
[data-theme="light"] #deprecation-banner {
|
|
1906
|
+
background: linear-gradient(160deg, rgba(255,252,245,0.97) 0%, rgba(255,248,230,0.95) 100%);
|
|
1907
|
+
box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px rgba(245,158,11,0.15);
|
|
1908
|
+
}
|
|
1909
|
+
[data-theme="light"] #dep-message { color: #475569; }
|
|
1910
|
+
[data-theme="light"] #dep-message strong { color: #0f172a; }
|
|
1911
|
+
[data-theme="light"] #dep-cmd-row {
|
|
1912
|
+
background: rgba(6,182,212,0.06);
|
|
1913
|
+
border-color: rgba(6,182,212,0.3);
|
|
1914
|
+
}
|
|
1915
|
+
[data-theme="light"] #dep-copy {
|
|
1916
|
+
background: rgba(6,182,212,0.1);
|
|
1917
|
+
border-color: rgba(6,182,212,0.25);
|
|
1918
|
+
color: #475569;
|
|
1919
|
+
}
|
|
1920
|
+
[data-theme="light"] #dep-copy:hover { background: rgba(6,182,212,0.2); color: #0891b2; }
|
|
1921
|
+
#dep-scanline {
|
|
1922
|
+
position: absolute;
|
|
1923
|
+
inset: 0;
|
|
1924
|
+
pointer-events: none;
|
|
1925
|
+
overflow: hidden;
|
|
1926
|
+
border-radius: 12px;
|
|
1927
|
+
z-index: 0;
|
|
1928
|
+
}
|
|
1929
|
+
#dep-scanline::after {
|
|
1930
|
+
content: '';
|
|
1931
|
+
position: absolute;
|
|
1932
|
+
left: 0; right: 0;
|
|
1933
|
+
height: 40%;
|
|
1934
|
+
background: linear-gradient(to bottom, transparent, rgba(245,158,11,0.04), transparent);
|
|
1935
|
+
animation: dep-scan 3.5s linear infinite;
|
|
1936
|
+
}
|
|
1937
|
+
#dep-top-bar {
|
|
1938
|
+
height: 3px;
|
|
1939
|
+
background: linear-gradient(90deg, transparent 0%, var(--accent-orange) 40%, var(--accent-cyan) 100%);
|
|
1940
|
+
position: relative;
|
|
1941
|
+
z-index: 1;
|
|
1942
|
+
}
|
|
1943
|
+
#dep-body {
|
|
1944
|
+
padding: 14px 16px 16px;
|
|
1945
|
+
position: relative;
|
|
1946
|
+
z-index: 1;
|
|
1947
|
+
}
|
|
1948
|
+
#dep-header {
|
|
1949
|
+
display: flex;
|
|
1950
|
+
align-items: center;
|
|
1951
|
+
justify-content: space-between;
|
|
1952
|
+
margin-bottom: 10px;
|
|
1953
|
+
}
|
|
1954
|
+
#dep-label {
|
|
1955
|
+
display: flex;
|
|
1956
|
+
align-items: center;
|
|
1957
|
+
gap: 7px;
|
|
1958
|
+
}
|
|
1959
|
+
#dep-dot {
|
|
1960
|
+
width: 7px; height: 7px;
|
|
1961
|
+
border-radius: 50%;
|
|
1962
|
+
background: var(--accent-orange);
|
|
1963
|
+
box-shadow: 0 0 8px var(--accent-orange);
|
|
1964
|
+
flex-shrink: 0;
|
|
1965
|
+
animation: dep-pulse 1.8s ease-in-out infinite;
|
|
1966
|
+
}
|
|
1967
|
+
#dep-title {
|
|
1968
|
+
font-family: var(--font-display);
|
|
1969
|
+
font-size: 10px;
|
|
1970
|
+
font-weight: 700;
|
|
1971
|
+
letter-spacing: 0.12em;
|
|
1972
|
+
text-transform: uppercase;
|
|
1973
|
+
color: var(--accent-orange);
|
|
1974
|
+
}
|
|
1975
|
+
#dep-close {
|
|
1976
|
+
background: none;
|
|
1977
|
+
border: none;
|
|
1978
|
+
color: var(--text-muted);
|
|
1979
|
+
cursor: pointer;
|
|
1980
|
+
font-size: 14px;
|
|
1981
|
+
line-height: 1;
|
|
1982
|
+
padding: 3px;
|
|
1983
|
+
border-radius: 4px;
|
|
1984
|
+
transition: color 0.15s, background 0.15s;
|
|
1985
|
+
}
|
|
1986
|
+
#dep-close:hover { color: var(--text-secondary); background: var(--overlay-strong); }
|
|
1987
|
+
#dep-message {
|
|
1988
|
+
font-size: 12px;
|
|
1989
|
+
color: var(--text-secondary);
|
|
1990
|
+
line-height: 1.55;
|
|
1991
|
+
margin-bottom: 12px;
|
|
1992
|
+
}
|
|
1993
|
+
#dep-message strong { color: var(--text-primary); font-weight: 600; }
|
|
1994
|
+
#dep-cmd-row {
|
|
1995
|
+
display: flex;
|
|
1996
|
+
align-items: stretch;
|
|
1997
|
+
gap: 0;
|
|
1998
|
+
border: 1px solid rgba(6,182,212,0.25);
|
|
1999
|
+
border-radius: 8px;
|
|
2000
|
+
overflow: hidden;
|
|
2001
|
+
background: rgba(6,182,212,0.04);
|
|
2002
|
+
}
|
|
2003
|
+
#dep-cmd {
|
|
2004
|
+
flex: 1;
|
|
2005
|
+
font-family: var(--font-display);
|
|
2006
|
+
font-size: 11.5px;
|
|
2007
|
+
font-weight: 500;
|
|
2008
|
+
color: var(--accent-cyan);
|
|
2009
|
+
padding: 8px 10px;
|
|
2010
|
+
letter-spacing: 0.02em;
|
|
2011
|
+
white-space: nowrap;
|
|
2012
|
+
overflow: hidden;
|
|
2013
|
+
text-overflow: ellipsis;
|
|
2014
|
+
}
|
|
2015
|
+
#dep-copy {
|
|
2016
|
+
background: rgba(6,182,212,0.08);
|
|
2017
|
+
border: none;
|
|
2018
|
+
border-left: 1px solid rgba(6,182,212,0.2);
|
|
2019
|
+
color: var(--text-muted);
|
|
2020
|
+
cursor: pointer;
|
|
2021
|
+
padding: 0 12px;
|
|
2022
|
+
font-size: 13px;
|
|
2023
|
+
transition: background 0.15s, color 0.15s;
|
|
2024
|
+
display: flex;
|
|
2025
|
+
align-items: center;
|
|
2026
|
+
gap: 5px;
|
|
2027
|
+
}
|
|
2028
|
+
#dep-copy:hover { background: rgba(6,182,212,0.18); color: var(--accent-cyan); }
|
|
2029
|
+
#dep-copy-label {
|
|
2030
|
+
font-family: var(--font-display);
|
|
2031
|
+
font-size: 9px;
|
|
2032
|
+
font-weight: 700;
|
|
2033
|
+
letter-spacing: 0.1em;
|
|
2034
|
+
text-transform: uppercase;
|
|
2035
|
+
}
|
|
2036
|
+
</style>
|
|
2037
|
+
<div id="deprecation-banner">
|
|
2038
|
+
<div id="dep-scanline"></div>
|
|
2039
|
+
<div id="dep-top-bar"></div>
|
|
2040
|
+
<div id="dep-body">
|
|
2041
|
+
<div id="dep-header">
|
|
2042
|
+
<div id="dep-label">
|
|
2043
|
+
<div id="dep-dot"></div>
|
|
2044
|
+
<span id="dep-title">Package Renamed</span>
|
|
2045
|
+
</div>
|
|
2046
|
+
<button id="dep-close">✕</button>
|
|
2047
|
+
</div>
|
|
2048
|
+
<div id="dep-message">
|
|
2049
|
+
<strong>claude-roi</strong> is deprecated. Switch to the new agent-neutral package:
|
|
2050
|
+
</div>
|
|
2051
|
+
<div id="dep-cmd-row">
|
|
2052
|
+
<span id="dep-cmd">npx codelens-ai</span>
|
|
2053
|
+
<button id="dep-copy" title="Copy to clipboard">
|
|
2054
|
+
<span id="dep-copy-label">Copy</span>
|
|
2055
|
+
</button>
|
|
2056
|
+
</div>
|
|
2057
|
+
</div>
|
|
2058
|
+
</div>
|
|
2059
|
+
|
|
1863
2060
|
<div id="app">
|
|
1864
2061
|
<div class="loading">
|
|
1865
2062
|
<div class="spinner"></div>
|
|
@@ -2050,6 +2247,25 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|
|
2050
2247
|
try {
|
|
2051
2248
|
const res = await fetch('/api/all');
|
|
2052
2249
|
DATA = await res.json();
|
|
2250
|
+
if (DATA.meta?.invokedAs === 'claude-roi') {
|
|
2251
|
+
const banner = document.getElementById('deprecation-banner');
|
|
2252
|
+
banner.style.display = 'block';
|
|
2253
|
+
requestAnimationFrame(() => banner.classList.add('visible'));
|
|
2254
|
+
document.getElementById('dep-close').addEventListener('click', () => {
|
|
2255
|
+
banner.classList.add('hiding');
|
|
2256
|
+
banner.addEventListener('animationend', () => banner.style.display = 'none', { once: true });
|
|
2257
|
+
});
|
|
2258
|
+
document.getElementById('dep-copy').addEventListener('click', () => {
|
|
2259
|
+
navigator.clipboard.writeText('npx codelens-ai').then(() => {
|
|
2260
|
+
const lbl = document.getElementById('dep-copy-label');
|
|
2261
|
+
const btn = document.getElementById('dep-copy');
|
|
2262
|
+
lbl.textContent = '✓ Done';
|
|
2263
|
+
btn.style.color = 'var(--accent-green)';
|
|
2264
|
+
btn.style.background = 'rgba(34,211,168,0.12)';
|
|
2265
|
+
setTimeout(() => { lbl.textContent = 'Copy'; btn.style.color = ''; btn.style.background = ''; }, 1800);
|
|
2266
|
+
});
|
|
2267
|
+
});
|
|
2268
|
+
}
|
|
2053
2269
|
render();
|
|
2054
2270
|
} catch (err) {
|
|
2055
2271
|
document.getElementById('app').innerHTML = `
|
package/src/index.js
CHANGED
|
@@ -82,8 +82,8 @@ async function buildPayload(claudeDir, days, project, forceRefresh = false) {
|
|
|
82
82
|
async function main() {
|
|
83
83
|
const program = new Command();
|
|
84
84
|
program
|
|
85
|
-
.name('
|
|
86
|
-
.description('Correlate
|
|
85
|
+
.name('codelens-ai')
|
|
86
|
+
.description('Correlate AI coding agent token usage with git output to measure ROI')
|
|
87
87
|
.version(VERSION)
|
|
88
88
|
.option('-p, --port <number>', 'port to serve dashboard', '3457')
|
|
89
89
|
.option('-d, --days <number>', 'number of days to look back', '30')
|
|
@@ -98,11 +98,18 @@ async function main() {
|
|
|
98
98
|
const port = parseInt(opts.port, 10);
|
|
99
99
|
const days = parseInt(opts.days, 10);
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
const invokedAs = path.basename(process.argv[1]);
|
|
102
|
+
if (invokedAs.includes('claude-roi')) {
|
|
103
|
+
console.log(`\x1b[33m⚠ claude-roi has been renamed to codelens-ai\x1b[0m`);
|
|
104
|
+
console.log(` Switch to: \x1b[36mnpx codelens-ai\x1b[0m`);
|
|
105
|
+
console.log('');
|
|
106
|
+
}
|
|
107
|
+
console.log(`\x1b[36mcodelens-ai\x1b[0m v${VERSION}`);
|
|
102
108
|
|
|
103
109
|
const claudeDir = path.join(os.homedir(), '.claude', 'projects');
|
|
104
110
|
|
|
105
111
|
const payload = await buildPayload(claudeDir, days, opts.project, opts.refresh);
|
|
112
|
+
if (payload) payload.meta.invokedAs = invokedAs.includes('claude-roi') ? 'claude-roi' : 'codelens-ai';
|
|
106
113
|
|
|
107
114
|
if (!payload) {
|
|
108
115
|
console.log('\x1b[33mNo Claude Code sessions found.\x1b[0m');
|
|
@@ -154,7 +161,7 @@ async function main() {
|
|
|
154
161
|
|
|
155
162
|
server.on('error', (err) => {
|
|
156
163
|
if (err.code === 'EADDRINUSE') {
|
|
157
|
-
console.error(`\x1b[31mPort ${port} is already in use.\x1b[0m Try:
|
|
164
|
+
console.error(`\x1b[31mPort ${port} is already in use.\x1b[0m Try: codelens-ai --port ${port + 1}`);
|
|
158
165
|
process.exit(1);
|
|
159
166
|
}
|
|
160
167
|
throw err;
|