repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

Add Claude and Codex dotfiles

72580523009a76766427d27446cb978d908f94d0

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (10)

+649 / −0 text lines · 2 binary (striped old/new sizes in 64-byte units, not churn) · lines and sizes scale separately

Diff layout

.secrets

Modified

+2 / −0 text lines

1212pi/agent/auth.json
1313nushell/secrets.nu
1414nushell/secrets.nuon
15claude/.credentials.json
16codex/auth.json

NB-00718.symlinks

Modified

+21 / −0 text lines

6767rbw
6868~/AppData/Roaming/rbw
69
70claude/.credentials.json
71~/.claude/.credentials.json
72
73claude/settings.json
74~/.claude/settings.json
75
76claude/statusline.js
77~/.claude/statusline.js
78
79claude/cc-statusline-hook.js
80~/.claude/cc-statusline-hook.js
81
82claude/CLAUDE.md
83~/.claude/CLAUDE.md
84
85claude/RTK.md
86~/.claude/RTK.md
87
88codex/auth.json
89~/.codex/auth.json

claude/.credentials.json

Added
new file mode 100644

Binary size (old → new): 0 → 1120 bytes.

claude/CLAUDE.md

Added
new file mode 100644

+1 / −0 text lines

claude/RTK.md

Added
new file mode 100644

+29 / −0 text lines

1# RTK - Rust Token Killer
2
3**Usage**: Token-optimized CLI proxy (60-90% savings on dev operations)
4
5## Meta Commands (always use rtk directly)
6
7```bash
8rtk gain # Show token savings analytics
9rtk gain --history # Show command usage history with savings
10rtk discover # Analyze Claude Code history for missed opportunities
11rtk proxy <cmd> # Execute raw command without filtering (for debugging)
12```
13
14## Installation Verification
15
16```bash
17rtk --version # Should show: rtk X.Y.Z
18rtk gain # Should work (not "command not found")
19which rtk # Verify correct binary
20```
21
22⚠️ **Name collision**: If `rtk gain` fails, you may have reachingforthejack/rtk (Rust Type Kit) installed instead.
23
24## Hook-Based Usage
25
26All other commands are automatically rewritten by the Claude Code hook.
27Example: `git status` → `rtk git status` (transparent, 0 tokens overhead)
28
29Refer to CLAUDE.md for full command reference.

claude/cc-statusline-hook.js

Added
new file mode 100755

+77 / −0 text lines

1#!/usr/bin/env node
2// Claude Code hook → feeds the statusline's generic badge seam.
3// Registered as a PreToolUse hook matching the "Workflow" tool. On a workflow
4// launch it appends a self-expiring badge line to ~/.claude/.cc-statusline-extra
5// which statusline.js renders (and ages out via CONFIG.extraTtlMs).
6//
7// File format: one "<epochMillis>|<text>" per line. We prune expired lines on
8// every write so the file never grows unbounded.
9//
10// Contract: read hook JSON from stdin, exit 0, emit nothing to stdout (no
11// context injection). Never throw in a way that blocks the tool.
13"use strict";
15const fs = require("fs");
16const os = require("os");
17const path = require("path");
19const TTL_MS = 120000; // must match statusline CONFIG.extraTtlMs
20const MAX_LINES = 10;
22try {
23 const raw = fs.readFileSync(0, "utf8");
24 const h = raw && raw.trim() ? JSON.parse(raw) : {};
26 const claudeDir0 = process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), ".claude");
28 // Turn boundary: drop a per-session marker the statusline consumes to
29 // rebaseline its "turn cost" (Δ since this prompt).
30 if (h.hook_event_name === "UserPromptSubmit") {
31 try {
32 const sid = String(h.session_id || "default").replace(/[^A-Za-z0-9._-]/g, "");
33 fs.writeFileSync(path.join(claudeDir0, `.cc-turn-${sid}`), "");
34 } catch {}
35 }
37 // Only act on a Workflow tool launch.
38 if (h.hook_event_name === "PreToolUse" && h.tool_name === "Workflow") {
39 const ti = h.tool_input || {};
40 // Predefined workflow → ti.name. Inline script → meta.name inside ti.script.
41 let name = typeof ti.name === "string" ? ti.name : "";
42 if (!name && typeof ti.script === "string") {
43 const m = ti.script.match(/name\s*:\s*['"]([^'"]+)['"]/);
44 if (m) name = m[1];
45 }
46 name = (name || "workflow").replace(/[\x00-\x1F|]/g, "").slice(0, 40);
48 const claudeDir = process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), ".claude");
49 const f = path.join(claudeDir, ".cc-statusline-extra");
50 const now = Date.now();
52 // Keep only non-expired existing lines, then append ours.
53 let kept = [];
54 try {
55 kept = fs
56 .readFileSync(f, "utf8")
57 .split(/\r?\n/)
58 .filter((l) => {
59 const i = l.indexOf("|");
60 if (i <= 0) return false;
61 const ts = Number(l.slice(0, i));
62 return Number.isFinite(ts) && now - ts <= TTL_MS;
63 });
64 } catch {}
66 kept.push(`${now}|⚙ wf:${name}`);
67 if (kept.length > MAX_LINES) kept = kept.slice(-MAX_LINES);
69 const tmp = `${f}.${process.pid}.tmp`;
70 fs.writeFileSync(tmp, kept.join("\n") + "\n");
71 fs.renameSync(tmp, f);
72 }
73} catch {
74 // Swallow everything — a statusline-feeder hook must never block a tool.
75}
77process.exit(0);

claude/settings.json

Added
new file mode 100644

+85 / −0 text lines

1{
2 "permissions": {
3 "defaultMode": "bypassPermissions"
4 },
5 "hooks": {
6 "PreToolUse": [
7 {
8 "matcher": "Workflow",
9 "hooks": [
10 {
11 "type": "command",
12 "command": "node ~/.claude/cc-statusline-hook.js"
13 }
14 ]
15 },
16 {
17 "matcher": "Bash",
18 "hooks": [
19 {
20 "type": "command",
21 "command": "rtk hook claude"
22 }
23 ]
24 }
25 ],
26 "UserPromptSubmit": [
27 {
28 "hooks": [
29 {
30 "type": "command",
31 "command": "node ~/.claude/cc-statusline-hook.js"
32 }
33 ]
34 }
35 ]
36 },
37 "statusLine": {
38 "type": "command",
39 "command": "node ~/.claude/statusline.js"
40 },
41 "enabledPlugins": {
42 "context7@claude-plugins-official": true,
43 "code-review@claude-plugins-official": true,
44 "code-simplifier@claude-plugins-official": true,
45 "github@claude-plugins-official": false,
46 "skill-creator@claude-plugins-official": true,
47 "feature-dev@claude-plugins-official": true,
48 "commit-commands@claude-plugins-official": true,
49 "atlassian@claude-plugins-official": true,
50 "jdtls-lsp@claude-plugins-official": true,
51 "remember@claude-plugins-official": false,
52 "caveman@caveman": true,
53 "superpowers@claude-plugins-official": true,
54 "frontend-design@claude-plugins-official": true,
55 "learning-output-style@claude-plugins-official": true,
56 "coderabbit@claude-plugins-official": true,
57 "desktop-commander@claude-plugins-official": true,
58 "code-modernization@claude-plugins-official": true
59 },
60 "extraKnownMarketplaces": {
61 "claude-code-plugins": {
62 "source": {
63 "source": "github",
64 "repo": "anthropics/claude-code"
65 }
66 },
67 "caveman": {
68 "source": {
69 "source": "github",
70 "repo": "JuliusBrussee/caveman"
71 }
72 }
73 },
74 "effortLevel": "xhigh",
75 "advisorModel": "opus",
76 "promptSuggestionEnabled": false,
77 "tui": "fullscreen",
78 "skipDangerousModePermissionPrompt": true,
79 "theme": "auto",
80 "editorMode": "normal",
81 "verbose": true,
82 "inputNeededNotifEnabled": true,
83 "agentPushNotifEnabled": true,
84 "skipAutoPermissionPrompt": true
85}

claude/statusline.js

Added
new file mode 100755

+413 / −0 text lines

1#!/usr/bin/env node
2// Claude Code statusline (Node). Reads session JSON from stdin, prints one line.
3//
4// <dir> · <model> · <effort> · <git|jj> · <5h bar> · <7d bar> · <cost> · <cm> · <extra>
5//
6// Cost shows turn (Δ since last user prompt), session, and month-to-date.
7// Month-to-date is a cross-session ledger: each render adds the session's new
8// spend (delta) into the current month's bucket (~/.claude/.cc-cost-ledger.json).
9//
10// Must NEVER throw — a crash blanks the bar. Every optional part is its own
11// try/catch. Schema: https://code.claude.com/docs/en/statusline.md
13"use strict";
15const fs = require("fs");
16const os = require("os");
17const path = require("path");
18const crypto = require("crypto");
19const { execFileSync } = require("child_process");
21// ─── CONFIG ──────────────────────────────────────────────────────────────────
22const CONFIG = {
23 sep: " · ", // segment padding
24 barWidth: 8, // usage bar cells
25 contextWarnPct: 70,
26 contextCritPct: 90,
27 usageAlways: true,
28 usageWarnPct: 50,
29 usageCritPct: 80,
30 costStyle: "icon", // "slash" → $0.15/turn | "icon" → ⟳$0.15
31 gitCacheTtlMs: 3000,
32 extraTtlMs: 120000,
33 cmdTimeoutMs: 2500,
34 ledgerPruneDays: 40,
35 // burn rate ($/hr): recent-window spend rate, decay-proof (idle samples age out)
36 burnWindowMs: 10 * 60000, // sliding window of cost samples to rate over
37 burnMinSpanMs: 60000, // need ≥ this much elapsed inside window before showing
38 burnMaxSamples: 60, // cap stored samples per session (keeps ledger small)
39};
41const claudeDir = process.env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), ".claude");
43// ─── ANSI ────────────────────────────────────────────────────────────────────
44const E = "\x1b";
45const R = `${E}[0m`;
46const c = {
47 cyan: (s) => `${E}[36m${s}${R}`,
48 magenta: (s) => `${E}[35m${s}${R}`,
49 green: (s) => `${E}[32m${s}${R}`,
50 yellow: (s) => `${E}[33m${s}${R}`,
51 red: (s) => `${E}[31m${s}${R}`,
52 blue: (s) => `${E}[34m${s}${R}`,
53 dim: (s) => `${E}[2m${s}${R}`,
54 white: (s) => `${E}[97m${s}${R}`,
55 orange: (s) => `${E}[38;5;172m${s}${R}`,
56};
57const pctColor = (p, warn, crit) => (p >= crit ? c.red : p >= warn ? c.yellow : c.green);
59const PARTIALS = ["", "▏", "▎", "▍", "▌", "▋", "▊", "▉"];
60function bar(pct, width, color) {
61 let p = Math.max(0, Math.min(100, pct));
62 let filled = (p / 100) * width;
63 let full = Math.floor(filled);
64 let pIdx = Math.round((filled - full) * 8);
65 if (pIdx === 8) {
66 full += 1;
67 pIdx = 0;
68 }
69 if (full > width) full = width;
70 const partial = pIdx > 0 && full < width ? PARTIALS[pIdx] : "";
71 const used = full + (partial ? 1 : 0);
72 const empty = Math.max(0, width - used);
73 return color("█".repeat(full) + partial) + c.dim("░".repeat(empty));
74}
75const money = (n) => (n < 1 ? n.toFixed(3) : n.toFixed(2));
77// ─── stdin ───────────────────────────────────────────────────────────────────
78let d = {};
79try {
80 const raw = fs.readFileSync(0, "utf8");
81 if (raw && raw.trim()) d = JSON.parse(raw);
82} catch {
83 d = {};
84}
86const parts = [];
87const push = (s) => {
88 if (s) parts.push(s);
89};
91// ─── 1. dir ──────────────────────────────────────────────────────────────────
92try {
93 const cwd = d?.workspace?.current_dir || d?.cwd;
94 if (cwd) push(c.cyan(path.basename(cwd) || cwd));
95} catch {}
97// ─── 2. model ──────────────────────────────────────────────────────────────────
98try {
99 if (d?.model?.display_name) push(c.magenta(d.model.display_name));
100} catch {}
102// ─── 3. effort / thinking ──────────────────────────────────────────────────────
103try {
104 const lvl = d?.effort?.level;
105 if (lvl) {
106 const on = d?.thinking?.enabled !== false;
107 const col = lvl === "max" || lvl === "xhigh" ? c.magenta : lvl === "high" ? c.blue : c.dim;
108 push(on ? col(`⚡${lvl}`) : c.dim(`⚡${lvl}`));
109 }
110} catch {}
112// ─── 4. git / jj (smart-cached) ────────────────────────────────────────────────
113push(gitOrJjSegment(d?.workspace?.current_dir || d?.cwd));
115// ─── 5. context (gated) ────────────────────────────────────────────────────────
116try {
117 const cw = d?.context_window || {};
118 let pct = cw.used_percentage;
119 if (pct == null && cw.context_window_size && cw.total_input_tokens != null) {
120 pct = (cw.total_input_tokens / cw.context_window_size) * 100;
121 }
122 const exceeds = d?.exceeds_200k_tokens === true;
123 if (exceeds || (pct != null && pct >= CONFIG.contextWarnPct)) {
124 const shown = pct != null ? Math.round(pct) : 100;
125 const col = exceeds || shown >= CONFIG.contextCritPct ? c.red : c.yellow;
126 push(`${c.dim("ctx")} ${bar(shown, CONFIG.barWidth, col)} ${col(shown + "%")}`);
127 }
128} catch {}
130// ─── 6. usage bars (rate limits) ───────────────────────────────────────────────
131try {
132 const rl = d?.rate_limits;
133 if (rl) {
134 const add = (label, win, withReset) => {
135 if (win && typeof win.used_percentage === "number") {
136 const p = Math.round(win.used_percentage);
137 if (CONFIG.usageAlways || p >= CONFIG.usageWarnPct) {
138 const col = pctColor(p, CONFIG.usageWarnPct, CONFIG.usageCritPct);
139 let seg = `${c.dim(label)} ${bar(p, CONFIG.barWidth, col)} ${col(p + "%")}`;
140 // resets_at is UNIX EPOCH SECONDS — ×1000 to compare with Date.now() (ms)
141 if (withReset && typeof win.resets_at === "number") {
142 const left = win.resets_at * 1000 - Date.now();
143 if (left > 0) seg += c.dim("·" + fmtDuration(left));
144 }
145 push(seg);
146 }
147 }
148 };
149 add("5h", rl.five_hour, true);
150 add("7d", rl.seven_day, false);
151 }
152} catch {}
154// ─── 7. cost: turn · session · month ───────────────────────────────────────────
155try {
156 const total = d?.cost?.total_cost_usd;
157 const sid = d?.session_id || "default";
158 if (typeof total === "number") {
159 const { turn, month, burnRate } = updateLedger(sid, total);
160 // 🔥 burn rate: own segment, before the cost cluster (matches bars · 🔥 · cost)
161 if (burnRate > 0) push(c.orange(`🔥$${burnRate.toFixed(2)}/hr`));
162 // icon: semantic glyph (⟳ turn / Σ session / ☾ month). slash: <num>/<type>.
163 const fmt = (n, type, icon, color) =>
164 CONFIG.costStyle === "icon" ? color(`${icon}$${money(n)}`) : color(`$${money(n)}/${type}`);
165 const seg = [];
166 if (turn > 0) seg.push(fmt(turn, "turn", "⟳", c.white));
167 seg.push(fmt(total, "session", "Σ", c.dim));
168 if (month > 0) seg.push(fmt(month, "month", "☾", c.dim));
169 push(seg.join(" "));
170 }
171} catch {}
173// ─── 8. caveman badge (terse) ──────────────────────────────────────────────────
174push(cavemanBadge());
176// ─── 9. extra badges (hooks: workflow, …) ──────────────────────────────────────
177try {
178 const f = path.join(claudeDir, ".cc-statusline-extra");
179 const st = fs.lstatSync(f);
180 if (!st.isSymbolicLink() && st.size <= 4096) {
181 const now = Date.now();
182 for (const line of fs.readFileSync(f, "utf8").split(/\r?\n/)) {
183 const i = line.indexOf("|");
184 if (i <= 0) continue;
185 const ts = Number(line.slice(0, i));
186 if (!Number.isFinite(ts) || now - ts > CONFIG.extraTtlMs) continue;
187 const text = line.slice(i + 1).replace(/[\x00-\x1F]/g, "").slice(0, 60);
188 if (text) push(c.orange(text));
189 }
190 }
191} catch {}
193// ─── emit ──────────────────────────────────────────────────────────────────────
194process.stdout.write(parts.join(CONFIG.sep));
196// ════════════════════════════════════════════════════════════════════════════
197// cost ledger — cross-session month-to-date + per-session turn baseline
198// ════════════════════════════════════════════════════════════════════════════
199function monthKey() {
200 const dt = new Date();
201 return `${dt.getFullYear()}-${String(dt.getMonth() + 1).padStart(2, "0")}`;
202}
204function updateLedger(sid, total) {
205 const file = path.join(claudeDir, ".cc-cost-ledger.json");
206 const now = Date.now();
207 const mk = monthKey();
208 let L = { month: mk, monthTotal: 0, sessions: {} };
209 try {
210 L = JSON.parse(fs.readFileSync(file, "utf8"));
211 } catch {}
212 if (!L.sessions) L.sessions = {};
214 // New month → reset the bucket, KEEP per-session baselines so a session that
215 // straddles midnight only contributes its post-boundary spend.
216 if (L.month !== mk) {
217 L.month = mk;
218 L.monthTotal = 0;
219 }
221 // Prune stale sessions.
222 const cutoff = now - CONFIG.ledgerPruneDays * 864e5;
223 for (const k of Object.keys(L.sessions)) {
224 if ((L.sessions[k]?.ts ?? 0) < cutoff) delete L.sessions[k];
225 }
227 const s = L.sessions[sid] || { total: 0, turnStart: total, ts: now };
229 // Turn boundary: UserPromptSubmit hook drops a marker; first render after a
230 // prompt rebaselines turnStart, then consumes the marker.
231 try {
232 const marker = path.join(claudeDir, `.cc-turn-${sid}`);
233 if (fs.existsSync(marker)) {
234 s.turnStart = total;
235 fs.unlinkSync(marker);
236 }
237 } catch {}
239 // Month bucket gets only the new spend since this session was last seen.
240 const delta = total - (s.total ?? 0);
241 if (delta > 0) L.monthTotal = (L.monthTotal || 0) + delta;
243 const turn = Math.max(0, total - (s.turnStart ?? total));
244 s.total = total;
245 s.ts = now;
247 // Timestamped cost samples for the burn rate. Append, drop anything older than
248 // the window (so idle time falls off instead of dragging the rate down), cap.
249 if (!Array.isArray(s.samples)) s.samples = [];
250 s.samples.push([now, total]);
251 const wcut = now - CONFIG.burnWindowMs;
252 s.samples = s.samples.filter((p) => p[0] >= wcut);
253 if (s.samples.length > CONFIG.burnMaxSamples) s.samples = s.samples.slice(-CONFIG.burnMaxSamples);
254 const burnRate = computeBurnRate(s.samples);
256 L.sessions[sid] = s;
258 try {
259 const tmp = `${file}.${process.pid}.tmp`;
260 fs.writeFileSync(tmp, JSON.stringify(L));
261 fs.renameSync(tmp, file);
262 } catch {}
264 return { turn, month: L.monthTotal || 0, burnRate };
265}
267// ── burn rate ($/hr) ──────────────────────────────────────────────────────────
268// DESIGN KNOB (yours to tune): turn timestamped cost samples into a "right now"
269// $/hr. Default = window endpoints — cheap, robust: spend / span across the kept
270// window. Stale samples are already pruned in updateLedger, so idle time drops
271// out naturally rather than decaying the rate toward zero (the classic
272// cost÷duration bug). Alternatives if you want a different feel:
273// • EWMA over per-sample rates → smoother, slower to react
274// • least-squares slope of (ts,total) → noise-resistant, a few more lines
275function computeBurnRate(samples) {
276 if (!Array.isArray(samples) || samples.length < 2) return 0;
277 const first = samples[0];
278 const last = samples[samples.length - 1];
279 const span = last[0] - first[0];
280 const spend = last[1] - first[1];
281 if (span < CONFIG.burnMinSpanMs || spend <= 0) return 0;
282 return (spend / span) * 3600000; // $/ms → $/hr
283}
285// Compact duration: "2h45m" (minutes zero-padded) above an hour, else "45m".
286function fmtDuration(ms) {
287 const m = Math.floor(ms / 60000);
288 if (m >= 60) return `${Math.floor(m / 60)}h${String(m % 60).padStart(2, "0")}m`;
289 return `${m}m`;
290}
292// ════════════════════════════════════════════════════════════════════════════
293// git / jj
294// ════════════════════════════════════════════════════════════════════════════
295function findRepo(startDir) {
296 try {
297 let dir = startDir && fs.existsSync(startDir) ? startDir : process.cwd();
298 for (let i = 0; i < 40; i++) {
299 if (fs.existsSync(path.join(dir, ".jj"))) return { kind: "jj", root: dir };
300 if (fs.existsSync(path.join(dir, ".git"))) return { kind: "git", root: dir };
301 const up = path.dirname(dir);
302 if (up === dir) break;
303 dir = up;
304 }
305 } catch {}
306 return null;
307}
309function gitOrJjSegment(cwd) {
310 let repo;
311 try {
312 repo = findRepo(cwd);
313 } catch {
314 return "";
315 }
316 if (!repo) return "";
317 const key = crypto.createHash("sha1").update(repo.kind + ":" + repo.root).digest("hex").slice(0, 12);
318 const cacheFile = path.join(os.tmpdir(), `cc-statusline-${key}.json`);
319 try {
320 const o = JSON.parse(fs.readFileSync(cacheFile, "utf8"));
321 if (Date.now() - o.ts < CONFIG.gitCacheTtlMs) return o.text;
322 } catch {}
323 let text = "";
324 try {
325 text = repo.kind === "jj" ? jjSegment(repo.root) : gitSegment(repo.root);
326 } catch {
327 text = "";
328 }
329 try {
330 const tmp = `${cacheFile}.${process.pid}.tmp`;
331 fs.writeFileSync(tmp, JSON.stringify({ ts: Date.now(), text }));
332 fs.renameSync(tmp, cacheFile);
333 } catch {}
334 return text;
335}
337function gitSegment(root) {
338 const out = execFileSync("git", ["-C", root, "status", "--porcelain=v2", "--branch"], {
339 encoding: "utf8",
340 timeout: CONFIG.cmdTimeoutMs,
341 windowsHide: true,
342 });
343 let branch = "?";
344 let ahead = 0;
345 let behind = 0;
346 let dirty = 0;
347 for (const line of out.split(/\r?\n/)) {
348 if (line.startsWith("# branch.head ")) branch = line.slice(14).trim();
349 else if (line.startsWith("# branch.ab ")) {
350 const m = line.match(/\+(\d+)\s+-(\d+)/);
351 if (m) {
352 ahead = +m[1];
353 behind = +m[2];
354 }
355 } else if (line && !line.startsWith("#")) dirty++;
356 }
357 if (branch === "(detached)") branch = "detached";
358 const col = dirty > 0 ? c.yellow : c.green;
359 let s = col(`⎇${branch}`);
360 if (dirty > 0) s += c.yellow(`●${dirty}`);
361 if (ahead) s += c.cyan(`↑${ahead}`);
362 if (behind) s += c.cyan(`↓${behind}`);
363 return s;
364}
366function jjSegment(root) {
367 const tmpl = 'change_id.shortest(8) ++ "|" ++ bookmarks ++ "|" ++ if(empty, "clean", "dirty")';
368 const out = execFileSync(
369 "jj",
370 ["--no-pager", "log", "--no-graph", "--color", "never", "-r", "@", "-T", tmpl],
371 { cwd: root, encoding: "utf8", timeout: CONFIG.cmdTimeoutMs, windowsHide: true }
372 ).trim();
373 const [change = "?", bookmarks = "", state = ""] = out.split("|");
374 const label = bookmarks.trim() || change;
375 const dirty = state.trim() === "dirty";
376 const col = dirty ? c.yellow : c.green;
377 return col(`jj:${label}`) + (dirty ? c.yellow("✗") : "");
378}
380// ════════════════════════════════════════════════════════════════════════════
381// caveman badge — terse: full→"cm", else "cm:<first-letter>"
382// ════════════════════════════════════════════════════════════════════════════
383function cavemanBadge() {
384 try {
385 const flag = path.join(claudeDir, ".caveman-active");
386 const st = fs.lstatSync(flag);
387 if (st.isSymbolicLink() || st.size > 64) return "";
388 let mode = (fs.readFileSync(flag, "utf8").split(/\r?\n/)[0] ?? "")
389 .trim()
390 .toLowerCase()
391 .replace(/[^a-z0-9-]/g, "");
392 const valid = new Set([
393 "off", "lite", "full", "ultra",
394 "wenyan-lite", "wenyan", "wenyan-full", "wenyan-ultra",
395 "commit", "review", "compress",
396 ]);
397 if (!valid.has(mode) || mode === "off") return "";
398 let out = c.orange(mode || "full");
399 if (process.env.CAVEMAN_STATUSLINE_SAVINGS !== "0") {
400 try {
401 const sf = path.join(claudeDir, ".caveman-statusline-suffix");
402 const sst = fs.lstatSync(sf);
403 if (!sst.isSymbolicLink() && sst.size <= 64) {
404 const sv = fs.readFileSync(sf, "utf8").replace(/[\x00-\x1F]/g, "").trimEnd();
405 if (sv) out += " " + c.orange(sv);
406 }
407 } catch {}
408 }
409 return out;
410 } catch {
411 return "";
412 }
413}

codex/auth.json

Added
new file mode 100644

Binary size (old → new): 0 → 5065 bytes.

wsl.symlinks

Modified

+21 / −0 text lines

5555mise
5656~/.config/mise
58claude/.credentials.json
59~/.claude/.credentials.json
61claude/settings.json
62~/.claude/settings.json
64claude/statusline.js
65~/.claude/statusline.js
67claude/cc-statusline-hook.js
68~/.claude/cc-statusline-hook.js
70claude/CLAUDE.md
71~/.claude/CLAUDE.md
73claude/RTK.md
74~/.claude/RTK.md
76codex/auth.json
77~/.codex/auth.json