/claude-hud:setup command configures Claude HUD as your statusline. It detects your platform, shell, and runtime; locates the plugin; generates the correct command; writes it to ~/.claude/settings.json; and optionally enables extra display features.
After setup writes the config, you must restart Claude Code for the statusLine to take effect. Quit and run
claude again in your terminal, then re-run /claude-hud:setup to complete the verification step.What gets written
Setup merges the following into~/.claude/settings.json, preserving all existing settings:
Setup flow
Detect ghost installation
Before anything else, setup checks for an inconsistent plugin state that can occur after a failed or interrupted installation.A ghost installation is a mismatch between the plugin cache and the registry:
If temp files from an interrupted install exist under If a ghost installation is detected, clean it up:After cleanup, restart Claude Code and reinstall via If the output is
| Cache | Registry | Meaning | Action |
|---|---|---|---|
| Present | Present | Normal (may still be broken) | Continue |
| Present | Missing | Ghost — cache orphaned | Clean up cache |
| Missing | Present | Ghost — registry stale | Clean up registry |
| Missing | Missing | Not installed | Continue |
~/.claude/plugins/cache/temp_local_*, those are cleaned up too.- macOS / Linux
- Windows (PowerShell)
/plugin install claude-hud.Linux: cross-device filesystem issue
To check whether your system is affected:CROSS_DEVICE, use the TMPDIR workaround above.Detect platform, shell, and runtime
Setup reads the environment context (
If neither
Platform: and Shell:) to determine which command format to generate.| Platform | Shell | Format |
|---|---|---|
darwin | any | bash (macOS) |
linux | any | bash (Linux) |
win32 | bash (Git Bash, MSYS2) | bash (same as macOS/Linux) |
win32 | powershell, pwsh, or cmd | PowerShell |
- macOS / Linux
- Windows (PowerShell)
-
Find the plugin installation path (sorted by version, not modification time):
-
Find the runtime (bun preferred for performance, node as fallback):
-
Determine the source file — if the runtime is
bun, usesrc/index.ts(native TypeScript support); otherwise usedist/index.js(pre-compiled). -
The generated command uses dynamic version detection so it always runs the latest installed version:
bun nor node is found, install Node.js or Bun before continuing.Test the generated command
Setup runs the generated command to verify it produces output within a few seconds. This catches broken runtime binaries, missing plugins, or path problems before writing anything to
settings.json.If the command errors or hangs, setup stops here and does not proceed to write the config.Write statusLine config
Setup reads If
~/.claude/settings.json, merges in the statusLine block, and writes it back — preserving all existing settings.- macOS / Linux
- Windows (PowerShell)
Config path:
${CLAUDE_CONFIG_DIR:-$HOME/.claude}/settings.jsonsettings.json does not exist, it is created. If it contains invalid JSON, setup reports the error and does not overwrite.After this step, restart Claude Code — quit and run
claude again in your terminal. The HUD cannot appear in the same session where setup was run. Once restarted, re-run /claude-hud:setup to continue to the optional features step and verify the HUD is working.Enable optional features
After the statusLine is applied, setup offers opt-in display features. All are hidden by default.
Selected options are written to
| Feature | What it shows | Config key |
|---|---|---|
| Tools activity | ◐ Edit: file.ts | ✓ Read ×3 | display.showTools: true |
| Agents & Todos | Subagent status and todo progress | display.showAgents: true, display.showTodos: true |
| Session info | Session duration and config counts (CLAUDE.md, rules, MCPs) | display.showDuration: true, display.showConfigCounts: true |
| Session name | Session slug or custom title from /rename | display.showSessionName: true |
| Custom line | A custom phrase of your choice (max 80 chars) | display.customLine: "<your text>" |
~/.claude/plugins/claude-hud/config.json. Only enabled keys are written — unselected items are left to their defaults.Verify the HUD is working
Setup confirms you have restarted Claude Code, then asks whether the HUD is visible below the input field.If the HUD is not appearing, work through the following:
-
Restart Claude Code — this is the most common cause. Quit completely and run
claudeagain. -
Verify the config was applied — read
~/.claude/settings.jsonand confirmstatusLine.commandis present and correct. A stale config with a hardcoded version path (rather than the dynamic lookup command) indicates a previous setup run. -
Test the command manually and capture any error output:
-
Common issues:
command not foundor empty output — the runtime path may be stale (common with mise/nvm/asdf after a version update). Re-detect withcommand -v bunorcommand -v node, and resolve symlinks withrealpathorreadlink -f.No such file or directoryfor the plugin — the plugin may not be installed. Reinstall via/plugin install claude-hud.- Windows shell mismatch — the command format does not match the detected shell. Re-run the detection step.
- Windows PowerShell execution policy error — run
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned. - Permission denied — the runtime may not be executable:
chmod +x <runtime path>. - WSL confusion — if using WSL, ensure the plugin is installed in the Linux environment (
~/.claude/plugins/...), not the Windows side.