Loading...
Loading...
Configure HUD display options (layout, presets, display elements)
npx skill4agent add yeachan-heo/oh-my-claudecode hud~/.claude/...CLAUDE_CONFIG_DIR| Command | Description |
|---|---|
| Show current HUD status (auto-setup if needed) |
| Install/repair HUD statusline |
| Switch to minimal display |
| Switch to focused display (default) |
| Switch to full display |
| Show detailed HUD status |
/oh-my-claudecode:hud/oh-my-claudecode:hud setup~/.claude/hud/omc-hud.mjsstatusLine~/.claude/settings.jsonsetup~/.claude/hud/omc-hud.mjsls ~/.claude/hud/omc-hud.mjs 2>/dev/null && echo "EXISTS" || echo "MISSING"PLUGIN_VERSION=$(ls ~/.claude/plugins/cache/omc/oh-my-claudecode/ 2>/dev/null | sort -V | tail -1)
if [ -n "$PLUGIN_VERSION" ]; then
ls ~/.claude/plugins/cache/omc/oh-my-claudecode/$PLUGIN_VERSION/dist/hud/index.js 2>/dev/null && echo "READY" || echo "NOT_FOUND - try reinstalling: /plugin install oh-my-claudecode"
else
echo "Plugin not installed - run: /plugin install oh-my-claudecode"
fisetupmkdir -p ~/.claude/hud~/.claude/hud/omc-hud.mjs#!/usr/bin/env node
/**
* OMC HUD - Statusline Script
* Wrapper that imports from plugin cache or development paths
*/
import { existsSync, readdirSync } from "node:fs";
import { homedir } from "node:os";
import { join } from "node:path";
import { pathToFileURL } from "node:url";
// Semantic version comparison: returns negative if a < b, positive if a > b, 0 if equal
function semverCompare(a, b) {
// Use parseInt to handle pre-release suffixes (e.g. "0-beta" -> 0)
const pa = a.replace(/^v/, "").split(".").map(s => parseInt(s, 10) || 0);
const pb = b.replace(/^v/, "").split(".").map(s => parseInt(s, 10) || 0);
for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
const na = pa[i] || 0;
const nb = pb[i] || 0;
if (na !== nb) return na - nb;
}
// If numeric parts equal, non-pre-release > pre-release
const aHasPre = /-/.test(a);
const bHasPre = /-/.test(b);
if (aHasPre && !bHasPre) return -1;
if (!aHasPre && bHasPre) return 1;
return 0;
}
async function main() {
const home = homedir();
let pluginCacheDir = null;
// 1. Try plugin cache first (marketplace: omc, plugin: oh-my-claudecode)
const pluginCacheBase = join(home, ".claude/plugins/cache/omc/oh-my-claudecode");
if (existsSync(pluginCacheBase)) {
try {
const versions = readdirSync(pluginCacheBase);
if (versions.length > 0) {
const latestVersion = versions.sort(semverCompare).reverse()[0];
pluginCacheDir = join(pluginCacheBase, latestVersion);
const pluginPath = join(pluginCacheDir, "dist/hud/index.js");
if (existsSync(pluginPath)) {
await import(pathToFileURL(pluginPath).href);
return;
}
}
} catch { /* continue */ }
}
// 2. Development paths
const devPaths = [
join(home, "Workspace/oh-my-claude-sisyphus/dist/hud/index.js"),
join(home, "workspace/oh-my-claude-sisyphus/dist/hud/index.js"),
join(home, "Workspace/oh-my-claudecode/dist/hud/index.js"),
join(home, "workspace/oh-my-claudecode/dist/hud/index.js"),
];
for (const devPath of devPaths) {
if (existsSync(devPath)) {
try {
await import(pathToFileURL(devPath).href);
return;
} catch { /* continue */ }
}
}
// 3. Fallback - HUD not found (provide actionable error message)
if (pluginCacheDir) {
console.log(`[OMC] HUD not built. Run: cd "${pluginCacheDir}" && npm install`);
} else {
console.log("[OMC] Plugin not found. Run: /oh-my-claudecode:omc-setup");
}
}
main();chmod +x ~/.claude/hud/omc-hud.mjs~/.claude/settings.jsonstatusLine~~node -e "const p=require('path').join(require('os').homedir(),'.claude','hud','omc-hud.mjs');console.log(JSON.stringify(p))"statusLine{
"statusLine": {
"type": "command",
"command": "node /home/username/.claude/hud/omc-hud.mjs"
}
}{
"statusLine": {
"type": "command",
"command": "node C:\\Users\\username\\.claude\\hud\\omc-hud.mjs"
}
}rm -f ~/.claude/hud/sisyphus-hud.mjs 2>/dev/null[OMC] ralph | ultrawork | todos:2/5[OMC] ralph:3/10 | US-002 | ultrawork skill:planner | ctx:67% | agents:2 | bg:3/5 | todos:2/5[OMC] ralph:3/10 | US-002 (2/5) | ultrawork | ctx:[████░░]67% | agents:3 | bg:3/5 | todos:2/5
├─ O architect 2m analyzing architecture patterns...
├─ e explore 45s searching for test files
└─ s executor 1m implementing validation logic├─└─| Element | Description |
|---|---|
| Mode identifier |
| Ralph loop iteration/max |
| Current PRD story ID |
| Active mode badge |
| Last activated skill (cyan) |
| Context window usage |
| Running subagent count |
| Background task slots |
| Todo completion |
~/.claude/.omc/hud-config.json{
"preset": "focused",
"elements": {
"omcLabel": true,
"ralph": true,
"prdStory": true,
"activeSkills": true,
"lastSkill": true,
"contextBar": true,
"agents": true,
"backgroundTasks": true,
"todos": true,
"showCache": true,
"showCost": true,
"maxOutputLines": 4
},
"thresholds": {
"contextWarning": 70,
"contextCritical": 85,
"ralphWarning": 7
}
}/oh-my-claudecode:hud setup/oh-my-claudecode:doctor~/.claude/hud/omc-hud.mjs~/.claude/settings.jsonstatusLine