Contributing to cc-statusline
August 13, 2025 ยท View on GitHub
Thank you for your interest in contributing to cc-statusline! This document provides guidelines and information for contributors.
๐ Quick Start
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/cc-statusline.git cd cc-statusline - Install dependencies:
npm install - Build the project:
npm run build - Test your changes:
./dist/index.js --help npx . init --no-install # Test locally
๐ ๏ธ Development Workflow
Making Changes
-
Create a feature branch:
git checkout -b feature/amazing-feature -
Make your changes following our coding standards
-
Test your changes:
npm run build ./dist/index.js preview path/to/statusline.sh -
Commit your changes:
git add . git commit -m "feat: add amazing feature"
Commit Message Format
We follow Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
Examples:
feat: add support for Python runtime
fix: resolve preview timeout issue
docs: update README installation guide
๐ฏ Types of Contributions
๐ Bug Reports
- Use GitHub Issues with the bug template
- Include steps to reproduce
- Provide sample statusline.sh if relevant
- Include OS and Node.js version
โจ Feature Requests
- Use GitHub Issues with the feature template
- Explain the use case
- Consider implementation complexity
- Check if it fits the "dead simple" philosophy
๐ง Code Contributions
- New Features: Discuss in an issue first
- Bug Fixes: Can be submitted directly
- Documentation: Always welcome!
๐ Code Standards
TypeScript
- Strict typing - All functions must have type hints
- ESM modules - Use import/export syntax
- Error handling - Always handle errors gracefully
Code Style
- 2 spaces for indentation
- No semicolons (follows project style)
- Descriptive names - Functions and variables should be self-documenting
- Comments - Only when necessary to explain "why", not "what"
File Structure
src/
โโโ cli/ # CLI commands and prompts
โโโ features/ # Feature-specific code (git, usage, colors)
โโโ generators/ # Script generators (bash, etc.)
โโโ utils/ # Utilities (installer, validator, tester)
๐งช Testing
Manual Testing
# Build and test CLI
npm run build
./dist/index.js init --output ./test-statusline.sh --no-install
# Test preview functionality
./dist/index.js preview ./test-statusline.sh
# Test with different configurations
# (Change features in prompts.ts and rebuild)
Adding Tests
- Test new features in
src/utils/tester.ts - Ensure backwards compatibility
- Test error conditions
๐ Documentation
README Updates
- Keep examples current
- Update command usage if changed
- Maintain consistent formatting
Code Documentation
- Update JSDoc comments for new functions
- Include parameter and return types
- Provide usage examples for complex functions
๐ข Pull Request Process
- Update documentation if needed
- Test your changes thoroughly
- Update CHANGELOG.md following Keep a Changelog format
- Submit pull request with clear description
- Address review feedback promptly
Pull Request Template
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
## Testing
- [ ] Tested locally
- [ ] Updated tests if needed
- [ ] Documentation updated
## Checklist
- [ ] Follows code style
- [ ] Self-review completed
- [ ] CHANGELOG.md updated
๐ค Community Guidelines
Be Respectful
- Use welcoming and inclusive language
- Respect different viewpoints and experiences
- Focus on constructive feedback
Be Helpful
- Help newcomers get started
- Share knowledge and best practices
- Collaborate openly
Keep It Simple
- Follow the "dead simple" philosophy
- Avoid over-engineering
- Prioritize user experience
๐ Recognition
Contributors will be:
- Listed in CHANGELOG.md for their contributions
- Mentioned in release notes for significant features
- Welcomed into the community with appreciation
โ Questions?
- GitHub Issues - For bugs and feature requests
- GitHub Discussions - For questions and ideas
- Email - chong-u@aioriented.dev for private matters
๐ License
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for helping make cc-statusline better! ๐