@alyibrahim/claude-statusline 1.4.1 → 1.4.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.
Files changed (3) hide show
  1. package/README.md +72 -10
  2. package/package.json +1 -2
  3. package/scripts/history.js +599 -599
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ <div align="center">
2
+
1
3
  # claude-statusline
2
4
 
3
5
  [![CI](https://github.com/AlyIbrahim1/claude-statusline/actions/workflows/ci.yml/badge.svg)](https://github.com/AlyIbrahim1/claude-statusline/actions/workflows/ci.yml)
@@ -8,12 +10,18 @@
8
10
 
9
11
  Runs as a **compiled Rust binary** (~5ms startup vs ~100ms for Node.js). Zero shell dependencies. One install command.
10
12
 
11
- ![statusline screenshot](https://raw.githubusercontent.com/AlyIbrahim1/claude-statusline/main/.github/image.png)
13
+ ![statusline screenshot](https://raw.githubusercontent.com/AlyIbrahim1/claude-statusline/main/.github/assets/statusline.png)
14
+
15
+ </div>
12
16
 
13
17
  ---
14
18
 
19
+ <div align="center">
20
+
15
21
  ## Install
16
22
 
23
+ </div>
24
+
17
25
  ```bash
18
26
  npm install -g @alyibrahim/claude-statusline
19
27
  ```
@@ -24,8 +32,12 @@ Done. The statusline configures itself automatically. Restart Claude Code to see
24
32
 
25
33
  ---
26
34
 
35
+ <div align="center">
36
+
27
37
  ## What you get
28
38
 
39
+ </div>
40
+
29
41
  **Line 1** — Model name · Effort level · Active subagents · Current task · Directory `(branch +commits)` · Context bar
30
42
 
31
43
  **Line 2** — Weekly token usage · 5h usage · Reset countdown *(Pro/Max)* — or — Session cost *(API key)* · Session tokens `X↓ Y↑`
@@ -44,24 +56,57 @@ Done. The statusline configures itself automatically. Restart Claude Code to see
44
56
 
45
57
  ---
46
58
 
47
- ## Platform support
59
+ <div align="center">
60
+
61
+ ## Session History
62
+
63
+ </div>
48
64
 
49
- The Rust binary is pre-built and installed automatically for your platform via npm `optionalDependencies`:
65
+ Track token usage, cost, and duration across every Claude Code session with a built-in analytics dashboard.
50
66
 
51
- | Platform | Package |
67
+ ![history dashboard](https://raw.githubusercontent.com/AlyIbrahim1/claude-statusline/main/.github/assets/history-dashboard.png)
68
+
69
+ Session history is **enabled by default** on setup. Each session records:
70
+
71
+ | Field | Details |
52
72
  |---|---|
53
- | Linux x64 | [`@alyibrahim/claude-statusline-linux-x64`](https://www.npmjs.com/package/@alyibrahim/claude-statusline-linux-x64) |
54
- | Linux arm64 | [`@alyibrahim/claude-statusline-linux-arm64`](https://www.npmjs.com/package/@alyibrahim/claude-statusline-linux-arm64) |
55
- | macOS x64 (Intel) | [`@alyibrahim/claude-statusline-darwin-x64`](https://www.npmjs.com/package/@alyibrahim/claude-statusline-darwin-x64) |
56
- | macOS arm64 (Apple Silicon) | [`@alyibrahim/claude-statusline-darwin-arm64`](https://www.npmjs.com/package/@alyibrahim/claude-statusline-darwin-arm64) |
57
- | Windows x64 | [`@alyibrahim/claude-statusline-win32-x64`](https://www.npmjs.com/package/@alyibrahim/claude-statusline-win32-x64) |
73
+ | Project | Directory name and path |
74
+ | Model | Which Claude model was used |
75
+ | Tokens | Input and output counts |
76
+ | Cost | USD cost (API key users) |
77
+ | Duration | Session length in seconds |
78
+ | Exit reason | How the session ended |
79
+
80
+ **Commands:**
81
+
82
+ ```bash
83
+ claude-statusline history # Open the analytics dashboard
84
+ claude-statusline enable-history # Enable session tracking
85
+ claude-statusline disable-history # Disable session tracking
86
+ ```
58
87
 
59
- npm picks the right one automatically. If your platform isn't listed, the JS fallback is used instead no action needed.
88
+ Data is stored at `~/.claude/statusline-history.jsonl`. The dashboard opens in your browser and supports project filtering and light/dark theme toggle.
60
89
 
61
90
  ---
62
91
 
92
+ <div align="center">
93
+
94
+ ## Platform support
95
+
96
+ </div>
97
+
98
+ Pre-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.
99
+
100
+ See [PLATFORMS.md](PLATFORMS.md) for the full compatibility guide, per-platform install instructions, and feature availability table.
101
+
102
+ ---
103
+
104
+ <div align="center">
105
+
63
106
  ## Why this one
64
107
 
108
+ </div>
109
+
65
110
  | | claude-statusline | Others |
66
111
  |---|---|---|
67
112
  | Startup time | ~5ms (Rust binary) | ~100ms (Node.js cold-start every prompt) |
@@ -72,18 +117,27 @@ npm picks the right one automatically. If your platform isn't listed, the JS fal
72
117
  | Subagent counter | Counts active agents from todos dir | — |
73
118
  | Session tokens | Real-time via JSONL offset cache, split I/O (`X↓ Y↑`) | Stale stdin snapshot or none |
74
119
  | Session commits | Tracks git commits made this session | — |
120
+ | Session history | Analytics dashboard with per-project filtering, zero dependencies | — |
75
121
 
76
122
  ---
77
123
 
124
+ <div align="center">
125
+
78
126
  ## Requirements
79
127
 
128
+ </div>
129
+
80
130
  - **Node.js ≥16** — for install/uninstall scripts only (not needed at runtime on supported platforms)
81
131
  - **git** — optional, enables branch display
82
132
 
83
133
  ---
84
134
 
135
+ <div align="center">
136
+
85
137
  ## Uninstall
86
138
 
139
+ </div>
140
+
87
141
  ```bash
88
142
  claude-statusline uninstall
89
143
  npm uninstall -g @alyibrahim/claude-statusline
@@ -93,12 +147,20 @@ npm uninstall -g @alyibrahim/claude-statusline
93
147
 
94
148
  ---
95
149
 
150
+ <div align="center">
151
+
96
152
  ## Notes
97
153
 
154
+ </div>
155
+
98
156
  - Settings are written only to the `statusLine` key — all other `~/.claude/settings.json` keys are untouched
99
157
  - Respects `$CLAUDE_CONFIG_DIR` if set
100
158
  - Switched Node versions on an unsupported platform? Re-run `claude-statusline setup`
101
159
 
160
+ <div align="center">
161
+
102
162
  ## License
103
163
 
104
164
  MIT
165
+
166
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alyibrahim/claude-statusline",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Rich statusline for Claude Code — model, context bar, real-time token tracking, git branch, rate limits, and session stats. Rust binary, ~5ms startup.",
5
5
  "keywords": [
6
6
  "claude",
@@ -56,7 +56,6 @@
56
56
  "open": "^10.1.0"
57
57
  },
58
58
  "optionalDependencies": {
59
- "better-sqlite3": "^11.3.0",
60
59
  "@alyibrahim/claude-statusline-linux-x64": "1.4.0",
61
60
  "@alyibrahim/claude-statusline-linux-arm64": "1.4.0",
62
61
  "@alyibrahim/claude-statusline-darwin-x64": "1.4.0",