Quick Start
Fork the Repository
Fork cc-statusline on GitHub
Development Workflow
1. Create a Feature Branch
2. Make Your Changes
Follow our coding standards (see below) and make your improvements.3. Test Your Changes
4. Commit Your Changes
5. Push and Create Pull Request
Commit Message Format
We follow Conventional Commits specification:Format
Types
| Type | Description | Example |
|---|---|---|
feat: | New features | feat: add support for Python runtime |
fix: | Bug fixes | fix: resolve preview timeout issue |
docs: | Documentation changes | docs: update README installation guide |
style: | Code style changes (formatting, etc.) | style: fix indentation in generator |
refactor: | Code refactoring | refactor: simplify JSON parsing logic |
test: | Adding tests | test: add concurrent locking tests |
chore: | Maintenance tasks | chore: update dependencies |
Examples
Types of Contributions
Bug Reports
Report a Bug
Use GitHub Issues with the bug template
- Steps to reproduce
- Expected vs actual behavior
- Sample statusline.sh if relevant
- OS and Node.js version
- jq version (if applicable)
Feature Requests
Request a Feature
Use GitHub Issues with the feature template
- Use case description
- Expected behavior
- Implementation complexity estimate
- Alignment with “dead simple” philosophy
Code Contributions
- New Features
- Bug Fixes
- Documentation
Process:
- Open an issue first to discuss the feature
- Wait for maintainer approval
- Implement following code standards
- Add tests and documentation
- Submit pull request
- Keep features simple and focused
- Add graceful fallbacks
- Consider performance impact
- Update documentation
Code Standards
TypeScript
Strict Typing
Strict Typing
All functions must have type hints:
ESM Modules
ESM Modules
Use import/export syntax with
.js extensions:Error Handling
Error Handling
Always handle errors gracefully:
Code Style
Indentation: 2 spaces (no tabs) Semicolons: Not used (follows project style) Naming Conventions:- Functions:
camelCase - Types/Interfaces:
PascalCase - Constants:
UPPER_SNAKE_CASE - Variables:
camelCase
- Explain “why”, not “what”
- Document complex algorithms
- Add JSDoc for public APIs
File Structure
- Keep related code together
- One feature per file
- Utilities in
utils/ - Generators in
generators/
Testing Requirements
Manual Testing
Test Checklist
- With jq: All features work
- Without jq: Graceful fallback
- With colors: Proper ANSI codes
- Without colors: Clean output (NO_COLOR=1)
- In git repo: Git features work
- Outside git: Git features skip
- Different themes: minimal, compact, modern
- Edge cases: Invalid JSON, empty input, missing fields
- Performance: Execution time < 100ms
Adding Tests
When adding new features:- Update
src/utils/tester.tswith mock data - Add test cases for new functionality
- Test backwards compatibility
- Verify error conditions
Documentation Requirements
README Updates
When adding features, update:- Features list
- Example outputs
- Configuration options
- Troubleshooting section (if needed)
Code Documentation
Add JSDoc comments for public APIs:Pull Request Process
Before Submitting
Pull Request Template
Review Process
- Maintainer review: Usually within 1-3 days
- Feedback addressed: Make requested changes
- Approval: Once approved, will be merged
- Release: Included in next version
Community Guidelines
Be Respectful
- Use welcoming and inclusive language
- Respect different viewpoints and experiences
- Accept constructive feedback gracefully
- Focus on what is best for the community
Be Helpful
- Help newcomers get started
- Share knowledge and best practices
- Collaborate openly and transparently
- Provide constructive feedback
Keep It Simple
- Follow the “dead simple” philosophy
- Avoid over-engineering solutions
- Prioritize user experience
- Maintain fast execution times
Recognition
Contributors are recognized through:- CHANGELOG.md: Listed for their contributions
- Release notes: Mentioned for significant features
- README: Added to contributors section
- Community: Welcomed and appreciated
Development Commands
Build Commands
Testing Commands
Getting Help
GitHub Issues
For bugs and feature requests
GitHub Discussions
For questions and ideas
License
By contributing, you agree that your contributions will be licensed under the MIT License.Thank you for helping make cc-statusline better! 🚀
Next Steps
Architecture
Understand the codebase structure
Testing
Learn how to test your changes