{"id":30344425,"url":"https://github.com/dkmaker/claudecode-statusline","last_synced_at":"2025-08-18T12:39:51.766Z","repository":{"id":309699205,"uuid":"1036018269","full_name":"dkmaker/ClaudeCode-Statusline","owner":"dkmaker","description":"🎨 A professional, feature-rich statusline for Claude Code with automatic update notifications, smart logging, and beautiful visual indicators","archived":false,"fork":false,"pushed_at":"2025-08-13T09:03:09.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-13T11:14:19.258Z","etag":null,"topics":["anthropic","claude-ai","claude-code","developer-tools","status-bar","statusline"],"latest_commit_sha":null,"homepage":"https://github.com/dkmaker/ClaudeCode-Statusline","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dkmaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-11T12:44:10.000Z","updated_at":"2025-08-13T09:03:13.000Z","dependencies_parsed_at":"2025-08-13T11:14:22.416Z","dependency_job_id":null,"html_url":"https://github.com/dkmaker/ClaudeCode-Statusline","commit_stats":null,"previous_names":["dkmaker/claudecode-statusline"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dkmaker/ClaudeCode-Statusline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkmaker%2FClaudeCode-Statusline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkmaker%2FClaudeCode-Statusline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkmaker%2FClaudeCode-Statusline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkmaker%2FClaudeCode-Statusline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkmaker","download_url":"https://codeload.github.com/dkmaker/ClaudeCode-Statusline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkmaker%2FClaudeCode-Statusline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270996001,"owners_count":24681931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","claude-ai","claude-code","developer-tools","status-bar","statusline"],"created_at":"2025-08-18T12:39:50.949Z","updated_at":"2025-08-18T12:39:51.754Z","avatar_url":"https://github.com/dkmaker.png","language":"Shell","readme":"# ClaudeCode Statusline (ccstatusline)\n\nA professional, feature-rich status line script for Claude Code that provides real-time information about your development environment with automatic update notifications, intelligent logging, and beautiful visual indicators.\n\n![Version](https://img.shields.io/badge/version-1.0.1-blue)\n![License](https://img.shields.io/badge/license-MIT-green)\n![Bash](https://img.shields.io/badge/bash-%3E%3D4.0-orange)\n\n## ✨ Features\n\n- 🤖 **Model Display** - Shows current AI model with color coding\n- 📦 **Version Tracking** - Displays Claude Code version with automatic update checks\n- 🔄 **Update Notifications** - Hourly checks for new versions with visual indicators\n- 📁 **Smart Path Display** - Color-coded directory indicators (green for root, red for subdirectories)\n- 🎨 **Beautiful Colors** - Full ANSI color support with NO_COLOR environment variable respect\n- 📊 **Three-Level Logging** - Error, Info, and Debug levels with automatic log rotation\n- 🐛 **Debug Mode** - Visual debug indicator with comprehensive logging\n- 🔒 **Security First** - Safe JSON parsing, atomic file operations, no command injection\n- 🌍 **Cross-Platform** - Works on Linux, macOS, and BSD systems\n- ⚡ **High Performance** - Optimized with pure bash operations, minimal subprocesses\n\n## 📸 Screenshots\n\n### Normal Mode\n```\n🤖 Opus 4.1 * 1.0.72 📁 Project root\n```\n\n### Update Available\n```\n🤖 Sonnet 4 * 1.0.72 🔄 1.0.75 📂 src/components\n```\n\n### Debug Mode\n```\n🐛 DEBUG 🤖 Haiku * 1.0.72 📂 level1/level2\n```\n\n## 🚀 Installation\n\n### Prerequisites\n\n- **Bash 4.0+** - Required for advanced features\n- **npm** (optional) - For automatic version checking\n- **Claude Code** - The script is designed specifically for Claude Code\n\n### Platform Support\n\n- ✅ **Linux** - Fully supported\n- ✅ **macOS** - Fully supported  \n- ✅ **Windows (WSL2)** - Works in Windows Subsystem for Linux 2\n- ❌ **Windows (Native)** - NOT supported (requires bash environment)\n\n### Quick Install (One-liner) 🚀\n\n\u003e ⚠️ **EARLY TEST VERSION - USE AT YOUR OWN RISK**\n\nRun this single command to automatically install Claude StatusLine:\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/dkmaker/ClaudeCode-Statusline/main/assets/install.sh | bash\n```\n\nThe installer will:\n- ✅ Check all prerequisites (Bash 4.0+, Claude Code, npm)\n- ✅ Download and install the statusline script\n- ✅ Make it executable automatically\n- ✅ Update your Claude Code settings\n- ❌ Fail safely if statusline already exists\n\n### Manual Install\n\n1. **Copy the script to your Claude directory:**\n```bash\n# Create the .claude directory if it doesn't exist\nmkdir -p ~/.claude\n\n# Download the statusline script\ncurl -o ~/.claude/ccstatusline.sh https://raw.githubusercontent.com/dkmaker/ClaudeCode-Statusline/main/ccstatusline.sh\n\n# Make it executable\nchmod +x ~/.claude/ccstatusline.sh\n```\n\n2. **Configure Claude Code:**\n\nEdit your `~/.claude/settings.json` file:\n\n```json\n{\n  \"statusLine\": {\n    \"type\": \"command\",\n    \"command\": \"~/.claude/ccstatusline.sh\"\n  }\n}\n```\n\nOr with debug mode enabled:\n\n```json\n{\n  \"statusLine\": {\n    \"type\": \"command\",\n    \"command\": \"~/.claude/ccstatusline.sh --loglevel debug\"\n  }\n}\n```\n\n3. **Restart Claude Code** to see your new status line!\n\n### Alternative: Use Claude Code's Built-in Setup\n\nSimply run `/statusline` in Claude Code and follow the interactive setup.\n\n## 📖 Usage\n\n### Basic Usage\n\nThe script runs automatically when configured in Claude Code settings. No manual intervention needed!\n\n### Command Line Options\n\n```bash\nThe script runs automatically via Claude Code. To test manually:\n\n```bash\n# Test with mock JSON input\necho '{\"model\":{\"display_name\":\"Test\"},\"workspace\":{\"current_dir\":\"/test\",\"project_dir\":\"/test\"},\"version\":\"1.0.0\"}' | ~/.claude/ccstatusline.sh\n\n# Test with debug logging\necho '{\"model\":{\"display_name\":\"Test\"},\"workspace\":{\"current_dir\":\"/test\",\"project_dir\":\"/test\"},\"version\":\"1.0.0\"}' | ~/.claude/ccstatusline.sh --loglevel debug\n```\n```\n\n### Log Levels\n\n- **error** (default) - Only critical errors\n- **info** - Operational information + errors\n- **debug** - Everything including raw JSON input (useful for troubleshooting)\n\n## 🎨 Visual Indicators\n\n| Indicator | Meaning | Color |\n|-----------|---------|-------|\n| 🤖 | AI Model | Cyan |\n| * | Version Separator | Orange background, white text |\n| 📁 | Project Root | Green |\n| 📂 | Subdirectory | Red |\n| 🔄 | Update Available | Default |\n| 🐛 DEBUG | Debug Mode Active | Yellow |\n\n### Version Colors\n\n- **Green** - Current version when up-to-date\n- **Orange** - Current version when update available\n- **Green** (new version) - Available update version number\n\n## ⚙️ Configuration\n\n### Environment Variables\n\n- `NO_COLOR` - Set to disable all color output\n- `HOME` - Used to locate the .claude directory\n\n### Files Created\n\nThe script creates these files in `~/.claude/`:\n\n- `latest_version_check` - Caches the latest version (updated hourly)\n- `ccstatusline.log` - Log file (rotates at 1MB)\n- `*.lock` - Temporary lockfiles for update checks\n\n## 🔧 Advanced Features\n\n### Automatic Update Checking\n\nThe script checks for Claude Code updates once per hour:\n- Non-blocking background checks\n- Lockfile mechanism prevents concurrent checks\n- Visual indicator when updates are available\n- Shows both current and available versions\n\n### Smart Path Display\n\n- **Project Root**: Shows \"Project root\" in green with 📁\n- **Subdirectories**: Shows relative path in red with 📂\n- Falls back gracefully if path calculation fails\n\n### Robust Error Handling\n\n- Always outputs valid status line text\n- Never exits with error codes (Claude Code compatibility)\n- Graceful degradation when features unavailable\n- Comprehensive logging for troubleshooting\n\n## 🐛 Troubleshooting\n\n### Status line shows \"Claude Code\"\n\nThis is the fallback when the script encounters an error. Check:\n1. Script is executable: `chmod +x ~/.claude/ccstatusline.sh`\n2. Bash version is 4.0+: `bash --version`\n3. Enable debug logging to see details: `--loglevel debug`\n\n### No update notifications\n\n- Ensure npm is installed: `which npm`\n- Check the version cache: `cat ~/.claude/latest_version_check`\n- Look for errors in logs: `tail ~/.claude/ccstatusline.log`\n\n### Colors not showing\n\n- Check NO_COLOR environment variable: `echo $NO_COLOR`\n- Verify terminal supports colors: `echo -e \"\\033[96mTest\\033[0m\"`\n\n### View logs\n\n```bash\n# View recent log entries\ntail -f ~/.claude/ccstatusline.log\n\n# Check log file size\nls -lh ~/.claude/ccstatusline.log\n```\n\n## 🔒 Security\n\nThis script implements multiple security measures:\n\n- **Safe JSON Parsing** - Pure bash regex, no eval or command substitution\n- **Command Injection Prevention** - No user input executed as commands\n- **Atomic File Operations** - Prevents race conditions\n- **Process Isolation** - Background tasks properly managed\n- **Input Validation** - All inputs sanitized and validated\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit issues and pull requests.\n\n### Development Tips\n\n1. Test changes locally:\n```bash\necho '{\"model\":{\"display_name\":\"Test\"},\"workspace\":{\"current_dir\":\"/test\",\"project_dir\":\"/test\"},\"version\":\"1.0.0\"}' | ./ccstatusline.sh --loglevel debug\n```\n\n2. Check for bash compatibility:\n```bash\nshellcheck ./ccstatusline.sh\n```\n\n3. Verify cross-platform compatibility on macOS and Linux\n\n## 📄 License\n\nMIT License - See LICENSE file for details\n\n## 🙏 Acknowledgments\n\n- Claude Code team for the excellent development environment\n- Created by DKMaker with great help from Claude Code\n- Community contributors and testers\n\n## 📊 Version History\n\n- **1.0.1** - Fixed version comparison to properly handle newer local versions\n- **1.0.0** - Initial release\n\n---\n\nMade with ❤️ for the Claude Code community","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkmaker%2Fclaudecode-statusline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkmaker%2Fclaudecode-statusline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkmaker%2Fclaudecode-statusline/lists"}