Contributing Guide
Thank you for your interest in contributing to Azu CLI! This guide will help you get started with contributing to the project.
Getting Started
Prerequisites
Before contributing, ensure you have:
Crystal 1.16.0 or later
Git for version control
A GitHub account for submitting pull requests
Basic knowledge of Crystal programming language
Development Setup
Fork the repository
# Fork on GitHub, then clone your fork git clone https://github.com/your-username/azu_cli.git cd azu_cliInstall dependencies
shards installSet up development environment
# Create development configuration cp config/application.yml.example config/development.yml # Set up database (if needed) azu db:create azu db:migrateRun tests
crystal spec
Development Workflow
1. Create a Feature Branch
2. Make Your Changes
Follow these guidelines when making changes:
Write tests for new functionality
Update documentation for any new features
Follow coding standards (see below)
Keep commits atomic and well-described
3. Test Your Changes
4. Submit a Pull Request
Push your branch
Create a pull request on GitHub
Use the provided PR template
Describe your changes clearly
Link any related issues
Wait for review and address feedback
Coding Standards
Crystal Code Style
Follow Crystal's official style guide:
File Organization
Documentation
Document all public APIs:
Testing
Write comprehensive tests:
Testing CLI Commands and Generators
When testing CLI commands, especially those that generate projects or files, follow these conventions:
Use Temporary Directories
Always create test projects in temporary directories, not in the main repository:
Manual Testing Cleanup
If you manually test CLI commands during development:
Always use
/tmpor a dedicated test directory:Clean up immediately after testing:
Never commit test projects - The
.gitignorefile is configured to ignore:/test_*/- Test projects starting with "test_"/tmp_*/- Temporary test projects/playground_*/- Playground projects*_test_project/- Projects ending with "_test_project"/tmp/- Temporary directorytest_*.cr- Test script files (except inspec/)/123*/and/*invalid*/- Invalid project names
Integration Testing Best Practices
Checklist Before Committing
Adding New Commands
1. Create Command File
2. Add Command to Registry
3. Write Tests
4. Update Documentation
Examples
2. Create Templates
3. Add Generator to Command
4. Write Tests
Adding New Templates
1. Create Template Directory
2. Write Template Files
3. Test Templates
Bug Reports
Before Reporting
Check existing issues - Search for similar issues
Reproduce the bug - Create a minimal reproduction
Check documentation - Ensure it's not a configuration issue
Bug Report Template
Feature Requests
Before Requesting
Check roadmap - Feature might already be planned
Search issues - Similar feature might be requested
Consider scope - Ensure it fits the project's goals
Feature Request Template
Pull Request Guidelines
PR Template
Review Process
Automated checks must pass
Code review by maintainers
Documentation review if needed
Final approval before merge
Release Process
Versioning
We follow Semantic Versioning:
Major (X.0.0): Breaking changes
Minor (0.X.0): New features, backward compatible
Patch (0.0.X): Bug fixes, backward compatible
Release Steps
Update version in
shard.ymlUpdate changelog in
CHANGELOG.mdCreate release branch from main
Run full test suite
Create GitHub release
Tag release with version number
Community Guidelines
Code of Conduct
Be respectful to all contributors
Be inclusive and welcoming
Be constructive in feedback
Be patient with newcomers
Communication
GitHub Issues for bug reports and feature requests
GitHub Discussions for questions and ideas
Discord for real-time chat and support
Email for security issues
Getting Help
Resources
Documentation - Comprehensive guides
Examples - Code examples and tutorials
GitHub Issues - Bug reports and discussions
Discord - Community chat
Mentorship
New contributors can:
Start with good first issues - Look for
good first issuelabelAsk for help - Don't hesitate to ask questions
Join discussions - Participate in community conversations
Review others' PRs - Learn by reviewing code
Recognition
Contributors
All contributors are recognized in:
GitHub contributors page
CHANGELOG.md for significant contributions
README.md for maintainers
Release notes for each release
Hall of Fame
Special recognition for:
Major contributors - Significant code contributions
Documentation heroes - Documentation improvements
Community leaders - Community building efforts
Bug hunters - Critical bug reports and fixes
Related Documentation
Development Setup - Detailed setup instructions
Adding New Generators - Generator development guide
Adding New Commands - Command development guide
Testing Guidelines - Testing best practices
Documentation Guidelines - Documentation standards
Last updated