{"id":51540534,"url":"https://github.com/sandermuller/claude-statusline","last_synced_at":"2026-07-09T13:01:44.892Z","repository":{"id":361838379,"uuid":"1255144228","full_name":"SanderMuller/claude-statusline","owner":"SanderMuller","description":"A two-row, color-coded status line for Claude Code: model, context %, skills/workflow counts, and 5h/7d rate-limit windows with progress bars. One-line install.","archived":false,"fork":false,"pushed_at":"2026-06-01T12:34:00.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T14:19:51.856Z","etag":null,"topics":["anthropic","bash","claude","claude-code","cli","developer-tools","productivity","status-line","statusline","terminal"],"latest_commit_sha":null,"homepage":null,"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/SanderMuller.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-31T13:13:44.000Z","updated_at":"2026-06-01T12:34:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/SanderMuller/claude-statusline","commit_stats":null,"previous_names":["sandermuller/claude-statusline"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/SanderMuller/claude-statusline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanderMuller%2Fclaude-statusline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanderMuller%2Fclaude-statusline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanderMuller%2Fclaude-statusline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanderMuller%2Fclaude-statusline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SanderMuller","download_url":"https://codeload.github.com/SanderMuller/claude-statusline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SanderMuller%2Fclaude-statusline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35299763,"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-09T02:00:07.329Z","response_time":57,"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","bash","claude","claude-code","cli","developer-tools","productivity","status-line","statusline","terminal"],"created_at":"2026-07-09T13:01:41.976Z","updated_at":"2026-07-09T13:01:44.886Z","avatar_url":"https://github.com/SanderMuller.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# claude-statusline\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)\n[![Shell: Bash](https://img.shields.io/badge/shell-bash-4EAA25?style=flat-square\u0026logo=gnubash\u0026logoColor=white)](statusline.sh)\n[![Claude Code](https://img.shields.io/badge/Claude%20Code-status%20line-D97757?style=flat-square\u0026logo=anthropic\u0026logoColor=white)](https://docs.claude.com/en/docs/claude-code/statusline)\n\nA two-row, color-coded status line for [Claude Code](https://docs.claude.com/en/docs/claude-code). It shows your working directory, model, context-window usage, how many skills and workflows you've used this session, and your 5-hour / 7-day rate-limit windows with progress bars and reset times.\n\n![claude-statusline screenshot](screenshot.png)\n\n```\nPWD: app · Claude Opus 4.8 · ctx ███░░░░░░░░░ 24% · skills 3 · wf 1\n5h ████░░░░░░░░ 31% resets 14:30 · 7d ██░░░░░░░░░░ 12% resets Tue 09:00\n```\n\nIn the terminal the directory is cyan, the model magenta, labels light-blue, values bright white, and each bar is green / yellow / red by how full it is.\n\n## Install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/sandermuller/claude-statusline/main/install.sh | bash\n```\n\nThe installer drops `statusline.sh` into your Claude Code config directory and merges the `statusLine` key into `settings.json`. It backs up `settings.json` first and leaves the rest of your settings alone. Start a new interaction in Claude Code and the status line appears.\n\nPrefer not to pipe to a shell? See [manual install](#manual-install).\n\n## What it shows\n\n| Segment                      | Source                           | Notes                                           |\n|------------------------------|----------------------------------|-------------------------------------------------|\n| `PWD: \u003cdir\u003e`                 | `workspace.current_dir`          | Shortened — see [configuration](#configuration) |\n| model                        | `model.display_name`             |                                                 |\n| `ctx \u003cbar\u003e NN%`              | `context_window.used_percentage` | Bar colored by usage                            |\n| `skills N`                   | session transcript               | Count of `Skill` tool calls this session        |\n| `wf N`                       | session transcript               | Count of `Workflow` tool calls this session     |\n| `5h \u003cbar\u003e NN% resets \u003ctime\u003e` | `rate_limits.five_hour.*`        | 5-hour rate-limit window                        |\n| `7d \u003cbar\u003e NN% resets \u003ctime\u003e` | `rate_limits.seven_day.*`        | 7-day rate-limit window                         |\n\nBar colors: green below 50%, yellow 50–79%, red 80%+.\n\n### The `PWD` segment\n\nThe directory is shortened so you see *where you are* without the noise of a full path. It depends on `CLAUDE_STATUSLINE_PROJECT_ROOT` (default `$HOME/Documents/GitHub`):\n\n| Current directory                                      | Shown as                              | Why                                                   |\n|--------------------------------------------------------|---------------------------------------|-------------------------------------------------------|\n| `~/Documents/GitHub/claude-statusline`                 | `claude-statusline`                   | Repo at the root of `PROJECT_ROOT` — just its name    |\n| `~/Documents/GitHub/claude-statusline/internal/blabla` | `claude-statusline → internal/blabla` | In a subfolder — repo name, arrow, then the subpath   |\n| `~/Documents/GitHub`                                   | `~/Documents/GitHub`                  | `PROJECT_ROOT` itself — not inside a repo             |\n| `~/Downloads/foo`                                      | `~/Downloads/foo`                     | Outside `PROJECT_ROOT` — full path, `$HOME` collapsed |\n| `/etc/nginx`                                           | `/etc/nginx`                          | Outside `$HOME` — shown verbatim                      |\n| `~`                                                    | `~`                                   | Home directory                                        |\n\nThe `repo → sub/path` form makes it obvious you're in the `claude-statusline` repo *and* which subfolder, instead of either the bare folder name or the whole absolute path.\n\nSet `CLAUDE_STATUSLINE_PROJECT_ROOT=\"\"` to disable the repo shortening — then paths only get `$HOME` collapsed to `~`.\n\n## Requirements\n\n- Claude Code (recent enough to expose the `rate_limits.*` and `context_window.*` fields on the status-line input).\n- [`jq`](https://jqlang.github.io/jq/) — `brew install jq` on macOS, `sudo apt install jq` on Debian/Ubuntu.\n- A terminal with 256-color ANSI support (iTerm2, Kitty, WezTerm, modern Terminal.app, most Linux terminals).\n- The 5h/7d row only appears on subscription plans that report rate limits. On API-key billing those fields are absent and that row is simply omitted.\n\n## Configuration\n\nTwo knobs, set as environment variables (or edit the top of `statusline.sh`):\n\n| Variable                         | Default                  | Effect                                                                                                                            |\n|----------------------------------|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `CLAUDE_STATUSLINE_PROJECT_ROOT` | `$HOME/Documents/GitHub` | Paths under this folder are shown relative to it (`~/Documents/GitHub/app` → `app`). Set to `\"\"` to just collapse `$HOME` to `~`. |\n| `CLAUDE_STATUSLINE_BAR_WIDTH`    | `12`                     | Width of each progress bar in characters.                                                                                         |\n\nTo change them, set the variable wherever Claude Code picks up your environment, or edit the `PROJECT_ROOT` / `BAR_WIDTH` lines at the top of the installed `statusline.sh`. The color palette and the green/yellow/red thresholds are defined just below those lines and are easy to tweak.\n\n## How it works\n\nClaude Code pipes a JSON object describing the session to your status-line command on stdin, and renders whatever the command prints. This script reads that JSON with `jq`, builds two lines, and prints them. The only thing it reads from outside the JSON is the session transcript file (path provided in the JSON), which it greps to count skills and workflows. There are no network calls and no other dependencies.\n\nSee the [Claude Code status line docs](https://docs.claude.com/en/docs/claude-code/statusline) for the full input schema.\n\n## Manual install\n\n1. Save [`statusline.sh`](statusline.sh) to `~/.claude/statusline.sh` and make it executable:\n   ```bash\n   chmod +x ~/.claude/statusline.sh\n   ```\n2. Add this to `~/.claude/settings.json` (merge it with any existing settings):\n   ```json\n   {\n     \"statusLine\": {\n       \"type\": \"command\",\n       \"command\": \"bash ~/.claude/statusline.sh\"\n     }\n   }\n   ```\n\n## Troubleshooting\n\n- **No colors / raw escape codes shown** — your terminal isn't interpreting ANSI. Use a 256-color terminal.\n- **`jq: command not found`** — install `jq` (see requirements).\n- **The 5h/7d row is missing** — your plan or Claude Code version doesn't report rate limits; everything else still works.\n- **`skills`/`wf` always 0** — the transcript path wasn't available; counts resume once the session has a transcript on disk.\n- **Custom config directory** — the installer honors `CLAUDE_CONFIG_DIR` if you've set it.\n\n## Uninstall\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/sandermuller/claude-statusline/main/uninstall.sh | bash\n```\n\nRemoves the `statusLine` key (backing up `settings.json`) and deletes the installed script.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandermuller%2Fclaude-statusline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandermuller%2Fclaude-statusline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandermuller%2Fclaude-statusline/lists"}