repo_description: A Claude Code plugin that shows what's happening - context usage, active tools, running agents, and todo progress
repo_topics: anthropic claude claude-code cli plugin statusline typescript
code: import * as path from 'node:path';
  
  function expandHomeDirPrefix(inputPath: string, homeDir: string): string {
    if (inputPath === '~') {
      return homeDir;
    }
    if (inputPath.startsWith('~/') || inputPath.startsWith('~\\')) {
      return path.join(homeDir, inputPath.slice(2));
    }
    return inputPath;
  }
  
  export function getClaudeConfigDir(homeDir: string): string {
    const envConfigDir = process.env.CLAUDE_CONFIG_DIR?.trim();
    if (!envConfigDir) {
      return path.join(homeDir, '.claude');
    }
    return path.resolve(expandHomeDirPrefix(envConfigDir, homeDir));
  }
  
  export function getClaudeConfigJsonPath(homeDir: string): string {
    return `${getClaudeConfigDir(homeDir)}.json`;
  }
  
  export function getHudPluginDir(homeDir: string): string {
    return path.join(getClaudeConfigDir(homeDir), 'plugins', 'claude-hud');
  }
  