claude-quota-bar 0.3.2 → 0.4.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.
Files changed (2) hide show
  1. package/README.md +8 -7
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -1,13 +1,16 @@
1
1
  # claude-quota-bar
2
2
 
3
3
  Fast Rust statusline for [Claude Code](https://github.com/anthropics/claude-code).
4
- Battery-style 5-hour / 7-day quota bars, context-window indicator, prompt-cache
5
- state, and `dir:branch *N` — at ~2.5ms cold start and a ~0.5MB binary.
4
+ Battery-style 5-hour / 7-day quota bars, context-window indicator, and
5
+ `dir:branch *N` — at ~2.5ms cold start and a ~0.5MB binary.
6
6
 
7
7
  ```
8
- 5h[███42%░░░░]⏰26m | 7d[███35%░░░░]⏰8d3h | Opus 4.7(71.0k/1.0M) | cache 4m12s | proj:main *3
8
+ 5h[███42%░░░░]⏰26m | 7d[███35%░░░░]⏰8d3h | Opus 4.7(71.0k/1.0M) | proj:main *3
9
9
  ```
10
10
 
11
+ Requires Claude Code ≥ 2.1.132 (where `context_window.total_input_tokens`
12
+ reports the current context occupancy rather than a cumulative session total).
13
+
11
14
  ## Why this and not the Python ones
12
15
 
13
16
  - **Speed.** Claude Code renders statusLine on every prompt. Python is ~50ms cold
@@ -44,14 +47,13 @@ Then wire it into Claude Code (`~/.claude/settings.json`):
44
47
 
45
48
  ## Segments
46
49
 
47
- Default layout: `5h,7d,model,cache,dir`.
50
+ Default layout: `5h,7d,model,dir`.
48
51
 
49
52
  | Segment | Source | What it shows |
50
53
  |---------|--------|---------------|
51
54
  | `5h` | `rate_limits.five_hour` | Battery bar with `%` inside, plus `⏰` countdown to reset |
52
55
  | `7d` | `rate_limits.seven_day` | Same, weekly window |
53
56
  | `model` | `model` + `context_window` | `Opus 4.7(71.0k/1.0M)` — model + ctx tokens used / window |
54
- | `cache` | transcript scan | Time left on the prompt cache (`4m12s`), or `COLD` once it has expired |
55
57
  | `dir` | `workspace.current_dir` + git | `proj:main *3 ↑1 ↓2` — dir, branch, dirty count, ahead/behind |
56
58
 
57
59
  When Anthropic hasn't yet shipped `rate_limits` (first few renders of a fresh
@@ -65,8 +67,7 @@ Configured via environment variables:
65
67
 
66
68
  | Variable | Default | Meaning |
67
69
  |----------|---------|---------|
68
- | `STATUSLINE_LAYOUT` | `5h,7d,model,cache,dir` | Comma-separated segment names (order matters) |
69
- | `STATUSLINE_CACHE_TTL` | `3600` | Prompt-cache lifetime in seconds. The default assumes the 1-hour extended cache that Claude.ai Pro/Max accounts get automatically; set `300` for the standard 5-minute cache. The active TTL isn't exposed to the statusline, so it can't be auto-detected. |
70
+ | `STATUSLINE_LAYOUT` | `5h,7d,model,dir` | Comma-separated segment names (order matters) |
70
71
  | `NO_COLOR` | unset | If set, strips all ANSI — falls back to `█`/`░` glyphs |
71
72
 
72
73
  Severity thresholds (green / yellow / red) flip at 30% and 70% quota used.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "claude-quota-bar",
3
- "version": "0.3.2",
4
- "description": "Fast Rust statusline for Claude Code — battery-bar 5h/7d quota, ctx, cache age, git",
3
+ "version": "0.4.0",
4
+ "description": "Fast Rust statusline for Claude Code — battery-bar 5h/7d quota, ctx, git",
5
5
  "keywords": [
6
6
  "claude",
7
7
  "statusline",
@@ -29,12 +29,12 @@
29
29
  "node": ">=16"
30
30
  },
31
31
  "optionalDependencies": {
32
- "claude-quota-bar-darwin-arm64": "0.3.2",
33
- "claude-quota-bar-darwin-x64": "0.3.2",
34
- "claude-quota-bar-linux-x64": "0.3.2",
35
- "claude-quota-bar-linux-x64-musl": "0.3.2",
36
- "claude-quota-bar-linux-arm64": "0.3.2",
37
- "claude-quota-bar-linux-arm64-musl": "0.3.2",
38
- "claude-quota-bar-win32-x64": "0.3.2"
32
+ "claude-quota-bar-darwin-arm64": "0.4.0",
33
+ "claude-quota-bar-darwin-x64": "0.4.0",
34
+ "claude-quota-bar-linux-x64": "0.4.0",
35
+ "claude-quota-bar-linux-x64-musl": "0.4.0",
36
+ "claude-quota-bar-linux-arm64": "0.4.0",
37
+ "claude-quota-bar-linux-arm64-musl": "0.4.0",
38
+ "claude-quota-bar-win32-x64": "0.4.0"
39
39
  }
40
40
  }