metrascope 0.1.1 → 0.1.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 CHANGED
@@ -1,4 +1,8 @@
1
- # metrascope
1
+ <p align="center">
2
+ <img src="assets/logo.svg" width="120" height="120" alt="Metrascope logo">
3
+ </p>
4
+
5
+ <h1 align="center">metrascope</h1>
2
6
 
3
7
  [![npm version](https://img.shields.io/npm/v/metrascope.svg)](https://www.npmjs.com/package/metrascope)
4
8
  [![license](https://img.shields.io/npm/l/metrascope.svg)](./LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metrascope",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "See where your coding-agent tokens go. One local command — Codex, Claude Code, Qwen Code, OpenCode & more. Zero upload.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -35,11 +35,11 @@
35
35
  "license": "MIT",
36
36
  "repository": {
37
37
  "type": "git",
38
- "url": "git+https://github.com/Buckibarnes17/codex-spend.git"
38
+ "url": "git+https://github.com/Buckibarnes17/metrascope.git"
39
39
  },
40
- "homepage": "https://github.com/Buckibarnes17/codex-spend#readme",
40
+ "homepage": "https://github.com/Buckibarnes17/metrascope#readme",
41
41
  "bugs": {
42
- "url": "https://github.com/Buckibarnes17/codex-spend/issues"
42
+ "url": "https://github.com/Buckibarnes17/metrascope/issues"
43
43
  },
44
44
  "dependencies": {
45
45
  "express": "^4.21.0",
Binary file
@@ -0,0 +1,9 @@
1
+ <svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Metrascope">
2
+ <!-- dark bars -->
3
+ <rect x="255" y="615" width="85" height="210" rx="16" fill="#2f333a"/>
4
+ <rect x="405" y="485" width="85" height="340" rx="16" fill="#2f333a"/>
5
+ <rect x="710" y="565" width="85" height="260" rx="16" fill="#2f333a"/>
6
+ <!-- gold "i" bar + dot (the highlighted metric) -->
7
+ <rect x="560" y="310" width="85" height="515" rx="16" fill="#d4a44a"/>
8
+ <circle cx="602" cy="205" r="48" fill="#d4a44a"/>
9
+ </svg>
@@ -4,6 +4,8 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>Metrascope</title>
7
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg">
8
+ <link rel="alternate icon" type="image/png" href="/favicon.png">
7
9
  <link rel="preconnect" href="https://fonts.googleapis.com">
8
10
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
11
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
@@ -37,6 +39,7 @@ button,input{font:inherit}
37
39
  header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px}
38
40
  .brand{display:flex;align-items:center;gap:12px}
39
41
  .mark{width:36px;height:36px;border-radius:9px;color:var(--brand-fg);background:linear-gradient(160deg,var(--brand),var(--brand-hover));display:grid;place-items:center;font-weight:850;font-size:14px;letter-spacing:.02em;box-shadow:var(--edge)}
42
+ .logo{width:38px;height:38px;display:block;flex:0 0 auto}
40
43
  h1{margin:0;font-size:18px;line-height:1.1;letter-spacing:-.01em}
41
44
  .sub{margin-top:3px;color:var(--soft);font-size:11px;font-family:var(--mono);max-width:44ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
42
45
  .actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}
@@ -244,7 +247,7 @@ function render(){
244
247
  const t=DATA.totals, app=document.getElementById('app'), src=DATA.source||{}, c=caps();
245
248
  app.className='wrap';
246
249
  app.innerHTML=`
247
- <header class="anim"><div class="brand"><div class="mark">${esc(src.mark||'CX')}</div><div><h1>Metrascope</h1><div class="sub" title="${esc(src.home||'')}">${esc(src.label||'')} · ${esc(src.home||'')}${t.dateRange?' · '+t.dateRange.from+' → '+t.dateRange.to:''}</div></div></div><div class="actions"><button class="btn" onclick="toggleTheme()">${theme==='dark'?'☀ Light':'☾ Dark'}</button><button class="btn" onclick="openShare()">Share</button><button class="btn primary" onclick="refresh()">↻ Refresh</button></div></header>
250
+ <header class="anim"><div class="brand"><img class="logo" src="/favicon.svg" alt="Metrascope" width="38" height="38"><div><h1>Metrascope</h1><div class="sub" title="${esc(src.home||'')}">${esc(src.label||'')} · ${esc(src.home||'')}${t.dateRange?' · '+t.dateRange.from+' → '+t.dateRange.to:''}</div></div></div><div class="actions"><button class="btn" onclick="toggleTheme()">${theme==='dark'?'☀ Light':'☾ Dark'}</button><button class="btn" onclick="openShare()">Share</button><button class="btn primary" onclick="refresh()">↻ Refresh</button></div></header>
248
251
  ${agentBar()}
249
252
  ${DATA.warnings?.length?`<div class="warnbox anim">${DATA.warnings.map(w=>esc(w.message)).join('<br>')}</div>`:''}
250
253
  ${!DATA.sessions.length?`<div class="card empty anim">No ${esc(src.label||'agent')} sessions with token usage found.<div class="muted" style="margin-top:8px">${esc(src.home||'')}</div></div>`:`