Commit Graph

21 Commits

Author SHA1 Message Date
Xy
cb407d0534 feat: add customLine display support (#223)
Add a static `display.customLine` config field that renders a user-defined
phrase (max 80 chars) in Claude orange on the project line, joined with
the standard │ separator.

- config.ts: add customLine to HudConfig.display with validation
- colors.ts: add claudeOrange() using 256-color (38;5;208)
- project.ts: append customLine to expanded mode project line
- session-line.ts: append customLine to compact mode parts
- setup.md: add "Custom line" option to Step 4
- configure.md: add Q5 Custom Line to both Flow A and Flow B
2026-03-20 11:52:29 +11:00
Abhishek Tiwari
faacda01ee fix: hud not appearing after setup without restart (#213) (#250)
* fix: detect macOS and show restart hint when HUD initializes without stdin (closes #213)

* fix: prompt user to restart Claude Code after config write for HUD setup

* fix: update assertion to check if output starts with initializing message

* Align restart messaging in docs

---------

Co-authored-by: Jarrod Watts <jarrod@cubelabs.xyz>
2026-03-20 11:45:33 +11:00
Kuo-Hao Huang
618ae8deb2 fix(setup): respect CLAUDE_CONFIG_DIR when detecting and configuring plugin (#247)
Users running Claude Code with a custom config directory (e.g.
CLAUDE_CONFIG_DIR=~/.claude-work) had the plugin installed to that
directory, but /claude-hud:setup always looked in the hardcoded
~/.claude path, causing it to report the plugin as not installed.

Replace all hardcoded ~/.claude/ references with
${CLAUDE_CONFIG_DIR:-$HOME/.claude} so that setup correctly resolves
the plugin cache, settings.json, and config.json under whatever config
directory Claude Code is using.

Also fix glob-inside-quotes bug in the temp_local_* cleanup commands
(quotes prevented wildcard expansion).

Co-authored-by: dennis <dennis@brevitydata.net>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 11:43:27 +11:00
ruohan.chen
b99ae79764 fix: use version-based sorting instead of mtime for plugin selection (#199)
* fix: use version-based sorting instead of mtime for plugin selection

The statusline command used `ls -td` (sort by modification time) to
select the latest plugin version from the cache directory. When multiple
versions coexist after an upgrade, the older version can have a newer
mtime, causing the statusline to run the wrong version.

This led to a real issue where v0.0.7 (no proxy support) was selected
over v0.0.9, causing persistent 403 errors on the usage API for users
behind a required proxy.

Replace `ls -td | head -1` with `ls -d | sort -V | tail -1` to sort
by version number. Apply the equivalent fix for Windows PowerShell
using `[version]` casting.

Fixes #198

* docs: make setup version lookup portable

* docs: avoid login shell in setup command

---------

Co-authored-by: Jarrod Watts <jarrod@cubelabs.xyz>
2026-03-14 11:00:37 +11:00
myaiexp
5467f29e50 feat(config): add showSessionName toggle (default off) (#170)
* feat(config): add showSessionName toggle (default off)

Session name display from #155 is now opt-in via display.showSessionName
config. This addresses user feedback requesting the ability to hide the
session name. Added to setup onboarding and configure command flows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test(docs): cover session-name default behavior

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Jarrod Watts <jarrod@cubelabs.xyz>
2026-03-06 10:44:05 +11:00
Jarrod Watts
a47f5b7905 fix: address Windows setup, Bedrock labels, and usage API reliability (#164)
* docs(setup): handle win32 bash vs powershell command paths

* fix(stdin): normalize bedrock model ids when display_name is missing

* fix(usage): harden proxy oauth fallback and timeout handling
2026-03-05 18:32:44 +11:00
Jarrod Watts
ffef15fc33 feat: redesign default layout to clean 2-line display (#112)
New default: model+project on line 1, context+usage bars combined on line 2.
All optional features (tools, agents, todos) hidden by default with
setup onboarding step to enable them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 13:17:23 +11:00
Jarrod Watts
f851ecc745 fix(setup): use Platform context instead of uname for detection (#95)
The Bash tool on Windows uses Git Bash as its interpreter, so `uname -s`
returns MINGW even when the user launched Claude Code from PowerShell.
This caused setup to generate bash commands that fail in PowerShell.

Fix: Instruct Claude to use the Platform value from its environment
context (darwin/linux/win32) instead of running uname. This correctly
identifies the user's actual platform regardless of the Bash tool's
environment.

- darwin → bash commands (macOS)
- linux → bash commands (all distros: Ubuntu, NixOS, Arch, etc.)
- win32 → PowerShell commands (works on PowerShell, cmd.exe, Git Bash)

Fixes #90

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 16:30:10 +11:00
Jarrod Watts
e25ed0bd9f fix: add ghost installation detection and cleanup to setup (#75)
Failed or interrupted plugin installations can leave inconsistent state:
- Cache exists but not in registry (orphaned)
- Registry entry exists but no cache (stale)
- temp_local_* files left from interrupted installs

New Step 0 in setup.md:
- Detects cache/registry mismatch
- Finds leftover temp files
- Provides cleanup commands for macOS/Linux/Windows
- Includes EXDEV check for Linux (consolidated from Step 1)

Also consolidates EXDEV detection into Step 0 instead of buried in Step 1.

Fixes #59, #62, #60

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 11:50:53 +11:00
Jarrod Watts
4bf43b01f7 fix: detect EXDEV cross-device error on Linux installation (#53)
* fix: detect EXDEV cross-device error on Linux installation

When plugin path is not found during setup on Linux, check if /tmp and
~/.claude are on different filesystems. If so, provide the TMPDIR
workaround to users.

Fixes #52

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 21:23:50 +11:00
Jarrod Watts
a031e9f92a docs: retry settings write on modification (#41) 2026-01-07 10:51:16 +11:00
Jarrod Watts
e4853700d9 feat(setup): dynamic platform and runtime detection (#24)
* feat(setup): dynamic platform and runtime detection

- Detect macOS/Linux/Windows and generate appropriate command
- Use absolute runtime path (fixes PATH issues with mise/nvm)
- Prefer bun when available for faster startup
- Add user verification step with debugging if setup fails
- Keep dynamic plugin path lookup for automatic updates

Addresses: #5, #11, PR #19, PR #22

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: address review feedback for robust cross-platform support

- Use `command -v` instead of `which` (POSIX compliant)
- Add runtime path validation step
- Add Windows bun support with proper detection
- Use `Join-Path` for Windows path handling
- Add WSL-specific guidance
- Add PowerShell execution policy troubleshooting
- Add expected execution time (1 second)
- Include asdf in version manager list

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: address minor review feedback

- Add placeholder substitution note at top
- Use basename for more robust bun detection
- Clarify GitHub star prompt

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: harden edge case handling

- Add plugin path validation for both platforms
- Windows: explicit error if neither bun nor node found
- Windows: quote runtime path to handle spaces in paths
- Windows: use full cmdlet names (Sort-Object, Get-ChildItem) for clarity
- Add note that Step 2 test catches broken binaries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(setup): address code review feedback

- Fix MINGW/MSYS/CYGWIN detection: Git Bash users now handled correctly
- Add quotes around runtime path to handle spaces in paths
- Add Windows-specific settings.json path guidance
- Clarify Step 3 JSON merge edge cases (missing file, invalid JSON)
- Document bun's native TypeScript support
- Add auto-update documentation note
- Add symlink troubleshooting for version managers
- Add stale config detection in debugging section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs(setup): address additional code review feedback

- Add explicit Git Bash/MSYS2/Cygwin user guidance
- Change test timeout from "1 second" to "a few seconds"
- Add readlink -f as alternative to realpath
- Add note about re-running setup if HUD stops working
- Check gh CLI availability before star suggestion

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 11:25:55 +11:00
Jarrod Watts
82a24e3691 style: add star emoji 2026-01-03 23:59:30 +11:00
Jarrod Watts
eaef8dd9a0 fix: use gh api for starring (more compatible)
gh repo star doesn't exist in all gh versions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:58:16 +11:00
Jarrod Watts
798eabdac7 feat: ask for star after successful setup
Only runs if user explicitly agrees

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:55:37 +11:00
Jarrod Watts
3076489a2b feat: inline command for automatic version detection
Uses time-sorted ls to find latest version - no external scripts needed.
Works on all macOS/Linux versions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:42:40 +11:00
Jarrod Watts
383d98ab88 fix: use actual plugin path instead of fake variable
${CLAUDE_PLUGIN_ROOT} doesn't exist - setup now finds the real installed path

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:24:31 +11:00
Jarrod Watts
2a36974ab4 fix: stronger instructions to preserve CLAUDE_PLUGIN_ROOT literal
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:13:17 +11:00
Jarrod Watts
682d1a8414 fix: clarify no restart needed after setup
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:09:29 +11:00
Jarrod Watts
5854d40f98 fix: use literal CLAUDE_PLUGIN_ROOT and set version 0.0.1
- setup.md now explicitly instructs to use the variable, not resolve it
- Version updated to 0.0.1 for initial release

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 23:05:22 +11:00
Jarrod Watts
bfe6f2be39 fix: move commands to root level for discovery
Commands must be at the plugin root, not inside .claude-plugin/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 22:56:40 +11:00