cc-costline 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.es.md ADDED
@@ -0,0 +1,93 @@
1
+ [English](README.md) | [中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md)
2
+
3
+ # cc-costline
4
+
5
+ Statusline mejorada para [Claude Code](https://docs.anthropic.com/en/docs/claude-code) — añade seguimiento de costos, límites de uso y ranking en tu terminal.
6
+
7
+ ![Captura de pantalla cc-costline](screenshot.png)
8
+
9
+ ```
10
+ 14.6k ~ $2.42 / 40% by Opus 4.6 | 5h: 45% / 7d: 8% | 30d: $866 | #2/22 $67.0
11
+ ```
12
+
13
+ ## Instalación
14
+
15
+ ```bash
16
+ npm i -g cc-costline && cc-costline install
17
+ ```
18
+
19
+ Abre una nueva sesión de Claude Code y verás la statusline mejorada. Requiere Node.js >= 22.
20
+
21
+ ## Funcionalidades
22
+
23
+ | Segmento | Ejemplo | Descripción |
24
+ |----------|---------|-------------|
25
+ | Tokens ~ Costo / Contexto | `14.6k ~ $2.42 / 40% by Opus 4.6` | Tokens de la sesión, costo, uso de contexto y modelo |
26
+ | Límites de uso | `5h: 45% / 7d: 8%` | Utilización de Claude a 5 horas y 7 días (coloreado como el contexto) |
27
+ | Costo del período | `30d: $866` | Costo acumulado (configurable: 7d o 30d) |
28
+ | Ranking | `#2/22 $67.0` | Posición en [ccclub](https://github.com/mazzzystar/ccclub) (si está instalado) |
29
+
30
+ ### Colores
31
+
32
+ - **Contexto y límites de uso** — verde (< 60%) → naranja (60-79%) → rojo (≥ 80%)
33
+ - **Posición en ranking** — 1.o: dorado, 2.o: blanco, 3.o: naranja, resto: azul
34
+ - **Costo del período** — amarillo
35
+
36
+ ### Integraciones opcionales
37
+
38
+ - **Límites de uso de Claude** — lee automáticamente las credenciales OAuth del llavero de macOS. Solo ejecuta `claude login`.
39
+ - **Ranking ccclub** — instala [ccclub](https://github.com/mazzzystar/ccclub) (`npm i -g ccclub && ccclub init`). El ranking aparece automáticamente.
40
+
41
+ Ambas funcionan sin configuración: si no están disponibles, el segmento se oculta silenciosamente.
42
+
43
+ ## Comandos
44
+
45
+ ```bash
46
+ cc-costline install # Configurar la integración con Claude Code
47
+ cc-costline uninstall # Eliminar de la configuración
48
+ cc-costline refresh # Recalcular manualmente la caché de costos
49
+ cc-costline config --period 30d # Mostrar costo de 30 días (por defecto)
50
+ cc-costline config --period 7d # Mostrar costo de 7 días
51
+ ```
52
+
53
+ ## Cómo funciona
54
+
55
+ 1. `install` configura `~/.claude/settings.json` — establece el comando de statusline y añade hooks de fin de sesión para la actualización automática. Tu configuración existente se conserva.
56
+ 2. `render` lee el JSON de stdin de Claude Code y la caché de costos, y genera la statusline formateada.
57
+ 3. `refresh` escanea `~/.claude/projects/**/*.jsonl`, extrae el uso de tokens, aplica precios por modelo y escribe en `~/.cc-costline/cache.json`.
58
+ 4. El uso de Claude se obtiene de `api.anthropic.com/api/oauth/usage` con una caché de 60 s en `/tmp/sl-claude-usage`.
59
+ 5. El ranking de ccclub se obtiene de `ccclub.dev/api/rank` con una caché de 120 s en `/tmp/sl-ccclub-rank`.
60
+
61
+ <details>
62
+ <summary>Tabla de precios</summary>
63
+
64
+ Precios por millón de tokens (USD):
65
+
66
+ | Modelo | Entrada | Salida | Escritura caché | Lectura caché |
67
+ |--------|--------:|-------:|----------------:|--------------:|
68
+ | Opus 4.6 | $5 | $25 | $6.25 | $0.50 |
69
+ | Opus 4.5 | $5 | $25 | $6.25 | $0.50 |
70
+ | Opus 4.1 | $15 | $75 | $18.75 | $1.50 |
71
+ | Sonnet 4.5 | $3 | $15 | $3.75 | $0.30 |
72
+ | Sonnet 4 | $3 | $15 | $3.75 | $0.30 |
73
+ | Haiku 4.5 | $1 | $5 | $1.25 | $0.10 |
74
+ | Haiku 3.5 | $0.80 | $4 | $1.00 | $0.08 |
75
+
76
+ Los modelos desconocidos usan el precio de su familia, Sonnet por defecto.
77
+
78
+ </details>
79
+
80
+ ## Desinstalación
81
+
82
+ ```bash
83
+ cc-costline uninstall
84
+ npm uninstall -g cc-costline
85
+ ```
86
+
87
+ ## Agradecimientos
88
+
89
+ - [ccclub](https://github.com/mazzzystar/ccclub) por 碎瓜 ([@mazzzystar](https://github.com/mazzzystar)) — ranking de Claude Code entre amigos
90
+
91
+ ## Licencia
92
+
93
+ MIT
package/README.fr.md ADDED
@@ -0,0 +1,93 @@
1
+ [English](README.md) | [中文](README.zh-CN.md) | [日本語](README.ja.md) | [Español](README.es.md)
2
+
3
+ # cc-costline
4
+
5
+ Statusline enrichie pour [Claude Code](https://docs.anthropic.com/en/docs/claude-code) — ajoute le suivi des coûts, les limites d'utilisation et le classement dans votre terminal.
6
+
7
+ ![Capture d'écran cc-costline](screenshot.png)
8
+
9
+ ```
10
+ 14.6k ~ $2.42 / 40% by Opus 4.6 | 5h: 45% / 7d: 8% | 30d: $866 | #2/22 $67.0
11
+ ```
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm i -g cc-costline && cc-costline install
17
+ ```
18
+
19
+ Ouvrez une nouvelle session Claude Code et la statusline enrichie apparaîtra. Nécessite Node.js >= 22.
20
+
21
+ ## Fonctionnalités
22
+
23
+ | Segment | Exemple | Description |
24
+ |---------|---------|-------------|
25
+ | Tokens ~ Coût / Contexte | `14.6k ~ $2.42 / 40% by Opus 4.6` | Nombre de tokens, coût, utilisation du contexte et modèle |
26
+ | Limites d'utilisation | `5h: 45% / 7d: 8%` | Utilisation Claude sur 5 heures et 7 jours (colorée comme le contexte) |
27
+ | Coût périodique | `30d: $866` | Coût cumulé glissant (configurable : 7j ou 30j) |
28
+ | Classement | `#2/22 $67.0` | Rang [ccclub](https://github.com/mazzzystar/ccclub) (si installé) |
29
+
30
+ ### Couleurs
31
+
32
+ - **Contexte et limites** — vert (< 60 %) → orange (60-79 %) → rouge (≥ 80 %)
33
+ - **Rang au classement** — 1er : or, 2e : blanc, 3e : orange, autres : bleu
34
+ - **Coût périodique** — jaune
35
+
36
+ ### Intégrations optionnelles
37
+
38
+ - **Limites d'utilisation Claude** — lit automatiquement les identifiants OAuth depuis le trousseau macOS. Il suffit de lancer `claude login`.
39
+ - **Classement ccclub** — installez [ccclub](https://github.com/mazzzystar/ccclub) (`npm i -g ccclub && ccclub init`). Le rang s'affiche automatiquement.
40
+
41
+ Les deux fonctionnent sans configuration : si indisponibles, le segment est masqué silencieusement.
42
+
43
+ ## Commandes
44
+
45
+ ```bash
46
+ cc-costline install # Configurer l'intégration Claude Code
47
+ cc-costline uninstall # Supprimer des paramètres
48
+ cc-costline refresh # Recalculer manuellement le cache des coûts
49
+ cc-costline config --period 30d # Afficher le coût sur 30 jours (par défaut)
50
+ cc-costline config --period 7d # Afficher le coût sur 7 jours
51
+ ```
52
+
53
+ ## Fonctionnement
54
+
55
+ 1. `install` configure `~/.claude/settings.json` — définit la commande statusline et ajoute des hooks de fin de session pour le rafraîchissement automatique. Vos paramètres existants sont préservés.
56
+ 2. `render` lit le JSON stdin de Claude Code et le cache des coûts, puis produit la statusline formatée.
57
+ 3. `refresh` parcourt `~/.claude/projects/**/*.jsonl`, extrait l'utilisation des tokens, applique la tarification par modèle et écrit dans `~/.cc-costline/cache.json`.
58
+ 4. L'utilisation Claude est récupérée depuis `api.anthropic.com/api/oauth/usage` avec un cache fichier de 60 s dans `/tmp/sl-claude-usage`.
59
+ 5. Le rang ccclub est récupéré depuis `ccclub.dev/api/rank` avec un cache fichier de 120 s dans `/tmp/sl-ccclub-rank`.
60
+
61
+ <details>
62
+ <summary>Grille tarifaire</summary>
63
+
64
+ Prix par million de tokens (USD) :
65
+
66
+ | Modèle | Entrée | Sortie | Écriture cache | Lecture cache |
67
+ |--------|-------:|-------:|---------------:|--------------:|
68
+ | Opus 4.6 | 5 $ | 25 $ | 6,25 $ | 0,50 $ |
69
+ | Opus 4.5 | 5 $ | 25 $ | 6,25 $ | 0,50 $ |
70
+ | Opus 4.1 | 15 $ | 75 $ | 18,75 $ | 1,50 $ |
71
+ | Sonnet 4.5 | 3 $ | 15 $ | 3,75 $ | 0,30 $ |
72
+ | Sonnet 4 | 3 $ | 15 $ | 3,75 $ | 0,30 $ |
73
+ | Haiku 4.5 | 1 $ | 5 $ | 1,25 $ | 0,10 $ |
74
+ | Haiku 3.5 | 0,80 $ | 4 $ | 1,00 $ | 0,08 $ |
75
+
76
+ Les modèles inconnus utilisent le prix de leur famille, Sonnet par défaut.
77
+
78
+ </details>
79
+
80
+ ## Désinstallation
81
+
82
+ ```bash
83
+ cc-costline uninstall
84
+ npm uninstall -g cc-costline
85
+ ```
86
+
87
+ ## Remerciements
88
+
89
+ - [ccclub](https://github.com/mazzzystar/ccclub) par 碎瓜 ([@mazzzystar](https://github.com/mazzzystar)) — classement Claude Code entre amis
90
+
91
+ ## Licence
92
+
93
+ MIT
package/README.ja.md ADDED
@@ -0,0 +1,93 @@
1
+ [English](README.md) | [中文](README.zh-CN.md) | [Français](README.fr.md) | [Español](README.es.md)
2
+
3
+ # cc-costline
4
+
5
+ [Claude Code](https://docs.anthropic.com/en/docs/claude-code) 向けの拡張ステータスライン — コスト追跡、使用制限、リーダーボードランキングをターミナルに表示します。
6
+
7
+ ![cc-costline スクリーンショット](screenshot.png)
8
+
9
+ ```
10
+ 14.6k ~ $2.42 / 40% by Opus 4.6 | 5h: 45% / 7d: 8% | 30d: $866 | #2/22 $67.0
11
+ ```
12
+
13
+ ## インストール
14
+
15
+ ```bash
16
+ npm i -g cc-costline && cc-costline install
17
+ ```
18
+
19
+ 新しい Claude Code セッションを開くと、拡張ステータスラインが表示されます。Node.js >= 22 が必要です。
20
+
21
+ ## 機能
22
+
23
+ | セグメント | 例 | 説明 |
24
+ |-----------|---|------|
25
+ | トークン ~ コスト / コンテキスト | `14.6k ~ $2.42 / 40% by Opus 4.6` | セッションのトークン数、コスト、コンテキスト使用率、モデル |
26
+ | 使用制限 | `5h: 45% / 7d: 8%` | Claude の 5 時間・7 日間の使用率(コンテキストと同じ色分け) |
27
+ | 期間コスト | `30d: $866` | ローリングコスト合計(7d または 30d で設定可能) |
28
+ | リーダーボード | `#2/22 $67.0` | [ccclub](https://github.com/mazzzystar/ccclub) ランキング(インストール時) |
29
+
30
+ ### カラールール
31
+
32
+ - **コンテキスト・使用制限** — 緑(< 60%)→ オレンジ(60-79%)→ 赤(≥ 80%)
33
+ - **リーダーボードランク** — 1 位:ゴールド、2 位:ホワイト、3 位:オレンジ、その他:ブルー
34
+ - **期間コスト** — イエロー
35
+
36
+ ### オプション連携
37
+
38
+ - **Claude 使用制限** — macOS キーチェーンから OAuth 認証情報を自動で読み取ります。`claude login` するだけで動作します。
39
+ - **ccclub リーダーボード** — [ccclub](https://github.com/mazzzystar/ccclub) をインストール(`npm i -g ccclub && ccclub init`)すると、ランキングが自動表示されます。
40
+
41
+ どちらもゼロ設定:利用できない場合、該当セグメントは静かに非表示になります。
42
+
43
+ ## コマンド
44
+
45
+ ```bash
46
+ cc-costline install # Claude Code 連携のセットアップ
47
+ cc-costline uninstall # 設定から削除
48
+ cc-costline refresh # コストキャッシュを手動再計算
49
+ cc-costline config --period 30d # 30 日間のコストを表示(デフォルト)
50
+ cc-costline config --period 7d # 7 日間のコストを表示
51
+ ```
52
+
53
+ ## 仕組み
54
+
55
+ 1. `install` は `~/.claude/settings.json` を設定 — ステータスラインコマンドとセッション終了フックを追加します。既存の設定は保持されます。
56
+ 2. `render` は Claude Code の stdin JSON とコストキャッシュを読み取り、フォーマットされたステータスラインを出力します。
57
+ 3. `refresh` は `~/.claude/projects/**/*.jsonl` をスキャンし、トークン使用量を抽出、モデル別価格を適用して `~/.cc-costline/cache.json` に書き込みます。
58
+ 4. Claude 使用率は `api.anthropic.com/api/oauth/usage` から取得され、60 秒のファイルキャッシュが `/tmp/sl-claude-usage` に保存されます。
59
+ 5. ccclub ランキングは `ccclub.dev/api/rank` から取得され、120 秒のファイルキャッシュが `/tmp/sl-ccclub-rank` に保存されます。
60
+
61
+ <details>
62
+ <summary>料金表</summary>
63
+
64
+ 100 万トークンあたりの価格(USD):
65
+
66
+ | モデル | 入力 | 出力 | キャッシュ書込 | キャッシュ読取 |
67
+ |--------|-----:|-----:|-------------:|-------------:|
68
+ | Opus 4.6 | $5 | $25 | $6.25 | $0.50 |
69
+ | Opus 4.5 | $5 | $25 | $6.25 | $0.50 |
70
+ | Opus 4.1 | $15 | $75 | $18.75 | $1.50 |
71
+ | Sonnet 4.5 | $3 | $15 | $3.75 | $0.30 |
72
+ | Sonnet 4 | $3 | $15 | $3.75 | $0.30 |
73
+ | Haiku 4.5 | $1 | $5 | $1.25 | $0.10 |
74
+ | Haiku 3.5 | $0.80 | $4 | $1.00 | $0.08 |
75
+
76
+ 不明なモデルはファミリー名でフォールバックし、デフォルトで Sonnet の価格が適用されます。
77
+
78
+ </details>
79
+
80
+ ## アンインストール
81
+
82
+ ```bash
83
+ cc-costline uninstall
84
+ npm uninstall -g cc-costline
85
+ ```
86
+
87
+ ## 謝辞
88
+
89
+ - [ccclub](https://github.com/mazzzystar/ccclub) by 碎瓜 ([@mazzzystar](https://github.com/mazzzystar)) — Claude Code フレンドリーダーボード
90
+
91
+ ## ライセンス
92
+
93
+ MIT
package/README.md CHANGED
@@ -1,7 +1,11 @@
1
+ [中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md) | [Español](README.es.md)
2
+
1
3
  # cc-costline
2
4
 
3
5
  Enhanced statusline for [Claude Code](https://docs.anthropic.com/en/docs/claude-code) — adds cost tracking, usage limits, and leaderboard rank to your terminal.
4
6
 
7
+ ![cc-costline screenshot](screenshot.png)
8
+
5
9
  ```
6
10
  14.6k ~ $2.42 / 40% by Opus 4.6 | 5h: 45% / 7d: 8% | 30d: $866 | #2/22 $67.0
7
11
  ```
@@ -21,7 +25,7 @@ Open a new Claude Code session and you'll see the enhanced statusline. Requires
21
25
  | Tokens ~ Cost / Context | `14.6k ~ $2.42 / 40% by Opus 4.6` | Session token count, cost, context usage, and model |
22
26
  | Usage limits | `5h: 45% / 7d: 8%` | Claude 5-hour and 7-day utilization (auto-colored like context) |
23
27
  | Period cost | `30d: $866` | Rolling cost total (configurable: 7d or 30d) |
24
- | Leaderboard | `#2/22 $67.0` | [ccclub](https://github.com/mfbx9da4/ccclub) rank (if installed) |
28
+ | Leaderboard | `#2/22 $67.0` | [ccclub](https://github.com/mazzzystar/ccclub) rank (if installed) |
25
29
 
26
30
  ### Colors
27
31
 
@@ -32,7 +36,7 @@ Open a new Claude Code session and you'll see the enhanced statusline. Requires
32
36
  ### Optional integrations
33
37
 
34
38
  - **Claude usage limits** — reads OAuth credentials from macOS Keychain automatically. Just `claude login` and it works.
35
- - **ccclub leaderboard** — install [ccclub](https://github.com/mfbx9da4/ccclub) (`npm i -g ccclub && ccclub init`). Rank appears automatically.
39
+ - **ccclub leaderboard** — install [ccclub](https://github.com/mazzzystar/ccclub) (`npm i -g ccclub && ccclub init`). Rank appears automatically.
36
40
 
37
41
  Both are zero-config: if not available, the segment is silently omitted.
38
42
 
@@ -80,6 +84,10 @@ cc-costline uninstall
80
84
  npm uninstall -g cc-costline
81
85
  ```
82
86
 
87
+ ## Acknowledgments
88
+
89
+ - [ccclub](https://github.com/mazzzystar/ccclub) by 碎瓜 ([@mazzzystar](https://github.com/mazzzystar)) — Claude Code leaderboard among friends
90
+
83
91
  ## License
84
92
 
85
93
  MIT
@@ -0,0 +1,93 @@
1
+ [English](README.md) | [日本語](README.ja.md) | [Français](README.fr.md) | [Español](README.es.md)
2
+
3
+ # cc-costline
4
+
5
+ 为 [Claude Code](https://docs.anthropic.com/en/docs/claude-code) 打造的增强状态栏 — 在终端中显示费用追踪、使用限额和排行榜排名。
6
+
7
+ ![cc-costline 截图](screenshot.png)
8
+
9
+ ```
10
+ 14.6k ~ $2.42 / 40% by Opus 4.6 | 5h: 45% / 7d: 8% | 30d: $866 | #2/22 $67.0
11
+ ```
12
+
13
+ ## 安装
14
+
15
+ ```bash
16
+ npm i -g cc-costline && cc-costline install
17
+ ```
18
+
19
+ 打开一个新的 Claude Code 会话即可看到增强状态栏。需要 Node.js >= 22。
20
+
21
+ ## 功能一览
22
+
23
+ | 模块 | 示例 | 说明 |
24
+ |------|------|------|
25
+ | Token ~ 费用 / 上下文 | `14.6k ~ $2.42 / 40% by Opus 4.6` | 会话 token 数量、费用、上下文使用率和模型 |
26
+ | 使用限额 | `5h: 45% / 7d: 8%` | Claude 5 小时和 7 天使用率(颜色同上下文) |
27
+ | 周期费用 | `30d: $866` | 滚动费用合计(可配置:7d 或 30d) |
28
+ | 排行榜 | `#2/22 $67.0` | [ccclub](https://github.com/mazzzystar/ccclub) 排名(需安装) |
29
+
30
+ ### 颜色规则
31
+
32
+ - **上下文和使用限额** — 绿色(< 60%)→ 橙色(60-79%)→ 红色(≥ 80%)
33
+ - **排行榜排名** — 第 1 名金色,第 2 名白色,第 3 名橙色,其余蓝色
34
+ - **周期费用** — 黄色
35
+
36
+ ### 可选集成
37
+
38
+ - **Claude 使用限额** — 自动从 macOS 钥匙串读取 OAuth 凭证。只需 `claude login` 即可。
39
+ - **ccclub 排行榜** — 安装 [ccclub](https://github.com/mazzzystar/ccclub)(`npm i -g ccclub && ccclub init`),排名自动显示。
40
+
41
+ 两者均为零配置:不可用时对应模块静默隐藏。
42
+
43
+ ## 命令
44
+
45
+ ```bash
46
+ cc-costline install # 设置 Claude Code 集成
47
+ cc-costline uninstall # 从设置中移除
48
+ cc-costline refresh # 手动重新计算费用缓存
49
+ cc-costline config --period 30d # 显示 30 天费用(默认)
50
+ cc-costline config --period 7d # 显示 7 天费用
51
+ ```
52
+
53
+ ## 工作原理
54
+
55
+ 1. `install` 配置 `~/.claude/settings.json` — 设置状态栏命令并添加会话结束 hook 以自动刷新。你的现有设置会被保留。
56
+ 2. `render` 读取 Claude Code 的 stdin JSON 和费用缓存,输出格式化的状态栏。
57
+ 3. `refresh` 扫描 `~/.claude/projects/**/*.jsonl`,提取 token 用量,按模型定价计算,写入 `~/.cc-costline/cache.json`。
58
+ 4. Claude 使用率从 `api.anthropic.com/api/oauth/usage` 获取,60 秒文件缓存于 `/tmp/sl-claude-usage`。
59
+ 5. ccclub 排名从 `ccclub.dev/api/rank` 获取,120 秒文件缓存于 `/tmp/sl-ccclub-rank`。
60
+
61
+ <details>
62
+ <summary>定价表</summary>
63
+
64
+ 每百万 token 价格(美元):
65
+
66
+ | 模型 | 输入 | 输出 | 缓存写入 | 缓存读取 |
67
+ |------|-----:|-----:|---------:|---------:|
68
+ | Opus 4.6 | $5 | $25 | $6.25 | $0.50 |
69
+ | Opus 4.5 | $5 | $25 | $6.25 | $0.50 |
70
+ | Opus 4.1 | $15 | $75 | $18.75 | $1.50 |
71
+ | Sonnet 4.5 | $3 | $15 | $3.75 | $0.30 |
72
+ | Sonnet 4 | $3 | $15 | $3.75 | $0.30 |
73
+ | Haiku 4.5 | $1 | $5 | $1.25 | $0.10 |
74
+ | Haiku 3.5 | $0.80 | $4 | $1.00 | $0.08 |
75
+
76
+ 未知模型按系列名称回退,默认使用 Sonnet 定价。
77
+
78
+ </details>
79
+
80
+ ## 卸载
81
+
82
+ ```bash
83
+ cc-costline uninstall
84
+ npm uninstall -g cc-costline
85
+ ```
86
+
87
+ ## 致谢
88
+
89
+ - [ccclub](https://github.com/mazzzystar/ccclub) by 碎瓜 ([@mazzzystar](https://github.com/mazzzystar)) — Claude Code 好友排行榜
90
+
91
+ ## 许可证
92
+
93
+ MIT
package/dist/cli.js CHANGED
File without changes
@@ -171,22 +171,22 @@ export function render(input) {
171
171
  const claudeUsage = getClaudeUsage();
172
172
  const parts = [];
173
173
  // 1. Tokens ~ cost / context % + model
174
- parts.push(`${FG_GRAY_DIM}${formatTokens(totalTokens)}${RESET} ${FG_GRAY_DIM}~${RESET} ${FG_YELLOW}${formatCost(cost)}${RESET} ${FG_GRAY_DIM}/${RESET} ${ctxColor(contextPct)}${contextPct}%${RESET} ${FG_GRAY_DIM}by${RESET} ${FG_MODEL}${model}${RESET}`);
174
+ parts.push(`${FG_GRAY_DIM}${formatTokens(totalTokens)}${RESET} ${FG_GRAY_DIM}~${RESET} ${FG_YELLOW}${formatCost(cost)}${RESET} ${FG_GRAY_DIM}/${RESET} ${ctxColor(contextPct)}${contextPct}%${RESET} ${FG_GRAY_DIM}by${RESET} ${FG_MODEL}${model}${RESET}`);
175
175
  // 2. Claude usage limits (colored by utilization)
176
176
  if (claudeUsage) {
177
- parts.push(`${ctxColor(claudeUsage.fiveHour)}5h: ${claudeUsage.fiveHour}%${RESET} ${FG_GRAY_DIM}/${RESET} ${ctxColor(claudeUsage.sevenDay)}7d: ${claudeUsage.sevenDay}%${RESET}`);
177
+ parts.push(`${FG_GRAY_DIM}⧖${RESET} ${ctxColor(claudeUsage.fiveHour)}5h: ${claudeUsage.fiveHour}%${RESET} ${FG_GRAY_DIM}/${RESET} ${ctxColor(claudeUsage.sevenDay)}7d: ${claudeUsage.sevenDay}%${RESET}`);
178
178
  }
179
179
  // 3. Period cost (default 30d, configurable)
180
180
  if (cache) {
181
181
  const period = config.period || "30d";
182
182
  const periodCost = period === "7d" ? cache.cost7d : cache.cost30d;
183
- parts.push(`${FG_YELLOW}${period}: ${formatCost(periodCost)}${RESET}`);
183
+ parts.push(`${FG_YELLOW}Σ ${period}: ${formatCost(periodCost)}${RESET}`);
184
184
  }
185
185
  // 4. ccclub rank (colored by position)
186
186
  const ccclubRank = getCcclubRank();
187
187
  if (ccclubRank) {
188
188
  const rc = rankColor(ccclubRank.rank);
189
- parts.push(`${rc}#${ccclubRank.rank}/${ccclubRank.total} ${formatCost(ccclubRank.cost)}${RESET}`);
189
+ parts.push(`${rc}#${ccclubRank.rank}/${ccclubRank.total} ${formatCost(ccclubRank.cost)}${RESET}`);
190
190
  }
191
191
  return "\n " + parts.join(` ${FG_GRAY}|${RESET} `) + "\n";
192
192
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-costline",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Enhanced statusline for Claude Code with cost tracking, usage limits, and leaderboard",
5
5
  "type": "module",
6
6
  "bin": {