cc-minimal-statusline 1.0.2 → 1.0.3

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
@@ -3,6 +3,7 @@
3
3
  A minimal status line for [Claude Code](https://github.com/anthropics/claude-code).
4
4
 
5
5
  ![Preview](preview.png)
6
+ ![Preview 2](preview2.png)
6
7
 
7
8
  ## Features
8
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-minimal-statusline",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A minimal, elegant status line for Claude Code with gradient progress bar, git integration, and update notifications",
5
5
  "main": "statusline.sh",
6
6
  "bin": {
package/preview2.png ADDED
Binary file
@@ -3,7 +3,6 @@
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
  const os = require('os');
6
- const readline = require('readline');
7
6
 
8
7
  const configDir = path.join(os.homedir(), '.claude');
9
8
  const settingsPath = path.join(configDir, 'settings.json');
@@ -14,65 +13,32 @@ const statusLineConfig = {
14
13
  padding: 0
15
14
  };
16
15
 
17
- function configureSettings() {
18
- // Create .claude directory if it doesn't exist
19
- if (!fs.existsSync(configDir)) {
20
- fs.mkdirSync(configDir, { recursive: true });
21
- }
22
-
23
- let settings = {};
24
-
25
- // Read existing settings if they exist
26
- if (fs.existsSync(settingsPath)) {
27
- try {
28
- const content = fs.readFileSync(settingsPath, 'utf8');
29
- settings = JSON.parse(content);
30
- } catch (e) {
31
- console.log('Warning: Could not parse existing settings.json, creating backup...');
32
- fs.copyFileSync(settingsPath, settingsPath + '.backup');
33
- settings = {};
34
- }
35
- }
36
-
37
- // Add statusLine config
38
- settings.statusLine = statusLineConfig;
39
-
40
- // Write settings
41
- fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
42
- console.log('\nāœ… Status line configured in ~/.claude/settings.json');
43
- console.log('\nšŸ’” Tip: Make sure you have a Nerd Font installed for icons to display correctly.');
44
- console.log(' brew install --cask font-meslo-lg-nerd-font\n');
16
+ // Create .claude directory if it doesn't exist
17
+ if (!fs.existsSync(configDir)) {
18
+ fs.mkdirSync(configDir, { recursive: true });
45
19
  }
46
20
 
47
- function showManualInstructions() {
48
- console.log('\nTo enable manually, add this to your ~/.claude/settings.json:\n');
49
- console.log(JSON.stringify({ statusLine: statusLineConfig }, null, 2));
50
- console.log('\nšŸ’” Tip: Make sure you have a Nerd Font installed for icons to display correctly.');
51
- console.log(' brew install --cask font-meslo-lg-nerd-font\n');
52
- }
53
-
54
- // Check if running in interactive terminal
55
- if (!process.stdin.isTTY) {
56
- console.log('\nšŸ“Š cc-minimal-statusline installed!');
57
- showManualInstructions();
58
- process.exit(0);
21
+ let settings = {};
22
+
23
+ // Read existing settings if they exist
24
+ if (fs.existsSync(settingsPath)) {
25
+ try {
26
+ const content = fs.readFileSync(settingsPath, 'utf8');
27
+ settings = JSON.parse(content);
28
+ } catch (e) {
29
+ console.log('Warning: Could not parse existing settings.json, creating backup...');
30
+ fs.copyFileSync(settingsPath, settingsPath + '.backup');
31
+ settings = {};
32
+ }
59
33
  }
60
34
 
61
- const rl = readline.createInterface({
62
- input: process.stdin,
63
- output: process.stdout
64
- });
35
+ // Add statusLine config
36
+ settings.statusLine = statusLineConfig;
65
37
 
66
- console.log('\nšŸ“Š cc-minimal-statusline installed!\n');
38
+ // Write settings
39
+ fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
67
40
 
68
- rl.question('Configure Claude Code to use this status line? (Y/n) ', (answer) => {
69
- rl.close();
70
-
71
- const shouldConfigure = !answer || answer.toLowerCase() === 'y' || answer.toLowerCase() === 'yes';
72
-
73
- if (shouldConfigure) {
74
- configureSettings();
75
- } else {
76
- showManualInstructions();
77
- }
78
- });
41
+ console.log('\nšŸ“Š cc-minimal-statusline installed and configured!\n');
42
+ console.log('āœ… Added to ~/.claude/settings.json\n');
43
+ console.log('šŸ’” Tip: Make sure you have a Nerd Font installed for icons to display correctly.');
44
+ console.log(' brew install --cask font-meslo-lg-nerd-font\n');