claude-blip 1.0.0 → 1.0.1

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 +67 -40
  2. package/package.json +1 -1
  3. package/statusline.js +6 -3
package/README.md CHANGED
@@ -1,26 +1,22 @@
1
+ <div align="center">
2
+
1
3
  # claude-blip
2
4
 
3
- A single-file statusline for Claude Code.
5
+ **A single-file statusline for Claude Code.**
6
+ *Zero dependencies. One command. Just a blip.*
4
7
 
5
- Zero dependencies. Just a blip.
8
+ [![npm](https://img.shields.io/npm/v/claude-blip)](https://www.npmjs.com/package/claude-blip)
9
+ [![install size](https://packagephobia.com/badge?p=claude-blip)](https://packagephobia.com/result?p=claude-blip)
10
+ [![license](https://img.shields.io/npm/l/claude-blip)](LICENSE)
6
11
 
7
- ```
8
- Fixing auth bug │ myapp │ main │ opus │ ━━━━━━──── 120K
9
- ```
12
+ ![variants](variants.gif)
10
13
 
11
- ## What you get
12
-
13
- ```
14
- task │ project │ branch │ model │ context
15
- ```
14
+ *dim when chill, yellow when warm, red when you should probably wrap up*
16
15
 
17
- - **Task** — what Claude is doing right now (bold, from todo list)
18
- - **Project** — directory name
19
- - **Branch** — current git branch
20
- - **Model** — opus, sonnet, haiku
21
- - **Context** — usage bar that goes from dim → yellow → red as you fill up
16
+ </div>
22
17
 
23
- Segments drop off the left when your terminal is narrow. Context bar always stays.
18
+ Five segments. No config files. No themes. No plugins.
19
+ It just shows you what matters and gets out of the way.
24
20
 
25
21
  ## Install
26
22
 
@@ -28,60 +24,91 @@ Segments drop off the left when your terminal is narrow. Context bar always stay
28
24
  npx claude-blip
29
25
  ```
30
26
 
31
- That's it. Restart Claude Code.
27
+ That's it. Restart Claude Code. Done.
32
28
 
33
- ### Scopes
29
+ ## What you get
34
30
 
35
- ```sh
36
- npx claude-blip # global (recommended)
37
- npx claude-blip --project # .claude/settings.json (shareable)
38
- npx claude-blip --local # .claude/settings.local.json (gitignored)
39
- ```
31
+ | Segment | What it shows | Style |
32
+ |---------|--------------|-------|
33
+ | **Task** | What Claude is working on right now | **bold** |
34
+ | **Project** | Directory name | dim |
35
+ | **Branch** | Current git branch | dim |
36
+ | **Model** | opus, sonnet, haiku | dim |
37
+ | **Context** | Usage bar + token count | green → yellow → red |
40
38
 
41
- ### Uninstall
39
+ Everything is dim except the task — your eyes go to the thing that matters.
42
40
 
43
- ```sh
44
- npx claude-blip --uninstall
45
- ```
41
+ Terminal too narrow? Segments drop off the left. Context bar always stays.
46
42
 
47
43
  ## Examples
48
44
 
49
- Normal usage everything is dim except the task:
45
+ Normal — plenty of room:
50
46
 
51
47
  ```
52
- Fixing auth bug myapp main opus ━━──────── 40K
48
+ Fixing auth bug · myapp · main · opus · ━━──────── 40K
53
49
  ```
54
50
 
55
- Getting warm (yellow at 70%):
51
+ Getting warm yellow at 70%:
56
52
 
57
53
  ```
58
- myapp main opus ━━━━━━━─── 140K
54
+ myapp · main · opus · ━━━━━━━─── 140K
59
55
  ```
60
56
 
61
- Running hot (red at 90%):
57
+ Running hot red at 90%, time to wrap up:
62
58
 
63
59
  ```
64
- myapp main opus ━━━━━━━━━─ 180K
60
+ myapp · main · opus · ━━━━━━━━━─ 180K
65
61
  ```
66
62
 
67
63
  No task, no git — it adapts:
68
64
 
69
65
  ```
70
- scripts sonnet ━━━━────── 80K
66
+ scripts · sonnet · ━━━━────── 80K
67
+ ```
68
+
69
+ ## Scopes
70
+
71
+ ```sh
72
+ npx claude-blip # global (recommended)
73
+ npx claude-blip --project # .claude/settings.json (shareable with team)
74
+ npx claude-blip --local # .claude/settings.local.json (just you)
75
+ npx claude-blip --uninstall # clean removal from all scopes
71
76
  ```
72
77
 
73
78
  ## How it works
74
79
 
75
- One file. 150 lines. Node.js only (ships with Claude Code).
80
+ One file. ~150 lines. Node.js only (ships with Claude Code — nothing to install).
76
81
 
77
- Claude Code pipes session JSON to your statusline script via stdin. This script reads it, picks out the useful bits, formats them, and writes one line to stdout.
82
+ Claude Code pipes session JSON to your statusline script via stdin. This script reads it, picks out the useful bits, formats them, writes one line to stdout. That's the whole thing.
78
83
 
79
- The context bar scales to 80% — that's roughly where Claude starts compressing context, so 100% on the bar means "you're about to lose history."
84
+ The context bar scales to 80% capacity — that's roughly where Claude starts compressing context, so 100% on the bar means "you're about to lose history."
80
85
 
81
- ## Debug
86
+ <details>
87
+ <summary><strong>Debug mode</strong></summary>
88
+
89
+ Set `debug: true` in the CONFIG object at top of `statusline.js` to dump the full JSON payload to stderr:
90
+
91
+ ```js
92
+ const CONFIG = {
93
+ debug: true, // logs to stderr
94
+ // ...
95
+ };
96
+ ```
82
97
 
83
- Set `debug: true` in the CONFIG object at the top of `statusline.js` to dump the full JSON payload to stderr.
98
+ </details>
99
+
100
+ ## Contributing
101
+
102
+ Found a bug? Want a feature? PRs welcome. Keep it simple — the whole point is one file with zero dependencies.
84
103
 
85
104
  ## License
86
105
 
87
- MIT
106
+ MIT — do whatever you want with it.
107
+
108
+ ---
109
+
110
+ <div align="center">
111
+
112
+ *Built for developers with mass context window anxiety.*
113
+
114
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-blip",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A single-file statusline for Claude Code. Zero dependencies. Just a blip.",
5
5
  "license": "MIT",
6
6
  "author": "davebream",
package/statusline.js CHANGED
@@ -25,6 +25,7 @@ const ANSI = {
25
25
  dim: "\x1b[2m",
26
26
  bold: "\x1b[1m",
27
27
  reset: "\x1b[0m",
28
+ green: "\x1b[38;5;108m",
28
29
  yellow: "\x1b[38;5;222m",
29
30
  red: "\x1b[38;5;167m",
30
31
  };
@@ -100,7 +101,7 @@ function getContextDisplay(ctxWindow) {
100
101
  const tokenStr = formatTokens(Math.round(maxTokens * (rawUsed / 100)));
101
102
 
102
103
  if (ratio < CONFIG.warnThreshold) {
103
- return dim(`${bar} ${tokenStr}`);
104
+ return color(`${bar} ${tokenStr}`, ANSI.green);
104
105
  } else if (ratio < CONFIG.criticalThreshold) {
105
106
  return color(`${bar} ${tokenStr}`, ANSI.yellow);
106
107
  } else {
@@ -149,7 +150,9 @@ function buildStatusline(input) {
149
150
  // 4. Model
150
151
  const model = data.model?.display_name;
151
152
  if (model) {
152
- parts.push(dim(model.toLowerCase()));
153
+ // Extract tier name: "Opus 4.6" → "opus", "Sonnet 4.5" → "sonnet"
154
+ const tier = model.split(/\s/)[0].toLowerCase();
155
+ parts.push(dim(tier));
153
156
  }
154
157
 
155
158
  // 5. Context window (bar + token count)
@@ -159,7 +162,7 @@ function buildStatusline(input) {
159
162
  }
160
163
 
161
164
  // Truncate if wider than terminal — drops segments from the left (task first)
162
- const sep = dim(" \u2502 ");
165
+ const sep = dim(" \u00B7 ");
163
166
  const cols = process.stdout.columns || 80;
164
167
  while (parts.length > 1 && stripAnsi(parts.join(sep)).length > cols) {
165
168
  parts.shift();