{"_id":"@ader-hwang/ccstatusline","_rev":"3-e214080b05636c71b2da852673db43f5","name":"@ader-hwang/ccstatusline","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@ader-hwang/ccstatusline","version":"1.0.0","keywords":["claude","claude-code","cli","status-line","terminal"],"author":"","license":"MIT","_id":"@ader-hwang/ccstatusline@1.0.0","maintainers":[{"name":"ader-hwang","email":"ader.hwang@gmail.com"}],"contributors":[{"name":"Matthew Breedlove","email":"https://github.com/sirmalloc"},{"name":"---"},{"url":"https://github.com/sirmalloc","name":"Original author: Matthew Breedlove"},{"name":"Official repository: https://github.com/sirmalloc/ccstatusline"}],"homepage":"https://github.com/ader/ccstatusline#readme","bugs":{"url":"https://github.com/ader/ccstatusline/issues"},"bin":{"ccstatusline":"dist/ccstatusline.js"},"dist":{"shasum":"633e9c19d6adfc45d1ef811198d32c1a84108ac4","tarball":"https://registry.npmjs.org/@ader-hwang/ccstatusline/-/ccstatusline-1.0.0.tgz","fileCount":4,"integrity":"sha512-ytS/2xLJyVUI2DhXdm9BlAlqk8CAP0CDKVp58BFZkQ0NhWBJW22PnYxgnOI3ldp8Y0Rm6Sf3OseJv4DAb14uZQ==","signatures":[{"sig":"MEQCIHIU/4n+nR7YQuJF/dqDO/1AGHZ4IBqEGz5MKP7GjAoeAiAI53d2kdJEqO0Y+5CJPCTLJyp31UeYheaS/cnHLVdKkw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2976527},"type":"module","module":"src/ccstatusline.ts","engines":{"node":">=14.0.0"},"gitHead":"63d4c0e2ebc9a3cc2d65de56977b51bfe26b4f0c","scripts":{"docs":"typedoc","lint":"bun tsc --noEmit && eslint . --config eslint.config.js --max-warnings=0","build":"rm -rf dist/* ; bun build src/ccstatusline.ts --target=node --outfile=dist/ccstatusline.js --target-version=14","start":"bun run src/ccstatusline.ts","example":"cat scripts/payload.example.json | bun start","lint:fix":"bun tsc --noEmit && eslint . --config eslint.config.js --max-warnings=0 --fix","postbuild":"bun run scripts/replace-version.ts","docs:clean":"rm -rf docs","prepublishOnly":"bun run build"},"_npmUser":{"name":"ader-hwang","email":"ader.hwang@gmail.com"},"repository":{"url":"git+https://github.com/ader/ccstatusline.git","type":"git"},"_npmVersion":"10.9.3","description":"Customized ccstatusline with context-dots, git-file-status, random-quote widgets","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"devDependencies":{"ink":"6.2.0","zod":"^4.0.17","chalk":"^5.5.0","react":"^19.1.1","eslint":"^9.33.0","vitest":"^4.0.18","typedoc":"^0.28.12","pluralize":"^8.0.0","@eslint/js":"^9.33.0","@types/bun":"latest","strip-ansi":"^7.1.0","tinyglobby":"^0.2.14","typescript":"^5.9.2","@types/react":"^19.1.10","ink-gradient":"^3.0.0","@types/pluralize":"^0.0.33","ink-select-input":"^6.2.0","https-proxy-agent":"^7.0.0","typescript-eslint":"^8.39.1","eslint-plugin-react":"^7.37.5","react-devtools-core":"^7.0.1","eslint-plugin-import":"^2.32.0","@stylistic/eslint-plugin":"^5.2.3","eslint-plugin-react-hooks":"^7.0.1","eslint-plugin-import-newlines":"^1.4.0","eslint-import-resolver-typescript":"^4.4.4"},"patchedDependencies":{"ink@6.2.0":"patches/ink@6.2.0.patch"},"trustedDependencies":["unrs-resolver"],"_npmOperationalInternal":{"tmp":"tmp/ccstatusline_1.0.0_1773349906913_0.3741944284626484","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@ader-hwang/ccstatusline","version":"1.0.1","keywords":["claude","claude-code","cli","status-line","terminal"],"author":"","license":"MIT","_id":"@ader-hwang/ccstatusline@1.0.1","maintainers":[{"name":"ader-hwang","email":"ader.hwang@gmail.com"}],"contributors":[{"name":"Matthew Breedlove","email":"https://github.com/sirmalloc"},{"name":"---"},{"url":"https://github.com/sirmalloc","name":"Original author: Matthew Breedlove"},{"name":"Official repository: https://github.com/sirmalloc/ccstatusline"}],"homepage":"https://github.com/ader/ccstatusline#readme","bugs":{"url":"https://github.com/ader/ccstatusline/issues"},"bin":{"ccstatusline":"dist/ccstatusline.js"},"dist":{"shasum":"49044cbff944dc5dfb2455109c4f67cca614205d","tarball":"https://registry.npmjs.org/@ader-hwang/ccstatusline/-/ccstatusline-1.0.1.tgz","fileCount":5,"integrity":"sha512-/pTPIFaNxj8NGXjOgUk9lG5wGpVw1fDkyR0fHwla8HIiY6jjX8RvLzu0F3VxcL1dC6NU1iITLkMZv/u259gI5w==","signatures":[{"sig":"MEUCIQDYkbcIA53KRdQ2l7Xa2MYrrPGX9s2ieeIouZR3AotPjAIgFOVkuFCVfx0+c8I6/aVpeZ9OSasx/7LN+Sg3UgeYnQI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2983046},"type":"module","module":"src/ccstatusline.ts","engines":{"node":">=14.0.0"},"gitHead":"9b2170f440af0dcfca3c35273e823d82bf564def","scripts":{"docs":"typedoc","lint":"bun tsc --noEmit && eslint . --config eslint.config.js --max-warnings=0","build":"rm -rf dist/* ; bun build src/ccstatusline.ts --target=node --outfile=dist/ccstatusline.js --target-version=14","start":"bun run src/ccstatusline.ts","example":"cat scripts/payload.example.json | bun start","lint:fix":"bun tsc --noEmit && eslint . --config eslint.config.js --max-warnings=0 --fix","postbuild":"bun run scripts/replace-version.ts","docs:clean":"rm -rf docs","prepublishOnly":"bun run build"},"_npmUser":{"name":"ader-hwang","email":"ader.hwang@gmail.com"},"repository":{"url":"git+https://github.com/ader/ccstatusline.git","type":"git"},"_npmVersion":"10.9.3","description":"Customized ccstatusline with context-dots, git-file-status, random-quote widgets","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"ink":"6.2.0","zod":"^4.0.17","chalk":"^5.5.0","react":"^19.1.1","eslint":"^9.33.0","vitest":"^4.0.18","typedoc":"^0.28.12","pluralize":"^8.0.0","@eslint/js":"^9.33.0","@types/bun":"latest","strip-ansi":"^7.1.0","tinyglobby":"^0.2.14","typescript":"^5.9.2","@types/react":"^19.1.10","ink-gradient":"^3.0.0","@types/pluralize":"^0.0.33","ink-select-input":"^6.2.0","https-proxy-agent":"^7.0.0","typescript-eslint":"^8.39.1","eslint-plugin-react":"^7.37.5","react-devtools-core":"^7.0.1","eslint-plugin-import":"^2.32.0","@stylistic/eslint-plugin":"^5.2.3","eslint-plugin-react-hooks":"^7.0.1","eslint-plugin-import-newlines":"^1.4.0","eslint-import-resolver-typescript":"^4.4.4"},"patchedDependencies":{"ink@6.2.0":"patches/ink@6.2.0.patch"},"trustedDependencies":["unrs-resolver"],"_npmOperationalInternal":{"tmp":"tmp/ccstatusline_1.0.1_1773398556376_0.3965146128074284","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@ader-hwang/ccstatusline","version":"1.0.2","description":"Customized ccstatusline with context-dots, git-file-status, random-quote widgets","module":"src/ccstatusline.ts","type":"module","bin":{"ccstatusline":"dist/ccstatusline.js"},"scripts":{"start":"bun run src/ccstatusline.ts","build":"rm -rf dist/* ; bun build src/ccstatusline.ts --target=node --outfile=dist/ccstatusline.js --target-version=14","postbuild":"bun run scripts/replace-version.ts","example":"cat scripts/payload.example.json | bun start","prepublishOnly":"bun run build","lint":"bun tsc --noEmit && eslint . --config eslint.config.js --max-warnings=0","lint:fix":"bun tsc --noEmit && eslint . --config eslint.config.js --max-warnings=0 --fix","docs":"typedoc","docs:clean":"rm -rf docs"},"devDependencies":{"@eslint/js":"^9.33.0","@stylistic/eslint-plugin":"^5.2.3","@types/bun":"latest","@types/pluralize":"^0.0.33","@types/react":"^19.1.10","chalk":"^5.5.0","eslint":"^9.33.0","eslint-import-resolver-typescript":"^4.4.4","eslint-plugin-import":"^2.32.0","eslint-plugin-import-newlines":"^1.4.0","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^7.0.1","https-proxy-agent":"^7.0.0","ink":"6.2.0","ink-gradient":"^3.0.0","ink-select-input":"^6.2.0","pluralize":"^8.0.0","react":"^19.1.1","react-devtools-core":"^7.0.1","strip-ansi":"^7.1.0","tinyglobby":"^0.2.14","typedoc":"^0.28.12","typescript":"^5.9.2","typescript-eslint":"^8.39.1","vitest":"^4.0.18","zod":"^4.0.17"},"keywords":["claude","claude-code","cli","status-line","terminal"],"author":"","license":"MIT","repository":{"type":"git","url":"git+https://github.com/ader/ccstatusline.git"},"engines":{"node":">=14.0.0"},"trustedDependencies":["unrs-resolver"],"patchedDependencies":{"ink@6.2.0":"patches/ink@6.2.0.patch"},"_id":"@ader-hwang/ccstatusline@1.0.2","contributors":[{"name":"Matthew Breedlove","email":"https://github.com/sirmalloc"},{"name":"---"},{"name":"Original author: Matthew Breedlove","url":"https://github.com/sirmalloc"},{"name":"Official repository: https://github.com/sirmalloc/ccstatusline"}],"gitHead":"25faed123512c02e28bfe8cdf6b00cafbfe19912","bugs":{"url":"https://github.com/ader/ccstatusline/issues"},"homepage":"https://github.com/ader/ccstatusline#readme","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-qD5N30kAuuFgWxTbG/gcVpFWoBBLt/DGKZfufS0xTX7RkBlHu853rZh34d7w1XxrMMZ7pbfR+X9ulGzavSye9A==","shasum":"e3dbda0ead3d19d005f2340ac3a2ce7919db3f1e","tarball":"https://registry.npmjs.org/@ader-hwang/ccstatusline/-/ccstatusline-1.0.2.tgz","fileCount":5,"unpackedSize":2989672,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDxftkMP7jtUXySFyol+FP8T5ytgOEyT4W0cjxXucaXQAiByPtywQQXpVciN2E9vsNPdWkrQW7L32iGwpvyIPK1FHw=="}]},"_npmUser":{"name":"ader-hwang","email":"ader.hwang@gmail.com"},"directories":{},"maintainers":[{"name":"ader-hwang","email":"ader.hwang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ccstatusline_1.0.2_1774338618640_0.04331318267552753"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-12T21:11:46.822Z","modified":"2026-03-24T07:50:19.179Z","1.0.0":"2026-03-12T21:11:47.152Z","1.0.1":"2026-03-13T10:42:36.546Z","1.0.2":"2026-03-24T07:50:19.058Z"},"bugs":{"url":"https://github.com/ader/ccstatusline/issues"},"license":"MIT","homepage":"https://github.com/ader/ccstatusline#readme","keywords":["claude","claude-code","cli","status-line","terminal"],"repository":{"type":"git","url":"git+https://github.com/ader/ccstatusline.git"},"description":"Customized ccstatusline with context-dots, git-file-status, random-quote widgets","contributors":[{"name":"Matthew Breedlove","email":"https://github.com/sirmalloc"},{"name":"---"},{"name":"Original author: Matthew Breedlove","url":"https://github.com/sirmalloc"},{"name":"Official repository: https://github.com/sirmalloc/ccstatusline"}],"maintainers":[{"name":"ader-hwang","email":"ader.hwang@gmail.com"}],"readme":"<div align=\"center\">\r\n\r\n<pre>\r\n              _        _             _ _\r\n  ___ ___ ___| |_ __ _| |_ _   _ ___| (_)_ __   ___\r\n / __/ __/ __| __/ _` | __| | | / __| | | '_ \\ / _ \\\r\n| (_| (__\\__ \\ || (_| | |_| |_| \\__ \\ | | | | |  __/\r\n \\___\\___|___/\\__\\__,_|\\__|\\__,_|___/_|_|_| |_|\\___|\r\n\r\n</pre>\r\n\r\n# @ader-hwang/ccstatusline\r\n\r\n**自訂版 [ccstatusline](https://github.com/sirmalloc/ccstatusline) — 新增多個實用 widget**\r\n\r\n[![npm version](https://img.shields.io/npm/v/@ader-hwang/ccstatusline.svg)](https://www.npmjs.com/package/@ader-hwang/ccstatusline)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/ader/ccstatusline/blob/main/LICENSE)\r\n[![Node.js Version](https://img.shields.io/node/v/@ader-hwang/ccstatusline.svg)](https://nodejs.org)\r\n\r\n**[English](README.md)**\r\n\r\n</div>\r\n\r\n## 關於此 Fork\r\n\r\n本專案 fork 自 [sirmalloc/ccstatusline](https://github.com/sirmalloc/ccstatusline)，新增自訂 widget 及動態顏色機制。\r\n\r\n![Screenshot](https://raw.githubusercontent.com/ader/ccstatusline/main/screenshots/ccusageExt.png)\r\n\r\n### 新增 Widget\r\n\r\n#### Context Dots（彩色圓點進度條）\r\n\r\n以圓點視覺化顯示 context 使用率，依門檻自動變色：\r\n\r\n- `< 50%`：綠色\r\n- `50% ~ 70%`：黃色\r\n- `>= 70%`：紅色\r\n\r\n顯示效果：`Ctx: ●●●●●○○○○○ 46.0%`\r\n\r\n| 參數 | 說明 | 預設值 |\r\n|------|------|--------|\r\n| `metadata.dots` | 圓點總數 | `10` |\r\n\r\n#### Git File Status（檔案狀態計數）\r\n\r\n顯示 git 工作區的檔案狀態計數，與 `git-changes`（顯示行數增刪）互補。\r\n\r\n顯示效果：`+3 ~2 ?1`（3 個 staged、2 個 modified、1 個 untracked）\r\n\r\n無變更時顯示 `clean`。\r\n\r\n#### Random Quote（隨機格言）\r\n\r\n定時隨機顯示自訂詞句，同一時間窗口內顯示同一句（跨 process 一致）。\r\n\r\n顯示效果：`保持專注`\r\n\r\n| 參數 | 說明 | 預設值 |\r\n|------|------|--------|\r\n| `metadata.quotes` | 自訂詞句，以 `\\|` 分隔 | 5 句英文預設語 |\r\n| `metadata.interval` | 切換間隔（秒） | `60` |\r\n\r\n### getDynamicColor（動態顏色機制）\r\n\r\nWidget 介面新增可選方法 `getDynamicColor()`，讓 widget 依據執行狀態動態決定顏色，覆寫靜態設定的 `color`。目前 Context Dots 和 Context Percentage 使用此機制。\r\n\r\n## 安裝\r\n\r\n```bash\r\n# 使用 npx\r\nnpx -y @ader-hwang/ccstatusline@latest\r\n\r\n# 使用 bunx\r\nbunx -y @ader-hwang/ccstatusline@latest\r\n```\r\n\r\n在 `~/.claude/settings.json` 中設定：\r\n\r\n```json\r\n{\r\n  \"statusLine\": {\r\n    \"type\": \"command\",\r\n    \"command\": \"npx -y @ader-hwang/ccstatusline@latest\",\r\n    \"padding\": 0\r\n  }\r\n}\r\n```\r\n\r\n設定檔位於 `~/.config/ccstatusline/settings.json`，可手動編輯或透過 TUI 設定。\r\n\r\n### 設定範例\r\n\r\n兩行式佈局 — **第一行**：Model | Thinking Effort | Context Dots | Random Quote，**第二行**：Git Root Dir | Git Branch | Git File Status | Git Changes\r\n\r\n將以下內容複製到 `~/.config/ccstatusline/settings.json`（亦可參考 `config/settings.example.json`）：\r\n\r\n```json\r\n{\r\n  \"version\": 3,\r\n  \"lines\": [\r\n    [\r\n      { \"id\": \"1\", \"type\": \"model\", \"color\": \"cyan\" },\r\n      { \"id\": \"2\", \"type\": \"separator\" },\r\n      { \"id\": \"3\", \"type\": \"thinking-effort\" },\r\n      { \"id\": \"4\", \"type\": \"separator\" },\r\n      { \"id\": \"5\", \"type\": \"context-dots\" },\r\n      { \"id\": \"6\", \"type\": \"separator\" },\r\n      {\r\n        \"id\": \"7\",\r\n        \"type\": \"random-quote\",\r\n        \"color\": \"brightCyan\",\r\n        \"metadata\": {\r\n          \"quotes\": \"每天進步一點點|保持專注|簡單就是美|先求有再求好|寫程式要開心|少即是多|程式是寫給人看的|今天也要全力以赴|不急，但不停|做完比做好更重要|重構是一種善良|好的命名勝過註解|別過度設計|一次只做一件事|休息是為了走更長的路|先跑起來再說|Bug 是學習的機會|測試是你最好的朋友|Coffee 加載中...|Keep Calm & Code On|享受解題的過程\",\r\n          \"interval\": \"300\"\r\n        }\r\n      }\r\n    ],\r\n    [\r\n      { \"id\": \"8\", \"type\": \"git-root-dir\" },\r\n      { \"id\": \"9\", \"type\": \"separator\" },\r\n      { \"id\": \"10\", \"type\": \"git-branch\", \"color\": \"magenta\" },\r\n      { \"id\": \"11\", \"type\": \"separator\" },\r\n      { \"id\": \"12\", \"type\": \"git-file-status\", \"color\": \"brightBlue\" },\r\n      { \"id\": \"13\", \"type\": \"separator\" },\r\n      { \"id\": \"14\", \"type\": \"git-changes\", \"color\": \"blue\" }\r\n    ],\r\n    []\r\n  ],\r\n  \"flexMode\": \"full-minus-40\",\r\n  \"compactThreshold\": 60,\r\n  \"colorLevel\": 2,\r\n  \"inheritSeparatorColors\": false,\r\n  \"globalBold\": false,\r\n  \"powerline\": {\r\n    \"enabled\": false,\r\n    \"separators\": [\"\"],\r\n    \"separatorInvertBackground\": [false],\r\n    \"startCaps\": [],\r\n    \"endCaps\": [],\r\n    \"autoAlign\": false\r\n  }\r\n}\r\n```\r\n\r\n---\r\n\r\n## 原始 ccstatusline 文件\r\n\r\n完整原始文件請參考 [README.md](README.md)。\r\n","readmeFilename":"README.zh-TW.md"}