{"id":48785823,"url":"https://github.com/alyibrahim1/claude-statusline","last_synced_at":"2026-04-13T17:01:57.693Z","repository":{"id":346695677,"uuid":"1191170440","full_name":"AlyIbrahim1/claude-statusline","owner":"AlyIbrahim1","description":"Fast Rust-based Claude Code statusline — Displays model, git branch, commits, context bar, rate limits, session cost, tokens. Rust binary, zero dependencies.","archived":false,"fork":false,"pushed_at":"2026-04-11T12:57:34.000Z","size":760,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-11T13:20:46.470Z","etag":null,"topics":["anthropic","binary","claude","claude-code","cli","developer-tools","git","linux","nodejs","npm","open-source","rust","script","statusline","terminal-based","tui","usage-tracking"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/AlyIbrahim1.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-03-25T01:36:22.000Z","updated_at":"2026-04-11T12:51:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/AlyIbrahim1/claude-statusline","commit_stats":null,"previous_names":["alyibrahim1/claude-statusline"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/AlyIbrahim1/claude-statusline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlyIbrahim1%2Fclaude-statusline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlyIbrahim1%2Fclaude-statusline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlyIbrahim1%2Fclaude-statusline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlyIbrahim1%2Fclaude-statusline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlyIbrahim1","download_url":"https://codeload.github.com/AlyIbrahim1/claude-statusline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlyIbrahim1%2Fclaude-statusline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31761996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","binary","claude","claude-code","cli","developer-tools","git","linux","nodejs","npm","open-source","rust","script","statusline","terminal-based","tui","usage-tracking"],"created_at":"2026-04-13T17:00:58.037Z","updated_at":"2026-04-13T17:01:57.681Z","avatar_url":"https://github.com/AlyIbrahim1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/AlyIbrahim1/claude-statusline/main/.github/assets/logo-dark.svg\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/AlyIbrahim1/claude-statusline/main/.github/assets/logo-light.svg\" alt=\"claude-statusline\" width=\"600\"\u003e\n\u003c/picture\u003e\n\n[![CI](https://github.com/AlyIbrahim1/claude-statusline/actions/workflows/ci.yml/badge.svg)](https://github.com/AlyIbrahim1/claude-statusline/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/@alyibrahim/claude-statusline)](https://www.npmjs.com/package/@alyibrahim/claude-statusline)\n[![Downloads](https://img.shields.io/npm/dt/@alyibrahim/claude-statusline)](https://www.npmjs.com/package/@alyibrahim/claude-statusline)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\n**A rich, fast statusline for [Claude Code](https://claude.ai/code)** — shows model, git branch, context usage, rate limits, session cost, and split input/output token counts after every response.\n\nRuns as a **compiled Rust binary** (~5ms startup vs ~100ms for Node.js). Zero shell dependencies. One install command.\n\n![statusline screenshot](https://raw.githubusercontent.com/AlyIbrahim1/claude-statusline/main/.github/assets/statusline.png)\n\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n## Install\n\n\u003c/div\u003e\n\n```bash\nnpm install -g @alyibrahim/claude-statusline\n```\n\nDone. The statusline configures itself automatically. Restart Claude Code to see it.\n\n\u003e If auto-setup didn't run: `claude-statusline setup`\n\n**Plugin install (Claude Code marketplace):** Search for `claude-statusline` in the Claude Code plugin browser. The plugin auto-configures during installation. To get the native Rust binary after a plugin install, run:\n\n```bash\nclaude-statusline download-binary\nclaude-statusline setup\n```\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n## What you get\n\n\u003c/div\u003e\n\n**Line 1** — Model name · Effort level · Active subagents · Current task · Directory `(branch +commits)` · Context bar\n\n**Line 2** — Weekly token usage · 5h usage · Reset countdown *(Pro/Max)* — or — Session cost *(API key)* · Session tokens `X↓ Y↑`\n\n| Feature | Details |\n|---|---|\n| Context bar | Normalized to usable % — accounts for the auto-compact buffer |\n| Rate limits | Shows 5h and weekly usage with color-coded thresholds |\n| Session cost | Displayed only for API key users, hidden for subscribers |\n| Session tokens | Real-time via JSONL offset caching — split input/output display (`X↓ Y↑`), formatted as `k` or `M` for large counts |\n| Active agents | Counts running subagents from your `~/.claude/todos/` directory |\n| Effort level | Reads `CLAUDE_CODE_EFFORT_LEVEL` env var or `settings.json` |\n| Git branch | Detected automatically, silently absent if not a git repo |\n| Session commits | Shows `+N` next to the branch for commits made during the current session |\n| Directory label | Displays as `~/parent/dir` so you always know which project you're in |\n| Terminal wrapping | Lines wrap to fit terminal width — reads `COLUMNS` or `stdout.columns` automatically |\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n## Session History\n\nTrack token usage, cost, and duration across every Claude Code session. Choose between a **terminal-native TUI** or a **browser dashboard** — your preference is saved automatically.\n\n![history dashboard](https://raw.githubusercontent.com/AlyIbrahim1/claude-statusline/main/.github/assets/dashboard-preview.png)\n\nSession history is **enabled by default** on setup. Each session records:\n\n| Field | Details |\n|---|---|\n| Project | Directory name and path |\n| Model | Which Claude model was used |\n| Tokens | Input and output counts |\n| Cost | USD cost (API key users) |\n| Duration | Session length in seconds |\n| Exit reason | How the session ended |\n\n\u003c/div\u003e\n\n**Commands:**\n\n```bash\nclaude-statusline history                   # Open dashboard in saved mode (default: web)\nclaude-statusline history --mode terminal   # Switch to terminal TUI (persisted)\nclaude-statusline history --mode web        # Switch to browser dashboard (persisted)\nclaude-statusline enable-history            # Enable session tracking\nclaude-statusline disable-history           # Disable session tracking\n```\n\nData is stored at `~/.claude/statusline-history.jsonl`.\n\n### Claude Code slash commands\n\nCommands are also available directly inside Claude Code as slash commands:\n\n- `/history`\n- `/history-enable`\n- `/history-disable`\n- `/history-mode \u003cweb|terminal\u003e`\n- `/download-binary`\n\nProject contributors get these from the repo at `.claude/commands/`.\nGlobal npm installs copy them to `~/.claude/commands/` automatically.\nPlugin installs include them via the plugin's `commands/` directory.\n\n### Terminal TUI\n\n`--mode terminal` opens an interactive full-screen dashboard directly in your terminal — no browser required. Requires the native Rust binary (falls back to web dashboard with a warning if unavailable).\n\n```\n┌─ claude-statusline history ──────────────────────────────────────────────┐\n│ Sessions: 42   Tokens: 8.3M   Cost: $12.47                               │\n└──────────────────────────────────────────────────────────────────────────┘\n┌──────────────────────────────────────────────────────────────────────────┐\n│ Filter: [All Projects ▾]                                                 │\n└──────────────────────────────────────────────────────────────────────────┘\n┌──────────────────────────────────────────────────────────────────────────┐\n│  Project              Model               Started          Dur   Tok   Cost│\n│                                                                           │\n│\u003e my-web-app           claude-sonnet-4-6   2026-04-02 14:  32m   842k  $2.14│\n│  cli-tool             claude-opus-4-6     2026-04-01 09:  1h4m  1.2M  $5.60│\n│  data-pipeline        claude-haiku-4-5    2026-03-31 17:  18m   220k  $0.44│\n│  my-web-app           claude-sonnet-4-6   2026-03-30 11:  45m   990k  $2.89│\n│  api-server           claude-sonnet-4-6   2026-03-29 08:  2h1m  2.1M  $8.33│\n│                                                                           │\n└──────────────────────────────────────────────────────────────────────────┘\n┌──────────────────────────────────────────────────────────────────────────┐\n│ up/down or j/k: move   f: filter   Enter: apply   Esc: close   q: quit   │\n└──────────────────────────────────────────────────────────────────────────┘\n```\n\nPress `f` to open the project filter popup:\n\n```\n              ┌─ Filter by Project ──────────┐\n              │ ██ All Projects ██           │\n              │   api-server                 │\n              │   cli-tool                   │\n              │   data-pipeline              │\n              │   my-web-app                 │\n              └──────────────────────────────┘\n```\n\nRows are color-coded by exit reason: green = normal, yellow = interrupted, orange = pending.\n\n### Web Dashboard\n\n`--mode web` (the default) opens a browser-based dashboard with project filtering and light/dark theme toggle.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n## Realtime Renderer\n\n\u003c/div\u003e\n\nAn optional background process that maintains a persistent Unix socket per terminal, enabling terminal-resize awareness and faster state access. **Disabled by default.**\n\n**Enable** by setting the environment variable (add to your shell profile to persist):\n\n```bash\nexport CLAUDE_STATUSLINE_REALTIME=1\n```\n\nAccepted values: `1`, `true`, `TRUE`.\n\nWhen enabled, the native binary auto-spawns a renderer process the first time it runs in a terminal session. The renderer listens on a Unix socket and persists state to `~/.claude/statusline-state-{tty}.json`. It exits automatically on `session_end` or when explicitly stopped.\n\n**Terminal identification**\n\nEach terminal gets its own renderer, identified by a *TTY slug* derived in priority order from:\n\n1. `CLAUDE_STATUSLINE_TTY` — set this explicitly for a stable, human-readable slug\n2. `TERM_SESSION_ID` — used automatically by terminal emulators that set it\n3. `pid-{PID}` — fallback, changes on each shell restart\n\n**Commands:**\n\n```bash\nclaude-statusline realtime-status   # Show renderer state and paths for current terminal\nclaude-statusline realtime-stop     # Request renderer shutdown for current terminal\n```\n\n\u003e The realtime renderer is Unix-only. On Windows, the feature flag is silently ignored.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n## Platform support\n\n\u003c/div\u003e\n\nPre-built Rust binaries are available for **Linux x64/arm64, macOS x64/arm64, and Windows x64**. All Linux distributions (Ubuntu, Arch, Fedora, etc.) are supported. Any other platform falls back to the JS implementation automatically — no action needed.\n\nPlugin installs skip `npm install`, so the binary is not downloaded automatically. Run `claude-statusline download-binary` once to get it.\n\nSee [PLATFORMS.md](PLATFORMS.md) for the full compatibility guide, per-platform install instructions, and feature availability table.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n## Why this one\n\n\u003c/div\u003e\n\n| | claude-statusline | Others |\n|---|---|---|\n| Startup time | ~5ms (Rust binary) | ~100ms (Node.js cold-start every prompt) |\n| Shell dependencies | None | Require `jq`, `bc`, or `ccusage` |\n| API calls | None — reads Claude's stdin directly | Poll OAuth endpoint, risk rate limits |\n| Subscription-aware | Shows usage/resets for Pro/Max, cost for API | Treat everyone as API user |\n| Context bar | Usable % after auto-compact buffer | Raw remaining % |\n| Subagent counter | Counts active agents from todos dir | — |\n| Session tokens | Real-time via JSONL offset cache, split I/O (`X↓ Y↑`) | Stale stdin snapshot or none |\n| Session commits | Tracks git commits made this session | — |\n| Session history | Terminal TUI + browser dashboard, per-project filtering, zero dependencies | — |\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n## Requirements\n\n\u003c/div\u003e\n\n- **Node.js ≥16** — for install/uninstall scripts only (not needed at runtime on supported platforms)\n- **git** — optional, enables branch display\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n## Uninstall\n\n\u003c/div\u003e\n\n```bash\nclaude-statusline uninstall\nnpm uninstall -g @alyibrahim/claude-statusline\n```\n\n\u003e Always run `claude-statusline uninstall` first — it removes the `statusLine` entry from `~/.claude/settings.json` before the files are deleted.\n\n`npm uninstall -g @alyibrahim/claude-statusline` also removes the four history slash command files installed by this package from `~/.claude/commands/`, without touching other custom commands.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n## Notes\n\n\u003c/div\u003e\n\n- Settings are written only to the `statusLine` key — all other `~/.claude/settings.json` keys are untouched\n- Respects `$CLAUDE_CONFIG_DIR` if set\n- Switched Node versions on an unsupported platform? Re-run `claude-statusline setup`\n\n\u003cdiv align=\"center\"\u003e\n\n## License\n\nMIT\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falyibrahim1%2Fclaude-statusline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falyibrahim1%2Fclaude-statusline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falyibrahim1%2Fclaude-statusline/lists"}