@buckits/claude-statusline 3.0.0 → 3.0.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.
package/README.md CHANGED
@@ -127,15 +127,15 @@ npx get-shit-done-cc
127
127
 
128
128
  If you prefer to install manually:
129
129
 
130
- 1. Copy `statusline.js` to `~/.claude/statusline.js`
131
- 2. Make it executable: `chmod +x ~/.claude/statusline.js`
130
+ 1. Copy `statusline.cjs` to `~/.claude/statusline.cjs`
131
+ 2. Make it executable: `chmod +x ~/.claude/statusline.cjs`
132
132
  3. Add to `~/.claude/settings.json`:
133
133
 
134
134
  ```json
135
135
  {
136
136
  "statusLine": {
137
137
  "type": "command",
138
- "command": "/Users/YOUR_USERNAME/.claude/statusline.js --width 50"
138
+ "command": "/Users/YOUR_USERNAME/.claude/statusline.cjs --width 50"
139
139
  }
140
140
  }
141
141
  ```
@@ -145,7 +145,7 @@ If you prefer to install manually:
145
145
  ### Statusline not showing?
146
146
 
147
147
  1. Make sure you restarted Claude Code after installation
148
- 2. Verify the script is executable: `ls -la ~/.claude/statusline.js`
148
+ 2. Verify the script is executable: `ls -la ~/.claude/statusline.cjs`
149
149
 
150
150
  ### Wrong colors?
151
151
 
@@ -133,11 +133,11 @@ function uninstall(isGlobal) {
133
133
 
134
134
  let removed = false;
135
135
 
136
- // Remove statusline.sh
137
- const statuslinePath = path.join(targetDir, 'statusline.js');
136
+ // Remove statusline.cjs
137
+ const statuslinePath = path.join(targetDir, 'statusline.cjs');
138
138
  if (fs.existsSync(statuslinePath)) {
139
139
  fs.unlinkSync(statuslinePath);
140
- console.log(` ${green}✓${reset} Removed statusline.js`);
140
+ console.log(` ${green}✓${reset} Removed statusline.cjs`);
141
141
  removed = true;
142
142
  }
143
143
 
@@ -147,19 +147,13 @@ function uninstall(isGlobal) {
147
147
  const settings = readSettings(settingsPath);
148
148
 
149
149
  if (settings.statusLine && settings.statusLine.command &&
150
- settings.statusLine.command.includes('statusline.js')) {
150
+ settings.statusLine.command.includes('statusline.cjs')) {
151
151
  delete settings.statusLine;
152
152
  writeSettings(settingsPath, settings);
153
153
  console.log(` ${green}✓${reset} Removed statusline from settings.json`);
154
154
  removed = true;
155
155
  }
156
156
 
157
- // Also clean up old format
158
- if (settings.status_line) {
159
- delete settings.status_line;
160
- writeSettings(settingsPath, settings);
161
- removed = true;
162
- }
163
157
  }
164
158
 
165
159
  if (!removed) {
@@ -190,44 +184,25 @@ function install(isGlobal, barWidth) {
190
184
  fs.mkdirSync(targetDir, { recursive: true });
191
185
  }
192
186
 
193
- // Copy statusline.sh
194
- const statuslineSrc = path.join(__dirname, '..', 'statusline.js');
195
- const statuslineDest = path.join(targetDir, 'statusline.js');
187
+ // Copy statusline.cjs
188
+ const statuslineSrc = path.join(__dirname, '..', 'statusline.cjs');
189
+ const statuslineDest = path.join(targetDir, 'statusline.cjs');
196
190
  fs.copyFileSync(statuslineSrc, statuslineDest);
197
191
  fs.chmodSync(statuslineDest, '755');
198
- console.log(` ${green}✓${reset} Installed statusline.js`);
192
+ console.log(` ${green}✓${reset} Installed statusline.cjs`);
199
193
 
200
194
  // Update settings.json
201
195
  const settingsPath = path.join(targetDir, 'settings.json');
202
196
  const settings = readSettings(settingsPath);
203
197
 
204
- // Check for existing statusline
205
- const hasExisting = settings.statusLine != null || settings.status_line != null;
198
+ // Set statusline config (always overwrite)
199
+ settings.statusLine = {
200
+ type: 'command',
201
+ command: statuslineDest + ' --width ' + barWidth
202
+ };
206
203
 
207
- if (hasExisting && !hasForce) {
208
- const existingCmd = settings.statusLine?.command || settings.status_line?.script || '(custom)';
209
- console.log(`
210
- ${yellow}⚠${reset} Existing statusline detected
211
- ${dim}Current: ${existingCmd}${reset}
212
-
213
- Use ${cyan}--force${reset} to replace it, or keep your current config.
214
- ${dim}The statusline.sh file has been installed - you can switch anytime.${reset}
215
- `);
216
- } else {
217
- // Remove old format if present
218
- if (settings.status_line) {
219
- delete settings.status_line;
220
- }
221
-
222
- // Set new format
223
- settings.statusLine = {
224
- type: 'command',
225
- command: statuslineDest + ' --width ' + barWidth
226
- };
227
-
228
- writeSettings(settingsPath, settings);
229
- console.log(` ${green}✓${reset} Configured settings.json`);
230
- }
204
+ writeSettings(settingsPath, settings);
205
+ console.log(` ${green}✓${reset} Configured settings.json`);
231
206
 
232
207
  // Success message
233
208
  console.log(`
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@buckits/claude-statusline",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "The statusline Claude Code deserves - gradient progress bar, auto-compact threshold marker, git status, cost tracking, 2-line dashboard",
5
5
  "bin": {
6
- "claude-statusline": "bin/install.js"
6
+ "claude-statusline": "bin/install.cjs"
7
7
  },
8
8
  "files": [
9
9
  "bin/",
10
- "statusline.js"
10
+ "statusline.cjs"
11
11
  ],
12
12
  "keywords": [
13
13
  "claude",
File without changes