@babarot/c-c-statusline 0.2.3 → 0.2.5
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 +71 -25
- package/bin/install.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
# c-c-statusline
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
[](https://github.com/babarot/c-c-statusline/actions/workflows/test.yml)
|
|
5
|
+
|
|
3
6
|
A Deno-powered status line for Claude Code CLI.
|
|
4
7
|
|
|
5
8
|
Shows model info, context usage, rate limits, git status, session duration, and more — right in your terminal.
|
|
6
9
|
|
|
7
|
-

|
|
8
11
|
|
|
9
12
|
## Install
|
|
10
13
|
|
|
@@ -39,6 +42,7 @@ curl -fsSL https://raw.githubusercontent.com/babarot/c-c-statusline/main/bin/ins
|
|
|
39
42
|
Then edit to your liking:
|
|
40
43
|
|
|
41
44
|
```yaml
|
|
45
|
+
# ~/.claude/statusline.yaml
|
|
42
46
|
options:
|
|
43
47
|
bar-style: block
|
|
44
48
|
path-style: short
|
|
@@ -50,16 +54,39 @@ options:
|
|
|
50
54
|
untracked: "?"
|
|
51
55
|
```
|
|
52
56
|
|
|
57
|
+
`settings.json` stays clean — no flags in the command:
|
|
58
|
+
|
|
59
|
+
```jsonc
|
|
60
|
+
// ~/.claude/settings.json
|
|
61
|
+
{
|
|
62
|
+
"statusLine": {
|
|
63
|
+
"type": "command",
|
|
64
|
+
"command": "\"$HOME/.claude/c-c-statusline\""
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
53
69
|
### CLI flags
|
|
54
70
|
|
|
55
|
-
CLI flags override config file values.
|
|
71
|
+
CLI flags override config file values. Pass flags during install to bake them into `settings.json`:
|
|
56
72
|
|
|
57
73
|
```bash
|
|
58
|
-
# Pass flags during install to set defaults in settings.json
|
|
59
74
|
curl -fsSL https://raw.githubusercontent.com/babarot/c-c-statusline/main/bin/install.sh \
|
|
60
75
|
| bash -s -- --bar-style block --path-style short --theme tokyo-night
|
|
61
76
|
```
|
|
62
77
|
|
|
78
|
+
This writes the flags directly into the command:
|
|
79
|
+
|
|
80
|
+
```jsonc
|
|
81
|
+
// ~/.claude/settings.json
|
|
82
|
+
{
|
|
83
|
+
"statusLine": {
|
|
84
|
+
"type": "command",
|
|
85
|
+
"command": "\"$HOME/.claude/c-c-statusline\" --bar-style block --path-style short --theme tokyo-night"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
63
90
|
## Options
|
|
64
91
|
|
|
65
92
|
| Option | Values | Default | Description |
|
|
@@ -69,33 +96,34 @@ curl -fsSL https://raw.githubusercontent.com/babarot/c-c-statusline/main/bin/ins
|
|
|
69
96
|
| `theme` | See [Themes](#themes) | `default` | Color theme |
|
|
70
97
|
| `time-style` | `absolute`, `relative` | `absolute` | Reset time format |
|
|
71
98
|
| `ctx-format` | Format string | `ctx {used}/{total} ({pct}%)` | Context display format |
|
|
99
|
+
| `vim-mode` | `auto`, `always`, `off` | `auto` | Vim mode indicator display |
|
|
72
100
|
| `git-symbols` | Map or `key=val,...` | See [below](#git-symbols) | Override git status symbols |
|
|
73
101
|
|
|
74
102
|
### bar-style
|
|
75
103
|
|
|
76
|
-
|
|
|
104
|
+
| Input | Output |
|
|
77
105
|
|---|---|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
106
|
+
| `--bar-style dot` | `●●●●○○○○○○` |
|
|
107
|
+
| `--bar-style block` | `▰▰▰▰▱▱▱▱▱▱` |
|
|
108
|
+
| `--bar-style fill` | `████░░░░░░` |
|
|
81
109
|
|
|
82
110
|
### path-style
|
|
83
111
|
|
|
84
112
|
For `/Users/you/src/github.com/you/project`:
|
|
85
113
|
|
|
86
|
-
|
|
|
114
|
+
| Input | Output |
|
|
87
115
|
|---|---|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
116
|
+
| `--path-style parent` | `you/project` |
|
|
117
|
+
| `--path-style full` | `~/src/github.com/you/project` |
|
|
118
|
+
| `--path-style short` | `~/s/g/you/project` |
|
|
119
|
+
| `--path-style basename` | `project` |
|
|
92
120
|
|
|
93
121
|
### time-style
|
|
94
122
|
|
|
95
|
-
|
|
|
123
|
+
| Input | Output |
|
|
96
124
|
|---|---|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
125
|
+
| `--time-style absolute` | `8:00pm`, `Mar 12, 2:00pm` |
|
|
126
|
+
| `--time-style relative` | `1h 30m left`, `2d 5h left` |
|
|
99
127
|
|
|
100
128
|
### ctx-format
|
|
101
129
|
|
|
@@ -108,12 +136,30 @@ Use `{used}`, `{total}`, `{pct}`, `{compact}` placeholders.
|
|
|
108
136
|
| `{pct}` | Usage percentage (e.g. `14`) |
|
|
109
137
|
| `{compact}` | Remaining % until auto-compact (based on 80% usable threshold) |
|
|
110
138
|
|
|
111
|
-
|
|
|
139
|
+
| Input | Output |
|
|
140
|
+
|---|---|
|
|
141
|
+
| `--ctx-format 'ctx {used}/{total} ({pct}%)'` | `ctx 28k/200k (14%)` |
|
|
142
|
+
| `--ctx-format '{pct}% ({used}/{total})'` | `14% (28k/200k)` |
|
|
143
|
+
| `--ctx-format '{pct}% compact:{compact}%'` | `14% compact:83%` |
|
|
144
|
+
| `--ctx-format '{used} of {total}'` | `28k of 200k` |
|
|
145
|
+
|
|
146
|
+
### vim-mode
|
|
147
|
+
|
|
148
|
+
Shows the current Vim mode when Claude Code's Vim keybinding is enabled. The indicator is appended to the end of line 1.
|
|
149
|
+
|
|
150
|
+
| Value | Behavior |
|
|
112
151
|
|---|---|
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
116
|
-
|
|
152
|
+
| `auto` | Show only in `NORMAL` mode (hides in `INSERT` to reduce noise) |
|
|
153
|
+
| `always` | Show in all modes (`NORMAL`, `INSERT`, etc.) |
|
|
154
|
+
| `off` | Never show |
|
|
155
|
+
|
|
156
|
+
Mode colors: `NORMAL` uses the theme's primary color, `INSERT` uses success (green).
|
|
157
|
+
|
|
158
|
+
```yaml
|
|
159
|
+
# ~/.claude/statusline.yaml
|
|
160
|
+
options:
|
|
161
|
+
vim-mode: auto
|
|
162
|
+
```
|
|
117
163
|
|
|
118
164
|
### Themes
|
|
119
165
|
|
|
@@ -148,6 +194,11 @@ Override any git status symbol. In the config file, use a map; with CLI flags, u
|
|
|
148
194
|
| `ahead` | `↑` | Ahead of upstream |
|
|
149
195
|
| `behind` | `↓` | Behind upstream |
|
|
150
196
|
|
|
197
|
+
| Input | Output |
|
|
198
|
+
|---|---|
|
|
199
|
+
| `--git-symbols "stash=-,untracked=?"` | `(main *+ -?)` |
|
|
200
|
+
| `--git-symbols "unstaged=~,staged=+,stash=-,untracked=?,ahead=+,behind=-"` | `(main ~+ -? +1-2)` |
|
|
201
|
+
|
|
151
202
|
Config file:
|
|
152
203
|
```yaml
|
|
153
204
|
options:
|
|
@@ -156,11 +207,6 @@ options:
|
|
|
156
207
|
untracked: "?"
|
|
157
208
|
```
|
|
158
209
|
|
|
159
|
-
CLI flag:
|
|
160
|
-
```bash
|
|
161
|
-
--git-symbols "stash=-,untracked=?"
|
|
162
|
-
```
|
|
163
|
-
|
|
164
210
|
## What it shows
|
|
165
211
|
|
|
166
212
|
**Line 1:** Model name, context usage (tokens + %), directory, git status, session duration, effort level
|
package/bin/install.js
CHANGED
|
@@ -260,6 +260,7 @@ if (argv.includes("--help") || argv.includes("-h")) {
|
|
|
260
260
|
--theme <name> Color theme (default: default)
|
|
261
261
|
--time-style <absolute|relative> Time format (default: absolute)
|
|
262
262
|
--ctx-format <format> Context display format
|
|
263
|
+
--vim-mode <auto|always|off> Vim mode display (default: auto)
|
|
263
264
|
--git-symbols <key=val,...> Override git symbols
|
|
264
265
|
--init-config Generate ~/.claude/statusline.yaml
|
|
265
266
|
--uninstall Remove statusline
|
|
@@ -273,7 +274,7 @@ if (argv.includes("--uninstall")) {
|
|
|
273
274
|
} else {
|
|
274
275
|
const extraArgs = [];
|
|
275
276
|
const initConfig = argv.includes("--init-config");
|
|
276
|
-
const valueFlags = ["--bar-style", "--path-style", "--theme", "--time-style", "--ctx-format", "--git-symbols"];
|
|
277
|
+
const valueFlags = ["--bar-style", "--path-style", "--theme", "--time-style", "--ctx-format", "--vim-mode", "--git-symbols"];
|
|
277
278
|
for (let i = 0; i < argv.length; i++) {
|
|
278
279
|
if (argv[i] === "--init-config") continue;
|
|
279
280
|
if (valueFlags.includes(argv[i]) && argv[i + 1]) {
|
package/package.json
CHANGED