claude-rpc 1.0.2 → 1.0.3
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 +4 -4
- package/package.json +2 -2
- package/src/calendar.js +1 -1
- package/src/card.js +1 -1
- package/src/cli.js +8 -8
- package/src/default-config.js +1 -1
- package/src/profile.js +1 -1
- package/src/server/assets/wrapped.client.js +2 -2
- package/src/session-card.js +1 -1
- package/src/version.js +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
**Discord Rich Presence for [Claude Code](https://claude.com/claude-code)** — your live model, project, tokens, and lifetime stats, driven by the hooks Claude Code already fires.
|
|
17
17
|
|
|
18
|
-
**[claude-rpc.
|
|
18
|
+
**[claude-rpc.com →](https://claude-rpc.com)** — see it in one page.
|
|
19
19
|
|
|
20
20
|
[](#community-totals) [](#community-totals)
|
|
21
21
|
|
|
@@ -53,7 +53,7 @@ That installs `claude-rpc` globally, wires the hooks into Claude Code, and start
|
|
|
53
53
|
**Prefer a one-liner that figures it out for you?**
|
|
54
54
|
|
|
55
55
|
```sh
|
|
56
|
-
curl -fsSL https://claude-rpc.
|
|
56
|
+
curl -fsSL https://claude-rpc.com/install | sh
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
Detects Node (installs the npm package) or falls back to the prebuilt Apple-Silicon binary, then runs `setup` for you.
|
|
@@ -149,9 +149,9 @@ claude-rpc readme --raw | pbcopy # straight to your clipboard
|
|
|
149
149
|
**Live card + badges, paste once.** With a public profile (`claude-rpc profile set --handle <you> && claude-rpc profile on`), your stats are served as an always-current card (and badges) from the community worker — no `gh`, no gist, nothing to re-run:
|
|
150
150
|
|
|
151
151
|
```md
|
|
152
|
-
[](https://claude-rpc.
|
|
152
|
+
[](https://claude-rpc.com/u/<you>)
|
|
153
153
|
|
|
154
|
-
[](https://claude-rpc.
|
|
154
|
+
[](https://claude-rpc.com/?ref=badge)
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
The card shows tokens, sessions, active hours and streak; badge `metric=` is one of `tokens · sessions · hours · streak` (optional `&label=` to retitle). Both refresh themselves as the daemon flushes your profile (~every 30 min). Your profile page at `/u/<you>` has a one-click "copy" for the whole block.
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-rpc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Discord Rich Presence for Claude Code — live model, project, tokens, and lifetime stats driven by Claude Code's hook system.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Archer Simmons",
|
|
8
|
-
"homepage": "https://
|
|
8
|
+
"homepage": "https://claude-rpc.com",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/rar-file/claude-rpc.git"
|
package/src/calendar.js
CHANGED
|
@@ -86,7 +86,7 @@ export function renderCalendar(aggregate, { weeks = 53, generatedAt = new Date()
|
|
|
86
86
|
<text x="${W - 170}" y="${H - 10}" font-family="JetBrains Mono, ui-monospace, monospace" font-size="9" fill="${PALETTE.inkFaint}">less</text>
|
|
87
87
|
${legend}
|
|
88
88
|
<text x="${W - 28}" y="${H - 10}" font-family="JetBrains Mono, ui-monospace, monospace" font-size="9" fill="${PALETTE.inkFaint}">more</text>
|
|
89
|
-
<text x="${padX}" y="${H - 8}" font-family="JetBrains Mono, ui-monospace, monospace" font-size="9" fill="${PALETTE.inkFaint}">claude-rpc.
|
|
89
|
+
<text x="${padX}" y="${H - 8}" font-family="JetBrains Mono, ui-monospace, monospace" font-size="9" fill="${PALETTE.inkFaint}">claude-rpc.com · v${VERSION}</text>
|
|
90
90
|
</svg>`;
|
|
91
91
|
}
|
|
92
92
|
|
package/src/card.js
CHANGED
|
@@ -322,7 +322,7 @@ export function renderCard(aggregate, { range = 'year', generatedAt = new Date()
|
|
|
322
322
|
<!-- ── credits ── -->
|
|
323
323
|
<g transform="translate(${W - 60} ${H - 24})" text-anchor="end">
|
|
324
324
|
<text font-family="JetBrains Mono, ui-monospace, monospace" font-size="10"
|
|
325
|
-
fill="${PALETTE.inkFaint}">${escapeXml(allTimeHours)}h all-time · claude-rpc.
|
|
325
|
+
fill="${PALETTE.inkFaint}">${escapeXml(allTimeHours)}h all-time · claude-rpc.com</text>
|
|
326
326
|
</g>
|
|
327
327
|
</svg>`;
|
|
328
328
|
}
|
package/src/cli.js
CHANGED
|
@@ -1066,7 +1066,7 @@ function doReadme(argv) {
|
|
|
1066
1066
|
const raw = argv.includes('--raw') || argv.includes('--plain');
|
|
1067
1067
|
const cfg = loadConfig();
|
|
1068
1068
|
const endpoint = (cfg.community?.endpoint || 'https://claude-rpc-totals.claude-rpc.workers.dev').replace(/\/+$/, '');
|
|
1069
|
-
const site = 'https://claude-rpc.
|
|
1069
|
+
const site = 'https://claude-rpc.com';
|
|
1070
1070
|
const profile = cfg.profile || {};
|
|
1071
1071
|
const handle = profile.handle;
|
|
1072
1072
|
const live = !!profile.enabled && lb.isValidHandle(handle);
|
|
@@ -1287,7 +1287,7 @@ async function doExport(argv) {
|
|
|
1287
1287
|
// `claude-rpc squad join <code>`
|
|
1288
1288
|
// `claude-rpc squad` / `squad status` → standings for every squad you're in
|
|
1289
1289
|
// `claude-rpc squad leave [id]`
|
|
1290
|
-
// The web flow (claude-rpc.
|
|
1290
|
+
// The web flow (claude-rpc.com + GitHub login) drives the same worker
|
|
1291
1291
|
// endpoints; the CLI authenticates with the community instanceId it already has.
|
|
1292
1292
|
|
|
1293
1293
|
function squadAuth() {
|
|
@@ -1332,7 +1332,7 @@ function squadAuth() {
|
|
|
1332
1332
|
return { cfg, endpoint, instanceId, post, get };
|
|
1333
1333
|
}
|
|
1334
1334
|
|
|
1335
|
-
function squadPageUrl(id) { return `https://claude-rpc.
|
|
1335
|
+
function squadPageUrl(id) { return `https://claude-rpc.com/squad/${id}`; }
|
|
1336
1336
|
|
|
1337
1337
|
function printSquadInvite(squad) {
|
|
1338
1338
|
console.log('');
|
|
@@ -1431,11 +1431,11 @@ async function doSquadCmd(argv) {
|
|
|
1431
1431
|
// one-time code, no browser needed
|
|
1432
1432
|
// claude-rpc link <code> on the NEW machine → claims it, merging this
|
|
1433
1433
|
// install into the same leaderboard identity
|
|
1434
|
-
// The browser fallback lives at claude-rpc.
|
|
1434
|
+
// The browser fallback lives at claude-rpc.com/link (log in with
|
|
1435
1435
|
// GitHub → same code) for when the other machine isn't handy. Claiming
|
|
1436
1436
|
// verifies the profile (✓) and unlocks managing squads from the browser.
|
|
1437
1437
|
|
|
1438
|
-
const LINK_PAGE = 'https://claude-rpc.
|
|
1438
|
+
const LINK_PAGE = 'https://claude-rpc.com/link';
|
|
1439
1439
|
|
|
1440
1440
|
// Mint side: this machine asks the worker for a code. The worker only obliges
|
|
1441
1441
|
// when this install's canonical profile is verified — the ✓ a claim grants
|
|
@@ -1638,7 +1638,7 @@ function profileNextStep() {
|
|
|
1638
1638
|
const p = loadConfig().profile || {};
|
|
1639
1639
|
const next = profileSteps(p).find((s) => !s.done);
|
|
1640
1640
|
if (!next) {
|
|
1641
|
-
console.log(` ${c.dim}→ all set — you're live at${c.reset} ${c.cyan}https://claude-rpc.
|
|
1641
|
+
console.log(` ${c.dim}→ all set — you're live at${c.reset} ${c.cyan}https://claude-rpc.com/u/${encodeURIComponent(p.handle)}${c.reset}`);
|
|
1642
1642
|
} else if (next.key === 'verify') {
|
|
1643
1643
|
console.log(` ${c.dim}→ next: run${c.reset} ${c.cyan}claude-rpc link${c.reset} ${c.dim}on a machine that's already verified, then${c.reset} ${c.cyan}claude-rpc link <code>${c.reset} ${c.dim}here — first machine? ${LINK_PAGE}${c.reset}`);
|
|
1644
1644
|
} else {
|
|
@@ -1649,7 +1649,7 @@ function profileNextStep() {
|
|
|
1649
1649
|
function profileStatus() {
|
|
1650
1650
|
const p = (loadConfig().profile) || {};
|
|
1651
1651
|
const handleOk = lb.isValidHandle(p.handle);
|
|
1652
|
-
const boardUrl = handleOk ? `https://claude-rpc.
|
|
1652
|
+
const boardUrl = handleOk ? `https://claude-rpc.com/u/${encodeURIComponent(p.handle)}` : '';
|
|
1653
1653
|
|
|
1654
1654
|
console.log('');
|
|
1655
1655
|
console.log(` ${c.bold}${c.magenta}◆ profile${c.reset} ${c.dim}— public leaderboard identity${c.reset}`);
|
|
@@ -1776,7 +1776,7 @@ async function profilePublish() {
|
|
|
1776
1776
|
console.log(` ${c.dim}publishing @${cfg.profile.handle} to the board…${c.reset}`);
|
|
1777
1777
|
const r = await flushProfile(cfg);
|
|
1778
1778
|
if (r.ok) {
|
|
1779
|
-
console.log(` ${c.green}✓${c.reset} published — see it at ${c.cyan}https://claude-rpc.
|
|
1779
|
+
console.log(` ${c.green}✓${c.reset} published — see it at ${c.cyan}https://claude-rpc.com/u/${encodeURIComponent(cfg.profile.handle)}${c.reset}`);
|
|
1780
1780
|
} else if (r.reason === 'rate-limited') {
|
|
1781
1781
|
console.log(` ${c.yellow}!${c.reset} rate-limited — already published in the last minute; the board has you`);
|
|
1782
1782
|
} else {
|
package/src/default-config.js
CHANGED
|
@@ -241,7 +241,7 @@ export const DEFAULT_CONFIG = {
|
|
|
241
241
|
// ?ref=discord lets the landing page attribute installs that originate
|
|
242
242
|
// from a presence card. (When the cwd is a github repo the daemon also
|
|
243
243
|
// prepends a "View on GitHub →" button, so both can show.)
|
|
244
|
-
{ label: "Get claude-rpc →", url: "https://claude-rpc.
|
|
244
|
+
{ label: "Get claude-rpc →", url: "https://claude-rpc.com/?ref=discord" },
|
|
245
245
|
],
|
|
246
246
|
},
|
|
247
247
|
statusIcons: {
|
package/src/profile.js
CHANGED
|
@@ -135,7 +135,7 @@ export function renderProfileCard(aggregate, { handle = '', generatedAt = new Da
|
|
|
135
135
|
<!-- footer -->
|
|
136
136
|
<text x="40" y="${H - 18}"
|
|
137
137
|
font-family="JetBrains Mono, ui-monospace, monospace"
|
|
138
|
-
font-size="11" fill="${PALETTE.inkFaint}">${escapeXml(`best streak ${t.longestStreak}d · ≈${fmtCost(t.cost)} · claude-rpc.
|
|
138
|
+
font-size="11" fill="${PALETTE.inkFaint}">${escapeXml(`best streak ${t.longestStreak}d · ≈${fmtCost(t.cost)} · claude-rpc.com`)}</text>
|
|
139
139
|
</svg>`;
|
|
140
140
|
}
|
|
141
141
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
// Landing-page CTA used by the finale share. The dashboard is served on
|
|
21
21
|
// localhost, so sharing `location.href` hands the recipient a dead link —
|
|
22
22
|
// the finale shares this public URL + a stats summary instead.
|
|
23
|
-
const LANDING = 'https://claude-rpc.
|
|
23
|
+
const LANDING = 'https://claude-rpc.com/?ref=wrapped';
|
|
24
24
|
let _shareText = ''; // built in the finale slide, consumed by wireFinale
|
|
25
25
|
|
|
26
26
|
// ── build the story slides from the wrapped payload ──────────
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
${cell('Lines', (d.linesNet >= 0 ? '+' : '−') + fmtNum(Math.abs(d.linesNet)), 'grass')}
|
|
132
132
|
${cell('Hotspot', d.hotspot ? esc(d.hotspot.name) : '—')}
|
|
133
133
|
</div>
|
|
134
|
-
<div class="foot">made with claude-rpc · claude-rpc.
|
|
134
|
+
<div class="foot">made with claude-rpc · claude-rpc.com</div>
|
|
135
135
|
</div>
|
|
136
136
|
<div class="actions">
|
|
137
137
|
<button class="btn primary" id="w-replay">↺ replay</button>
|
package/src/session-card.js
CHANGED
|
@@ -60,7 +60,7 @@ export function renderSessionCard(vars = {}, { generatedAt = new Date() } = {})
|
|
|
60
60
|
${statCell(C[1], 184, 'Est. cost', String(cost), PALETTE.blurple)}
|
|
61
61
|
${statCell(C[2], 184, 'Reads', String(v.filesRead ?? 0))}
|
|
62
62
|
|
|
63
|
-
<text x="40" y="${H - 16}" font-family="JetBrains Mono, ui-monospace, monospace" font-size="10" fill="${PALETTE.inkFaint}">${escapeXml(`${v.currentFilePretty ? 'last: ' + v.currentFilePretty + ' · ' : ''}claude-rpc.
|
|
63
|
+
<text x="40" y="${H - 16}" font-family="JetBrains Mono, ui-monospace, monospace" font-size="10" fill="${PALETTE.inkFaint}">${escapeXml(`${v.currentFilePretty ? 'last: ' + v.currentFilePretty + ' · ' : ''}claude-rpc.com · v${VERSION}`)}</text>
|
|
64
64
|
</svg>`;
|
|
65
65
|
}
|
|
66
66
|
|