skill-statusline 1.0.0 → 2.0.0
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.md +124 -30
- package/bin/cli.js +590 -49
- package/bin/statusline.sh +56 -188
- package/layouts/compact.sh +21 -0
- package/layouts/full.sh +62 -0
- package/layouts/standard.sh +39 -0
- package/lib/core.sh +382 -0
- package/lib/helpers.sh +81 -0
- package/lib/json-parser.sh +71 -0
- package/package.json +14 -5
- package/themes/catppuccin.sh +32 -0
- package/themes/default.sh +37 -0
- package/themes/gruvbox.sh +32 -0
- package/themes/nord.sh +32 -0
- package/themes/tokyo-night.sh +32 -0
package/README.md
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# skill-statusline
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Layout
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
Skill: Edit │ GitHub: User/Repo/master+~
|
|
9
|
-
Model: Opus 4.6 │ Dir: Downloads/Project
|
|
10
|
-
Tokens: 25k + 12k = 37k │ Cost: $1.23
|
|
11
|
-
Context: ████████████████████░░░░░░░░░░░░░░░░░░░░ 50%
|
|
12
|
-
```
|
|
3
|
+
Rich, themeable statusline for Claude Code with accurate context tracking, 5 color themes, 3 layout modes, and zero dependencies.
|
|
13
4
|
|
|
14
5
|
## Install
|
|
15
6
|
|
|
@@ -24,40 +15,143 @@ npm install -g skill-statusline
|
|
|
24
15
|
ccsl install
|
|
25
16
|
```
|
|
26
17
|
|
|
27
|
-
|
|
18
|
+
The installer walks you through choosing a theme and layout. Use `--quick` to skip the wizard and use defaults.
|
|
19
|
+
|
|
20
|
+
## Layouts
|
|
21
|
+
|
|
22
|
+
### Compact (2 rows)
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Opus 4.6 │ Downloads/Project │ 47% $1.23
|
|
26
|
+
Context: ████████████████████░░░░░░░░░░░░░░░░░░░░ 47%
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Standard (4 rows — default)
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
Skill: Edit │ GitHub: user/repo/main+~
|
|
33
|
+
Model: Opus 4.6 │ Dir: Downloads/Project
|
|
34
|
+
Tokens: 85k + 12k │ Cost: $1.23
|
|
35
|
+
Context: ████████████████████░░░░░░░░░░░░░░░░░░░░ 46%
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Full (6 rows)
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
Skill: Edit │ GitHub: user/repo/main+~
|
|
42
|
+
Model: Opus 4.6 │ Dir: Downloads/Project
|
|
43
|
+
Window: 85k + 12k │ Cost: $1.23 ($0.12/m)
|
|
44
|
+
Session: 125k + 34k │ +156/-23 12m34s
|
|
45
|
+
Cache: W:5k R:2k │ NORMAL @code-reviewer
|
|
46
|
+
Context: ████████████████████░░░░░░░░░░░░░░░░░░░░ 46% 54% left
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Themes
|
|
28
50
|
|
|
29
|
-
|
|
51
|
+
| Theme | Palette |
|
|
52
|
+
|-------|---------|
|
|
53
|
+
| `default` | Classic purple/pink/cyan |
|
|
54
|
+
| `nord` | Arctic, blue-tinted |
|
|
55
|
+
| `tokyo-night` | Vibrant neon |
|
|
56
|
+
| `catppuccin` | Warm pastels (Mocha) |
|
|
57
|
+
| `gruvbox` | Retro groovy |
|
|
30
58
|
|
|
31
59
|
```bash
|
|
32
|
-
ccsl
|
|
60
|
+
ccsl theme set nord
|
|
33
61
|
```
|
|
34
62
|
|
|
35
63
|
## Fields
|
|
36
64
|
|
|
37
|
-
| Field
|
|
38
|
-
|
|
39
|
-
| Skill
|
|
40
|
-
| Model
|
|
41
|
-
| GitHub
|
|
42
|
-
| Dir
|
|
43
|
-
| Tokens
|
|
44
|
-
| Cost
|
|
45
|
-
| Context |
|
|
65
|
+
| Field | Color | Description |
|
|
66
|
+
|-------|-------|-------------|
|
|
67
|
+
| Skill | Pink | Last tool used (Read, Write, Edit, Terminal, Agent...) |
|
|
68
|
+
| Model | Purple | Active model name + version |
|
|
69
|
+
| GitHub | White | user/repo/branch with `+` staged `~` unstaged indicators |
|
|
70
|
+
| Dir | Cyan | Last 3 path segments of working directory |
|
|
71
|
+
| Tokens | Yellow | Current context window: input + output |
|
|
72
|
+
| Cost | Green | Session cost in USD |
|
|
73
|
+
| Context | Adaptive | 40-char bar — white <=40%, orange 41-75%, red 76-90%, deep red >90% |
|
|
74
|
+
| Session | Dim | Cumulative tokens across all turns (full layout) |
|
|
75
|
+
| Duration | Dim | Session elapsed time (full layout) |
|
|
76
|
+
| Lines | Dim | +added/-removed (full layout) |
|
|
77
|
+
| Cache | Blue | Write/Read cache token counts (full layout) |
|
|
78
|
+
| Vim | Teal | NORMAL/INSERT mode when vim mode is on (full layout) |
|
|
79
|
+
| Agent | Blue | @agent-name when running with --agent (full layout) |
|
|
80
|
+
|
|
81
|
+
## Accurate Context Tracking
|
|
82
|
+
|
|
83
|
+
v2 computes context percentage from actual token counts (`current_usage.input_tokens + cache_creation + cache_read`) divided by `context_window_size`, instead of relying on the pre-calculated `used_percentage` which can lag behind. This fixes the v1 bug where the bar showed 77% while real usage was 92%.
|
|
84
|
+
|
|
85
|
+
Compaction warnings appear at configurable thresholds:
|
|
86
|
+
- **85%+**: Shows remaining percentage (`15% left`)
|
|
87
|
+
- **95%+**: Shows `COMPACTING` warning
|
|
88
|
+
|
|
89
|
+
## CLI Commands
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
ccsl install Install with theme/layout wizard
|
|
93
|
+
ccsl install --quick Install with defaults
|
|
94
|
+
ccsl uninstall Remove statusline
|
|
95
|
+
ccsl update Update scripts (preserves config)
|
|
96
|
+
|
|
97
|
+
ccsl theme List themes
|
|
98
|
+
ccsl theme set <name> Set active theme
|
|
99
|
+
ccsl layout List layouts
|
|
100
|
+
ccsl layout set <name> Set active layout
|
|
101
|
+
|
|
102
|
+
ccsl preview Preview with sample data
|
|
103
|
+
ccsl preview --theme x Preview a specific theme
|
|
104
|
+
ccsl preview --layout x Preview a specific layout
|
|
105
|
+
|
|
106
|
+
ccsl config Show current config
|
|
107
|
+
ccsl config set k v Set config option
|
|
108
|
+
ccsl doctor Run diagnostics + benchmark
|
|
109
|
+
ccsl version Show version
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Config Options
|
|
113
|
+
|
|
114
|
+
Stored in `~/.claude/statusline-config.json`:
|
|
115
|
+
|
|
116
|
+
| Option | Default | Description |
|
|
117
|
+
|--------|---------|-------------|
|
|
118
|
+
| `compaction_warning_threshold` | `85` | % at which to show remaining context warning |
|
|
119
|
+
| `bar_width` | `40` | Width of context bar in characters |
|
|
120
|
+
| `cache_ttl_seconds` | `5` | How long to cache git/transcript results |
|
|
121
|
+
| `show_burn_rate` | `false` | Show $/min burn rate (full layout) |
|
|
122
|
+
| `show_vim_mode` | `true` | Show vim mode indicator |
|
|
123
|
+
| `show_agent_name` | `true` | Show --agent name |
|
|
124
|
+
|
|
125
|
+
## Architecture
|
|
126
|
+
|
|
127
|
+
Pure bash at runtime — zero dependencies. Node.js CLI is only for installation.
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
~/.claude/
|
|
131
|
+
statusline-command.sh # Entry point (called by Claude Code)
|
|
132
|
+
statusline/
|
|
133
|
+
core.sh # Engine: parse JSON, compute fields, render
|
|
134
|
+
json-parser.sh # Nested JSON extraction (no jq)
|
|
135
|
+
helpers.sh # Utilities + filesystem caching
|
|
136
|
+
themes/{default,nord,...}.sh # Color palettes
|
|
137
|
+
layouts/{compact,...}.sh # Render functions
|
|
138
|
+
statusline-config.json # User preferences
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Performance: <50ms with caching, <100ms cold. Git and transcript reads are cached with configurable TTL.
|
|
142
|
+
|
|
143
|
+
Terminal width is auto-detected — layouts gracefully degrade on narrow terminals.
|
|
46
144
|
|
|
47
145
|
## Requirements
|
|
48
146
|
|
|
49
|
-
- Bash
|
|
147
|
+
- Bash (Git Bash on Windows, or any Unix shell)
|
|
50
148
|
- Git (for GitHub field)
|
|
149
|
+
- Node.js >=16 (for installer only)
|
|
51
150
|
- Works on Windows, macOS, Linux
|
|
52
151
|
|
|
53
|
-
## What it installs
|
|
54
|
-
|
|
55
|
-
- `~/.claude/statusline-command.sh` — the statusline script
|
|
56
|
-
- Updates `~/.claude/settings.json` — adds `statusLine` config
|
|
57
|
-
|
|
58
152
|
## Part of the Thinqmesh Skills Ecosystem
|
|
59
153
|
|
|
60
|
-
This statusline is also bundled with [codebase-context-skill](https://www.npmjs.com/package/codebase-context-skill)
|
|
154
|
+
This statusline is also bundled with [codebase-context-skill](https://www.npmjs.com/package/codebase-context-skill).
|
|
61
155
|
|
|
62
156
|
```bash
|
|
63
157
|
npx codebase-context-skill init
|