* fix: detect terminal width via stderr when stdout is piped
When Claude Code runs the statusLine as a subprocess, stdout is captured
(piped), so process.stdout.columns is undefined. With no terminal width,
long lines aren't wrapped by the HUD — the terminal wraps them silently
instead. Claude Code counts \n characters to determine how many lines to
erase on the next render, so the physical line count diverges from what
Claude Code expects. Over successive renders the cursor drifts upward into
the scrollback buffer, causing the terminal to jump to the top on every
tool execution (https://github.com/jarrodwatts/claude-hud/issues/209).
Fix: fall back to process.stderr.columns before the COLUMNS env var.
When the statusLine subprocess is spawned, only stdout is redirected;
stderr remains connected to the real TTY and returns the correct width.
With accurate width, lines are properly wrapped in the HUD output and
Claude Code's line count stays consistent.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: drop dist artifacts and cover stderr width
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jarrod Watts <jarrod@cubelabs.xyz>
* 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>
* feat: show API billing indicator in model badge
When ANTHROPIC_API_KEY is present in the environment, display
[Opus | API] in red instead of [Opus | Max]. This helps users
who manage both Max plan and API key access (e.g., work vs personal)
immediately see when they're running on API billing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Bump marketplace version to 0.0.7
---------
Co-authored-by: Fielding Johnston <fielding@justfielding.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Claude Code natively displays "X% left to autocompact" making the HUD's
COMPACT warning redundant. The context bar already turns red at high
usage to visually indicate critical state.
Closes#26🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* security: remove dist/ from git tracking (Phase 2)
Completes the security hardening started in Phase 1.
Changes:
- Add dist/ to .gitignore
- Remove dist/ from git tracking (48 files)
- Remove husky pre-commit hook (no longer needed)
CI will immediately rebuild and commit dist/ after this merges.
Installation flow remains unbroken.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs: clarify dist/ gitignore comment
* chore: bump version to 0.0.2 and update docs
- Update version to 0.0.2 in package.json, plugin.json, marketplace.json
- Update CHANGELOG.md with all changes since 0.0.1
- Document release process and plugin update mechanism in CONTRIBUTING.md
🤖 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>
The previous installation command didn't work because Claude Code
plugins require a marketplace manifest. This adds the marketplace.json
and updates install instructions to the correct two-step flow:
1. /plugin marketplace add jarrodwatts/claude-hud
2. /plugin install claude-hud@claude-hud
Also commits dist/ for plugin distribution since users can't run
npm build when installing via marketplace.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>