{"id":51695874,"url":"https://github.com/danielmackay/claude-code-statusline","last_synced_at":"2026-07-16T05:05:15.480Z","repository":{"id":345647496,"uuid":"1183845140","full_name":"danielmackay/claude-code-statusline","owner":"danielmackay","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-20T02:25:47.000Z","size":197,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-20T18:19:27.190Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielmackay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-17T02:14:33.000Z","updated_at":"2026-03-20T05:05:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/danielmackay/claude-code-statusline","commit_stats":null,"previous_names":["danielmackay/claude-code-statusline"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/danielmackay/claude-code-statusline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2Fclaude-code-statusline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2Fclaude-code-statusline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2Fclaude-code-statusline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2Fclaude-code-statusline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielmackay","download_url":"https://codeload.github.com/danielmackay/claude-code-statusline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2Fclaude-code-statusline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35531189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-16T02:00:06.687Z","response_time":83,"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":[],"created_at":"2026-07-16T05:05:14.915Z","updated_at":"2026-07-16T05:05:15.474Z","avatar_url":"https://github.com/danielmackay.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claude Code Statusline\n\nA custom statusline script for [Claude Code](https://claude.ai/claude-code) that displays real-time session information in your terminal.\n\n![Statusline preview](screenshot.png)\n\n## What It Shows\n\n```\n🤖 Claude Sonnet 4.6 | 🧠 12% | 💰 $0.04 | ⏱️ 5h ████░░░░░░ 42% resets 2:00PM\n📁 my-project | 🌳 my-feature | 🌿 main +42 -7\n```\n\n| Field | Description |\n|---|---|\n| 🤖 Model | Active Claude model name |\n| 🧠 Context | Context window usage percentage |\n| 💰 Cost | Cumulative session cost in USD |\n| ⏱️ Rate Limit | 5-hour rate limit usage bar, percentage, and reset time |\n| 📁 Folder | Current working directory name |\n| 🌳 Worktree | Active git worktree name |\n| 🌿 Branch | Current git branch with lines added/removed |\n\n## Prerequisites\n\n- [Claude Code](https://claude.ai/claude-code) CLI installed\n- [`jq`](https://jqlang.github.io/jq/) — for parsing the JSON input from Claude Code\n- `git` — for branch and diff stats\n\nInstall `jq` if needed:\n\n```sh\n# macOS\nbrew install jq\n\n# Ubuntu/Debian\napt-get install jq\n```\n\n## Setup\n\n**1. Copy the script somewhere accessible:**\n\n```sh\ncp statusline-command.sh ~/.claude/statusline-command.sh\nchmod +x ~/.claude/statusline-command.sh\n```\n\n**2. Add the statusline configuration to `.claude/settings.json`:**\n\nFor a **global** setup (applies to all projects), edit `~/.claude/settings.json`:\n\n```json\n{\n  \"statusLine\": {\n    \"type\": \"command\",\n    \"command\": \"sh ~/.claude/statusline-command.sh\",\n    \"padding\": 0\n  }\n}\n```\n\nFor a **project-level** setup, add the same block to `.claude/settings.json` in your project root.\n\n**3. Start Claude Code** — the statusline will appear automatically.\n\n## Customization\n\nThe script reads a JSON object from stdin with the following fields:\n\n| Field | Description |\n|---|---|\n| `model.display_name` | Name of the active model |\n| `context_window.used_percentage` | Context usage as a float |\n| `worktree.name` | Active worktree name |\n| `cost.total_cost_usd` | Session cost |\n| `cost.total_lines_added` | Lines added this session |\n| `cost.total_lines_removed` | Lines removed this session |\n| `workspace.current_dir` | Current working directory |\n| `rate_limits.five_hour.used_percentage` | 5-hour rate limit usage percentage |\n| `rate_limits.five_hour.resets_at` | Unix timestamp when 5-hour limit resets |\n| `rate_limits.seven_day.used_percentage` | 7-day rate limit usage percentage (available for optional display) |\n| `rate_limits.seven_day.resets_at` | Unix timestamp when 7-day limit resets (available for optional display) |\n\nThe rate-limit bar uses color thresholds: green (\u003c70%), yellow (70-89%), red (\u003e=90%).\n\nBy default, the script shows the 5-hour limit and keeps 7-day output commented out. You can enable 7-day display by uncommenting the `rate_limit_str` line near the bottom of `statusline-command.sh`.\n\nEdit `statusline-command.sh` to change the format, add new fields, or adjust colors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmackay%2Fclaude-code-statusline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielmackay%2Fclaude-code-statusline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmackay%2Fclaude-code-statusline/lists"}