Adds a "Integration Example: AIWatch" section to docs/USAGE.md mirroring
the existing ccusage section, plus a Related Projects link in README, per
the placement the maintainer chose in #362.
AIWatch (ai-watch.dev) monitors live status for 30+ AI APIs/apps; the
Custom Command one-liner surfaces degraded providers in the status line
and renders empty when everything's operational.
Co-authored-by: Bentley <bentley@naemomlab.com>
* feat: Add Skills widget with cross-platform hook framework
Replaces bash/jq hook with a built-in --hook CLI handler that works
on all platforms. Widgets can declare hooks via getHooks() which are
auto-synced to Claude settings when the statusline config is saved.
* feat: tighten hook lifecycle and upgrade skills widget
Notes:\n- Hook sync now follows saved-state semantics: installing statusline syncs hooks from saved ccstatusline settings on disk, and uninstall always removes all ccstatusline-managed hooks.\n- syncWidgetHooks always strips managed hooks first, including when statusline.command is missing, then persists cleanup.\n- Skills metrics storage path is now ~/.cache/ccstatusline/skills/skills-<sessionId>.jsonl.\n- Skills unique list ordering is now most-recent-first.\n- Skills widget updates: view toggle on (v), hide-when-empty toggle on (h), explicit empty outputs when not hidden, and new list-only (l)imit editor option where 0 means unlimited (default).\n- Added list-limit custom editor flow and list-only keybind visibility in ItemsEditor.\n- Maintained Node 14 compatibility by avoiding Array.prototype.at in skills metrics parsing.\n- Added/updated regression tests for hook sync/install/uninstall behavior, skills metrics path/order, Skills widget rendering/editing, and items-editor custom keybind handling.
* chore: bump version to 2.2.1 and update release notes
---------
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
* fix: support bare repo worktrees in GitWorktree widget
The GitWorktree widget now correctly detects worktrees from bare
repositories. Previously, it only checked for `.git/worktrees/` in
the path, but bare repos store worktree metadata at
`<bare-repo>/worktrees/<name>` without the `.git` prefix.
This adds an additional check for `/worktrees/` pattern when the
`.git/worktrees/` pattern isn't found.
Fixes detection for setups like:
- Bare repo at: /path/to/repo (contains objects/, refs/, HEAD, etc.)
- Worktree at: /path/to/repo/trees/feature-x
- Git dir: /path/to/repo/worktrees/feature-x
* chore: remove accidental npm lockfile from PR branch
* chore: bump version to 2.1.10 and update recent updates
---------
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
* Add --config flag for custom settings file path
Allow users to specify an alternative settings file via `--config <path>`,
enabling distinct status line configs for different Claude Code instances.
- Add initConfigPath/getConfigPath/isCustomConfigPath to config.ts
- Fix backup path to always append .bak instead of replacing .json suffix
- Use path.dirname(SETTINGS_PATH) instead of CONFIG_DIR for mkdir
- Parse --config arg in ccstatusline.ts main() entry point
- Add tests for config path management
* Integrate --config flag with Claude Code install commands
When a custom config path is active, the install-to-Claude-Code feature
now appends --config <path> to the status line command. Also updates
isInstalled detection to recognize commands with the --config suffix.
- Add isKnownCommand() to deduplicate command-matching logic
- Add shell-safe path quoting for --config values with spaces/special chars
- Add buildCommand() to append --config when custom path is active
- Refactor isInstalled() to use isKnownCommand()
- Use isKnownCommand() in App.tsx install flow
- Add tests for isKnownCommand() and buildCommand() with CLAUDE_CONFIG_DIR safety net
* Show custom config path in TUI header
When a custom --config path is active, display it below the title bar
so users can see which settings file is being edited.
* fix: use platform-appropriate quoting for --config path
* chore: bump version to 2.1.8 and update recent updates
---------
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
Handle [1M], (1M), and optional context labels when inferring model context size; use model id + display_name in context widgets and add regression coverage for ctx, ctx(u), and context bar.
Closes#193
- add a new Link widget with OSC8 rendering, preview parity, and raw mode behavior
- fix truncation and visible-width calculation to handle ANSI/OSC sequences safely
- bump package version to 2.1.3
- update README recent updates and widget documentation
Resolves#188
* FreeMemory widget:
Description: Shows system memory usage (used/total) in a compact format like Mem: 12.4G/16.0G
Features:
- On macOS: Uses vm_stat to calculate memory like htop (Active + Wired pages)
- On other platforms: Falls back to Node.js os.freemem()/os.totalmem()
- Smart byte formatting (G, M, K, B)
- Supports raw value mode (omits "Mem:" prefix)
- Default color: cyan
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Version bump and README update
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
* Add Session Name widget
Adds a native widget to display the Claude Code session name set via the
/rename command. The widget reads the transcript file and extracts the
customTitle from custom-title entries.
- New SessionName widget with rawValue support
- 9 unit tests
- README documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: add category metadata to session name widget
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
* Fix: Dynamic context window calculation for Sonnet 4.5 (1M tokens)
- Create model-context utility with dynamic context window mapping
- Sonnet 4.5 models now use 1M context (800k usable)
- Older models default to 200k context (160k usable)
- Update ContextPercentage and ContextPercentageUsable widgets
- Update renderer.ts flex mode calculations (2 locations)
- Add comprehensive test coverage (14 new tests, 36 total passing)
Fixes incorrect percentage display for Sonnet 4.5:
- Before: 42k tokens showed 21.0% (using 200k denominator)
- After: 42k tokens shows 4.2% (using 1M denominator)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Style: Apply ESLint auto-fixes for consistency
- Standardize indentation to 4 spaces
- Apply formatting rules from eslint.config.js
- No logic changes, formatting only
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Refactor: Code review fixes for context window changes
- Fix misleading test name (line 69 of context-percentage.test.ts)
- Strengthen model ID pattern matching (claude-sonnet-4-5 vs sonnet-4-5)
- Standardize export style (inline export for consistency)
All tests passing (19/19 for affected files)
TypeScript and ESLint checks passed
* Enhance CLAUDE.md: Update piped input example for Sonnet 4.5 and add test commands
- Changed piped input example to reflect the new model ID for Claude 4.5
- Added instructions for running tests and tests in watch mode
- Updated context window metrics description to include dynamic model-based context windows
Improves clarity and usability for developers working with the project.
* Fix: Require [1m] suffix for Sonnet 4.5 1M context window detection
Address PR feedback that Sonnet 4.5 only has 1M context on API usage
when the model ID includes the [1m] suffix (long context beta access).
Changes:
- Update getContextConfig() to check for [1m] suffix (case-insensitive)
- Models without suffix now safely default to 200K context
- Add comprehensive test coverage for suffix detection
- Update all test fixtures to use correct model ID format
- Document suffix requirement in CLAUDE.md
This ensures conservative behavior - only models with explicit [1m]
suffix receive 1M context allocation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* chore: automatic change from linting
* feat: support CLAUDE_CONFIG_DIR on utilities
* feat: support CLAUDE_CONFIG_DIR from the main app UI
* fix: reduce duplication and handle installation using new constants
* feat: missed one place using hardcoded path
* chore: update CLAUDE.md
* docs: Update README