@chongdashu/cc-statusline 1.0.0 โ 1.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/CHANGELOG.md +11 -0
- package/CONTRIBUTING.md +208 -0
- package/README.md +156 -135
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.1] - 2025-08-13
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- CONTRIBUTING.md with comprehensive contribution guidelines
|
|
12
|
+
- Development workflow documentation
|
|
13
|
+
- Code standards and testing guidelines
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Updated package name to unscoped `cc-statusline`
|
|
17
|
+
- Enhanced README contributing section with better guidance
|
|
18
|
+
|
|
8
19
|
## [1.0.0] - 2025-08-13
|
|
9
20
|
|
|
10
21
|
### Added
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Contributing to cc-statusline
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to cc-statusline! This document provides guidelines and information for contributors.
|
|
4
|
+
|
|
5
|
+
## ๐ Quick Start
|
|
6
|
+
|
|
7
|
+
1. **Fork the repository** on GitHub
|
|
8
|
+
2. **Clone your fork** locally:
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://github.com/YOUR-USERNAME/cc-statusline.git
|
|
11
|
+
cd cc-statusline
|
|
12
|
+
```
|
|
13
|
+
3. **Install dependencies**:
|
|
14
|
+
```bash
|
|
15
|
+
npm install
|
|
16
|
+
```
|
|
17
|
+
4. **Build the project**:
|
|
18
|
+
```bash
|
|
19
|
+
npm run build
|
|
20
|
+
```
|
|
21
|
+
5. **Test your changes**:
|
|
22
|
+
```bash
|
|
23
|
+
./dist/index.js --help
|
|
24
|
+
npx . init --no-install # Test locally
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## ๐ ๏ธ Development Workflow
|
|
28
|
+
|
|
29
|
+
### Making Changes
|
|
30
|
+
|
|
31
|
+
1. **Create a feature branch**:
|
|
32
|
+
```bash
|
|
33
|
+
git checkout -b feature/amazing-feature
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
2. **Make your changes** following our coding standards
|
|
37
|
+
|
|
38
|
+
3. **Test your changes**:
|
|
39
|
+
```bash
|
|
40
|
+
npm run build
|
|
41
|
+
./dist/index.js preview path/to/statusline.sh
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
4. **Commit your changes**:
|
|
45
|
+
```bash
|
|
46
|
+
git add .
|
|
47
|
+
git commit -m "feat: add amazing feature"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Commit Message Format
|
|
51
|
+
|
|
52
|
+
We follow [Conventional Commits](https://conventionalcommits.org/):
|
|
53
|
+
|
|
54
|
+
- `feat:` - New features
|
|
55
|
+
- `fix:` - Bug fixes
|
|
56
|
+
- `docs:` - Documentation changes
|
|
57
|
+
- `style:` - Code style changes (formatting, etc.)
|
|
58
|
+
- `refactor:` - Code refactoring
|
|
59
|
+
- `test:` - Adding tests
|
|
60
|
+
- `chore:` - Maintenance tasks
|
|
61
|
+
|
|
62
|
+
Examples:
|
|
63
|
+
```
|
|
64
|
+
feat: add support for Python runtime
|
|
65
|
+
fix: resolve preview timeout issue
|
|
66
|
+
docs: update README installation guide
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## ๐ฏ Types of Contributions
|
|
70
|
+
|
|
71
|
+
### ๐ Bug Reports
|
|
72
|
+
- Use GitHub Issues with the bug template
|
|
73
|
+
- Include steps to reproduce
|
|
74
|
+
- Provide sample statusline.sh if relevant
|
|
75
|
+
- Include OS and Node.js version
|
|
76
|
+
|
|
77
|
+
### โจ Feature Requests
|
|
78
|
+
- Use GitHub Issues with the feature template
|
|
79
|
+
- Explain the use case
|
|
80
|
+
- Consider implementation complexity
|
|
81
|
+
- Check if it fits the "dead simple" philosophy
|
|
82
|
+
|
|
83
|
+
### ๐ง Code Contributions
|
|
84
|
+
- **New Features**: Discuss in an issue first
|
|
85
|
+
- **Bug Fixes**: Can be submitted directly
|
|
86
|
+
- **Documentation**: Always welcome!
|
|
87
|
+
|
|
88
|
+
## ๐ Code Standards
|
|
89
|
+
|
|
90
|
+
### TypeScript
|
|
91
|
+
- **Strict typing** - All functions must have type hints
|
|
92
|
+
- **ESM modules** - Use import/export syntax
|
|
93
|
+
- **Error handling** - Always handle errors gracefully
|
|
94
|
+
|
|
95
|
+
### Code Style
|
|
96
|
+
- **2 spaces** for indentation
|
|
97
|
+
- **No semicolons** (follows project style)
|
|
98
|
+
- **Descriptive names** - Functions and variables should be self-documenting
|
|
99
|
+
- **Comments** - Only when necessary to explain "why", not "what"
|
|
100
|
+
|
|
101
|
+
### File Structure
|
|
102
|
+
```
|
|
103
|
+
src/
|
|
104
|
+
โโโ cli/ # CLI commands and prompts
|
|
105
|
+
โโโ features/ # Feature-specific code (git, usage, colors)
|
|
106
|
+
โโโ generators/ # Script generators (bash, etc.)
|
|
107
|
+
โโโ utils/ # Utilities (installer, validator, tester)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## ๐งช Testing
|
|
111
|
+
|
|
112
|
+
### Manual Testing
|
|
113
|
+
```bash
|
|
114
|
+
# Build and test CLI
|
|
115
|
+
npm run build
|
|
116
|
+
./dist/index.js init --output ./test-statusline.sh --no-install
|
|
117
|
+
|
|
118
|
+
# Test preview functionality
|
|
119
|
+
./dist/index.js preview ./test-statusline.sh
|
|
120
|
+
|
|
121
|
+
# Test with different configurations
|
|
122
|
+
# (Change features in prompts.ts and rebuild)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Adding Tests
|
|
126
|
+
- Test new features in `src/utils/tester.ts`
|
|
127
|
+
- Ensure backwards compatibility
|
|
128
|
+
- Test error conditions
|
|
129
|
+
|
|
130
|
+
## ๐ Documentation
|
|
131
|
+
|
|
132
|
+
### README Updates
|
|
133
|
+
- Keep examples current
|
|
134
|
+
- Update command usage if changed
|
|
135
|
+
- Maintain consistent formatting
|
|
136
|
+
|
|
137
|
+
### Code Documentation
|
|
138
|
+
- Update JSDoc comments for new functions
|
|
139
|
+
- Include parameter and return types
|
|
140
|
+
- Provide usage examples for complex functions
|
|
141
|
+
|
|
142
|
+
## ๐ข Pull Request Process
|
|
143
|
+
|
|
144
|
+
1. **Update documentation** if needed
|
|
145
|
+
2. **Test your changes** thoroughly
|
|
146
|
+
3. **Update CHANGELOG.md** following Keep a Changelog format
|
|
147
|
+
4. **Submit pull request** with clear description
|
|
148
|
+
5. **Address review feedback** promptly
|
|
149
|
+
|
|
150
|
+
### Pull Request Template
|
|
151
|
+
```markdown
|
|
152
|
+
## Description
|
|
153
|
+
Brief description of changes
|
|
154
|
+
|
|
155
|
+
## Type of Change
|
|
156
|
+
- [ ] Bug fix
|
|
157
|
+
- [ ] New feature
|
|
158
|
+
- [ ] Documentation update
|
|
159
|
+
- [ ] Refactoring
|
|
160
|
+
|
|
161
|
+
## Testing
|
|
162
|
+
- [ ] Tested locally
|
|
163
|
+
- [ ] Updated tests if needed
|
|
164
|
+
- [ ] Documentation updated
|
|
165
|
+
|
|
166
|
+
## Checklist
|
|
167
|
+
- [ ] Follows code style
|
|
168
|
+
- [ ] Self-review completed
|
|
169
|
+
- [ ] CHANGELOG.md updated
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## ๐ค Community Guidelines
|
|
173
|
+
|
|
174
|
+
### Be Respectful
|
|
175
|
+
- Use welcoming and inclusive language
|
|
176
|
+
- Respect different viewpoints and experiences
|
|
177
|
+
- Focus on constructive feedback
|
|
178
|
+
|
|
179
|
+
### Be Helpful
|
|
180
|
+
- Help newcomers get started
|
|
181
|
+
- Share knowledge and best practices
|
|
182
|
+
- Collaborate openly
|
|
183
|
+
|
|
184
|
+
### Keep It Simple
|
|
185
|
+
- Follow the "dead simple" philosophy
|
|
186
|
+
- Avoid over-engineering
|
|
187
|
+
- Prioritize user experience
|
|
188
|
+
|
|
189
|
+
## ๐ Recognition
|
|
190
|
+
|
|
191
|
+
Contributors will be:
|
|
192
|
+
- Listed in CHANGELOG.md for their contributions
|
|
193
|
+
- Mentioned in release notes for significant features
|
|
194
|
+
- Welcomed into the community with appreciation
|
|
195
|
+
|
|
196
|
+
## โ Questions?
|
|
197
|
+
|
|
198
|
+
- **GitHub Issues** - For bugs and feature requests
|
|
199
|
+
- **GitHub Discussions** - For questions and ideas
|
|
200
|
+
- **Email** - chong-u@aioriented.dev for private matters
|
|
201
|
+
|
|
202
|
+
## ๐ License
|
|
203
|
+
|
|
204
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
**Thank you for helping make cc-statusline better!** ๐
|
package/README.md
CHANGED
|
@@ -1,135 +1,147 @@
|
|
|
1
1
|
# cc-statusline
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
4
|
|
|
5
|
-
Transform your Claude Code experience with a beautiful, informative statusline
|
|
5
|
+
๐ **Transform your Claude Code experience with a beautiful, informative statusline**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<img src="docs/images/cc-statusline-running.gif" alt="cc-statusline in action" width="600">
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
*Real-time directory, git branch, model info, costs, and session time tracking*
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
[](https://www.npmjs.com/package/@chongdashu/cc-statusline)
|
|
12
|
+
[](https://opensource.org/licenses/MIT)
|
|
13
|
+
[](https://nodejs.org/)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
</div>
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
- ๐ Current directory
|
|
19
|
-
- ๐ฟ Git branch
|
|
20
|
-
- ๐ค Claude model info
|
|
21
|
-
- ๐ต Real-time costs
|
|
22
|
-
- โ Session time remaining
|
|
23
|
-
- Plus optional token stats and burn rate
|
|
17
|
+
## โก Quick Start
|
|
24
18
|
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
๐ ~/my-project ๐ฟ main ๐ค Opus 4.1 ๐ต $2.48 ($12.50/h) โ 2h 15m until reset (68%)
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## ๐ฏ More Options
|
|
19
|
+
**One command. Two questions. Beautiful statusline. โจ**
|
|
31
20
|
|
|
32
21
|
```bash
|
|
33
|
-
|
|
34
|
-
cc-statusline preview .claude/statusline.sh
|
|
35
|
-
|
|
36
|
-
# Generate to custom location
|
|
37
|
-
cc-statusline init --output ./my-statusline.sh
|
|
38
|
-
|
|
39
|
-
# Skip auto-installation
|
|
40
|
-
cc-statusline init --no-install
|
|
22
|
+
npx @chongdashu/cc-statusline init
|
|
41
23
|
```
|
|
42
24
|
|
|
43
|
-
|
|
44
|
-
The `preview` command takes a path to an existing `statusline.sh` file and:
|
|
45
|
-
1. **Loads** your actual statusline script
|
|
46
|
-
2. **Runs** it with fake Claude Code data (directory: `/home/user/projects/my-project`, model: `Opus 4.1`, mock usage stats)
|
|
47
|
-
3. **Shows** you exactly what the output looks like
|
|
48
|
-
4. **Reports** performance and basic functionality
|
|
25
|
+
That's it! Answer 2 simple questions, restart Claude Code, and enjoy your new statusline.
|
|
49
26
|
|
|
50
|
-
|
|
27
|
+
## ๐ฏ Setup with just 1 command
|
|
51
28
|
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
# If you prefer global install
|
|
55
|
-
npm install -g @chongdashu/cc-statusline
|
|
56
|
-
cc-statusline init
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## ๐๏ธ Available Features
|
|
29
|
+
<img src="docs/images/cc-statusline-init.gif" alt="Demo of cc-statusline setup" width="500">
|
|
60
30
|
|
|
61
|
-
|
|
62
|
-
- ๐ **Working Directory** - Current folder with `~` shorthand
|
|
63
|
-
- ๐ฟ **Git Branch** - Current branch name
|
|
64
|
-
- ๐ค **Model Name** - Which Claude model you're using
|
|
65
|
-
- ๐ต **Usage & Cost** - Real-time cost tracking (requires ccusage)
|
|
66
|
-
- โ **Session Time** - Time until usage limit resets
|
|
31
|
+
## โจ What You Get
|
|
67
32
|
|
|
68
|
-
|
|
69
|
-
- ๐ **Token Statistics** - Total tokens used this session
|
|
70
|
-
- โก **Burn Rate** - Tokens consumed per minute
|
|
33
|
+
Transform your bland Claude Code terminal into an information-rich powerhouse:
|
|
71
34
|
|
|
72
|
-
|
|
35
|
+
- **๐ Smart Directory Display** - Current folder with `~` abbreviation
|
|
36
|
+
- **๐ฟ Git Integration** - Current branch name with clean styling
|
|
37
|
+
- **๐ค Model Intelligence** - Shows which Claude model you're using
|
|
38
|
+
- **๐ต Real-Time Cost Tracking** - Live cost monitoring via ccusage integration
|
|
39
|
+
- **โ Session Management** - Time remaining until usage limit resets with progress bars
|
|
40
|
+
- **๐ Advanced Analytics** - Optional token consumption and burn rate metrics
|
|
41
|
+
- **๐จ Beautiful Colors** - TTY-aware colors that respect your terminal theme
|
|
42
|
+
- **โก Lightning Fast** - Optimized bash script with <100ms execution time
|
|
73
43
|
|
|
74
|
-
|
|
75
|
-
1. **What to show** - Pick features from a checklist (directory, git, model, costs, etc.)
|
|
76
|
-
2. **Colors & emojis** - Enable/disable colors and emoji icons
|
|
44
|
+
## ๐๏ธ Features Overview
|
|
77
45
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
46
|
+
### ๐ฅ Default Features (Pre-selected)
|
|
47
|
+
| Feature | Description | Example |
|
|
48
|
+
|---------|-------------|---------|
|
|
49
|
+
| ๐ **Directory** | Current working directory | `~/my-project` |
|
|
50
|
+
| ๐ฟ **Git Branch** | Active git branch | `main` |
|
|
51
|
+
| ๐ค **Model** | Claude model name & version | `Opus 4.1` |
|
|
52
|
+
| ๐ต **Usage & Cost** | Real-time costs with hourly rate | `$2.48 ($12.50/h)` |
|
|
53
|
+
| โ **Session Time** | Time until reset with progress | `2h 15m until reset (68%)` |
|
|
83
54
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
55
|
+
### ๐ Optional Power Features
|
|
56
|
+
| Feature | Description | Example |
|
|
57
|
+
|---------|-------------|---------|
|
|
58
|
+
| ๐ **Token Stats** | Total tokens consumed | `45,230 tok` |
|
|
59
|
+
| โก **Burn Rate** | Tokens per minute | `847 tpm` |
|
|
88
60
|
|
|
89
|
-
|
|
61
|
+
### ๐จ Example Outputs
|
|
90
62
|
|
|
91
|
-
**Minimal
|
|
63
|
+
**Minimal Setup:**
|
|
92
64
|
```
|
|
93
65
|
๐ ~/my-app ๐ฟ main ๐ค Claude Sonnet
|
|
94
66
|
```
|
|
95
67
|
|
|
96
|
-
**
|
|
68
|
+
**Full Power Mode:**
|
|
97
69
|
```
|
|
98
|
-
๐ ~/
|
|
70
|
+
๐ ~/projects/ai-tools ๐ฟ feature/statusline ๐ค Opus 4.1 โ 2h 15m until reset (68%) [======----] ๐ต $16.40 ($7.41/h) ๐ 64,080 tok (850 tpm)
|
|
99
71
|
```
|
|
100
72
|
|
|
101
|
-
|
|
73
|
+
## ๐ ๏ธ Advanced Usage
|
|
74
|
+
|
|
75
|
+
### Preview Your Statusline
|
|
76
|
+
Test your statusline before restarting Claude Code:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
cc-statusline preview .claude/statusline.sh
|
|
102
80
|
```
|
|
103
|
-
|
|
81
|
+
|
|
82
|
+
**What preview does:**
|
|
83
|
+
1. ๐ **Loads** your actual statusline script
|
|
84
|
+
2. ๐งช **Runs** it with realistic mock data
|
|
85
|
+
3. ๐ **Shows** exactly what the output will look like
|
|
86
|
+
4. โก **Reports** performance metrics and functionality
|
|
87
|
+
|
|
88
|
+
### Custom Installation
|
|
89
|
+
```bash
|
|
90
|
+
# Generate to custom location
|
|
91
|
+
cc-statusline init --output ./my-statusline.sh
|
|
92
|
+
|
|
93
|
+
# Skip auto-installation (manual setup)
|
|
94
|
+
cc-statusline init --no-install
|
|
95
|
+
|
|
96
|
+
# Global installation for convenience
|
|
97
|
+
npm install -g @chongdashu/cc-statusline
|
|
104
98
|
```
|
|
105
99
|
|
|
106
|
-
##
|
|
100
|
+
## ๐ง How It Works
|
|
101
|
+
|
|
102
|
+
### The Magic Behind The Scenes
|
|
103
|
+
|
|
104
|
+
1. **๐ฏ Smart Configuration** - Two intuitive questions configure everything
|
|
105
|
+
2. **๐๏ธ Intelligent Generation** - Creates optimized bash script tailored to your needs
|
|
106
|
+
3. **โ๏ธ Auto-Installation** - Seamlessly integrates with Claude Code settings
|
|
107
|
+
4. **๐ Real-Time Updates** - Connects to ccusage for live usage statistics
|
|
108
|
+
|
|
109
|
+
### Technical Architecture
|
|
107
110
|
|
|
108
|
-
**
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
+
- **โก Bash-First** - Native shell execution for maximum speed
|
|
112
|
+
- **๐จ TTY-Aware** - Automatically detects terminal capabilities
|
|
113
|
+
- **๐ Environment Respect** - Honors `NO_COLOR` and other conventions
|
|
114
|
+
- **๐ฆ Zero Dependencies** - Self-contained script with graceful fallbacks
|
|
115
|
+
- **๐ Secure** - No network requests except ccusage integration
|
|
111
116
|
|
|
112
|
-
|
|
113
|
-
- `git` for branch display
|
|
114
|
-
- `ccusage` for usage stats (auto-installs via npx when needed)
|
|
117
|
+
## ๐ Requirements
|
|
115
118
|
|
|
116
|
-
|
|
119
|
+
### โ
Required (You Already Have These!)
|
|
120
|
+
- **Claude Code** - The tool you're already using
|
|
121
|
+
- **jq** - JSON processing (pre-installed on most systems)
|
|
122
|
+
|
|
123
|
+
### ๐ Optional Enhancements
|
|
124
|
+
- **git** - For branch display (you probably have this)
|
|
125
|
+
- **ccusage** - For usage stats (works via `npx` - no install needed)
|
|
126
|
+
|
|
127
|
+
### Quick Compatibility Check
|
|
117
128
|
```bash
|
|
118
129
|
command -v jq && echo "โ
Ready to go!"
|
|
119
130
|
```
|
|
120
131
|
|
|
121
|
-
## ๐
|
|
132
|
+
## ๐ File Structure
|
|
122
133
|
|
|
123
|
-
After
|
|
134
|
+
After installation, you'll have a clean setup:
|
|
124
135
|
|
|
125
136
|
```
|
|
126
137
|
.claude/
|
|
127
|
-
โโโ statusline.sh # Your
|
|
128
|
-
โโโ settings.json # Auto-updated
|
|
138
|
+
โโโ statusline.sh # ๐ฏ Your generated statusline script
|
|
139
|
+
โโโ settings.json # โ๏ธ Auto-updated Claude Code configuration
|
|
129
140
|
```
|
|
130
141
|
|
|
131
|
-
|
|
132
|
-
|
|
142
|
+
### Manual Configuration (Backup Plan)
|
|
143
|
+
|
|
144
|
+
If auto-configuration fails, simply add this to `.claude/settings.json`:
|
|
133
145
|
|
|
134
146
|
```json
|
|
135
147
|
{
|
|
@@ -141,71 +153,80 @@ If the tool can't update your settings.json automatically, just add this:
|
|
|
141
153
|
}
|
|
142
154
|
```
|
|
143
155
|
|
|
144
|
-
## Troubleshooting
|
|
145
|
-
|
|
146
|
-
### Statusline
|
|
147
|
-
1. Restart Claude Code after installation
|
|
148
|
-
2. Verify `.claude/settings.json` contains
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
- Use `cc-statusline preview` to check execution time
|
|
161
|
-
- Reduce number of features if >500ms execution time
|
|
162
|
-
- Disable ccusage integration if not needed
|
|
163
|
-
|
|
164
|
-
### Missing Features
|
|
165
|
-
- Ensure `jq` is installed: `brew install jq` (macOS) or `apt install jq` (Ubuntu)
|
|
166
|
-
- Usage stats require ccusage (works automatically via `npx ccusage@latest`)
|
|
167
|
-
- Check script permissions: `chmod +x .claude/statusline.sh`
|
|
168
|
-
|
|
169
|
-
## Development
|
|
156
|
+
## ๐ง Troubleshooting
|
|
157
|
+
|
|
158
|
+
### ๐ซ Statusline Not Showing
|
|
159
|
+
1. **Restart Claude Code** after installation
|
|
160
|
+
2. **Verify settings** - Check `.claude/settings.json` contains the configuration above
|
|
161
|
+
3. **Check permissions** - Ensure script is executable: `chmod +x .claude/statusline.sh`
|
|
162
|
+
|
|
163
|
+
### ๐ Performance Issues
|
|
164
|
+
- **Test performance**: `cc-statusline preview .claude/statusline.sh`
|
|
165
|
+
- **Optimize features**: Disable heavy features if execution > 500ms
|
|
166
|
+
- **Disable ccusage**: Remove usage tracking if not needed
|
|
167
|
+
|
|
168
|
+
### ๐งฉ Missing Features
|
|
169
|
+
- **Install jq**: `brew install jq` (macOS) or `apt install jq` (Ubuntu)
|
|
170
|
+
- **ccusage setup**: Works automatically via `npx ccusage@latest`
|
|
171
|
+
- **Git not found**: Install git for branch display
|
|
170
172
|
|
|
173
|
+
## ๐ Performance
|
|
174
|
+
|
|
175
|
+
| Metric | Target | Typical |
|
|
176
|
+
|--------|--------|---------|
|
|
177
|
+
| **Execution Time** | <100ms | 45-80ms |
|
|
178
|
+
| **Memory Usage** | <5MB | ~2MB |
|
|
179
|
+
| **CPU Impact** | Negligible | <1% |
|
|
180
|
+
| **Dependencies** | Minimal | jq only |
|
|
181
|
+
|
|
182
|
+
*Benchmarked on macOS with all features enabled*
|
|
183
|
+
|
|
184
|
+
## ๐ค Contributing
|
|
185
|
+
|
|
186
|
+
We love contributions! ๐
|
|
187
|
+
|
|
188
|
+
**Quick Start:**
|
|
171
189
|
```bash
|
|
172
|
-
# Clone repository
|
|
173
190
|
git clone https://github.com/chongdashu/cc-statusline
|
|
174
191
|
cd cc-statusline
|
|
192
|
+
npm install && npm run build
|
|
193
|
+
```
|
|
175
194
|
|
|
176
|
-
|
|
177
|
-
|
|
195
|
+
**Contribution Areas:**
|
|
196
|
+
- ๐ **Bug Fixes** - Help make it more robust
|
|
197
|
+
- โจ **New Features** - Add support for more runtimes/features
|
|
198
|
+
- ๐ **Documentation** - Improve guides and examples
|
|
199
|
+
- ๐งช **Testing** - Add test coverage and edge cases
|
|
178
200
|
|
|
179
|
-
|
|
180
|
-
npm run build
|
|
201
|
+
See our [Contributing Guide](CONTRIBUTING.md) for detailed information.
|
|
181
202
|
|
|
182
|
-
|
|
183
|
-
npm run dev
|
|
184
|
-
```
|
|
203
|
+
## ๐ Stats
|
|
185
204
|
|
|
186
|
-
|
|
205
|
+
<div align="center">
|
|
187
206
|
|
|
188
|
-
|
|
207
|
+

|
|
208
|
+

|
|
209
|
+

|
|
189
210
|
|
|
190
|
-
|
|
191
|
-
2. Create feature branch (`git checkout -b feature/amazing-feature`)
|
|
192
|
-
3. Commit changes (`git commit -m 'Add amazing feature'`)
|
|
193
|
-
4. Push to branch (`git push origin feature/amazing-feature`)
|
|
194
|
-
5. Open Pull Request
|
|
211
|
+
</div>
|
|
195
212
|
|
|
196
|
-
##
|
|
213
|
+
## ๐ Related Projects
|
|
197
214
|
|
|
198
|
-
|
|
215
|
+
- **[ccusage](https://github.com/ryoppippi/ccusage)** - Claude Code usage analytics (would not be possible with it!)
|
|
216
|
+
- **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** - Official documentation
|
|
199
217
|
|
|
200
|
-
##
|
|
218
|
+
## ๐ Changelog
|
|
201
219
|
|
|
202
|
-
|
|
203
|
-
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) - Official documentation
|
|
220
|
+
See [CHANGELOG.md](CHANGELOG.md) for detailed release history.
|
|
204
221
|
|
|
205
|
-
##
|
|
222
|
+
## ๐ License
|
|
206
223
|
|
|
207
|
-
|
|
224
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
208
225
|
|
|
209
226
|
---
|
|
210
227
|
|
|
211
|
-
|
|
228
|
+
<div align="center">
|
|
229
|
+
|
|
230
|
+
**Made by [Chong-U](https://github.com/chongdashu) @ [AIOriented](https://aioriented.dev)**
|
|
231
|
+
|
|
232
|
+
</div>
|