Thank you for your interest in contributing to Cloud CLI! We welcome contributions from the community.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/ygwyg/cloud-cli.git cd cloud-cli - Install dependencies:
npm install
- Link the CLI locally for testing:
npm link
- Node.js 16.0.0 or higher
- npm or yarn
- Git
- Make your changes to the source code
- Test your changes locally:
cloud --help cloud nginx:alpine --plan
- Run the CLI with verbose logging for debugging:
cloud nginx:alpine --verbose --plan
index.js- Main CLI entry point and command definitionslib/detectors.js- Container detection and scaffolding logiclib/utils.js- Utility functions for context loading and UIpackage.json- Package configuration and dependenciesinstall.sh- Installation script
We welcome:
- Bug fixes
- New features
- Documentation improvements
- Tests
- Code improvements and refactoring
- Check existing issues to see if your contribution is already being worked on
- Open an issue for discussion if you're planning a major change
- Keep changes focused - one feature or fix per PR
- Use consistent indentation (2 spaces)
- Follow existing code style and patterns
- Add comments for complex logic
- Use descriptive variable and function names
- Keep functions small and focused
When adding new container detection methods:
- Add detection logic to
ContainerDetector.detect() - Update confidence scoring appropriately
- Add helpful indicator messages
- Test with various container configurations
When adding new CLI options:
- Add the option to the Commander.js configuration
- Update the help text in both places (main help and
helpcommand) - Handle the option in the action handler
- Update documentation
Test your changes with various scenarios:
# Test remote images
cloud nginx:alpine --plan
cloud redis:latest --detect
# Test local containers
cd /path/to/dockerfile/project
cloud --plan
# Test edge cases
cloud nonexistent:image --detect
cloud --type container --plan- Remote container images (various formats)
- Local Dockerfiles with different configurations
- Projects with docker-compose.yml
- Projects with existing wrangler.jsonc
- Error handling for invalid inputs
- CI/CD scenarios with
--no-prompt
When making changes:
- Update README.md if adding new features
- Update help text in the CLI
- Add examples for new functionality
- Update CONTRIBUTING.md if changing development process
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes and commit them:
git add . git commit -m "Add: description of your changes"
-
Push to your fork:
git push origin feature/your-feature-name
-
Open a Pull Request on GitHub
- Write a clear title describing the change
- Provide a detailed description of what you changed and why
- Reference any related issues using
#issue-number - Include examples of how to test the changes
- Keep PRs focused - avoid mixing unrelated changes
Use clear, descriptive commit messages:
Add: new feature or capability
Fix: bug fix
Update: changes to existing functionality
Remove: removed feature or code
Docs: documentation changes
- Maintainers will review your PR
- You may be asked to make changes
- Once approved, your PR will be merged
- Your contribution will be included in the next release
- Open a Discussion for questions
- Open an Issue for bugs
- Contact maintainers for sensitive issues
Contributors will be:
- Listed in the project's contributors
- Credited in release notes for significant contributions
- Invited to join the maintainer team for sustained contributions
By contributing to Cloud CLI, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing!