Thank you for your interest in contributing to the Syncable Infrastructure-as-Code CLI! This document provides guidelines and instructions for contributing.
We are committed to providing a welcoming and inclusive environment. Please be respectful and constructive in all interactions.
Syncable CLI collects anonymous usage data to help us improve the product. This data includes:
- Command usage (which commands are run)
- System information (OS type, CLI version)
- Performance metrics (execution time, success/failure status)
We do NOT collect:
- Personal or sensitive information
- File contents or project data
- Environment variables or secrets
- Any personally identifiable information
Users can opt out of telemetry collection through multiple methods:
-
Command-Line Flag: Add
--disable-telemetryto any commandsync-ctl --disable-telemetry analyze . -
Environment Variable: Set
SYNCABLE_CLI_TELEMETRY=falseexport SYNCABLE_CLI_TELEMETRY=false sync-ctl analyze .
-
Configuration File: Add the following to your
.syncable.tomlfile[telemetry] enabled = false
The opt-out mechanisms follow this priority order:
--disable-telemetryCLI flag (highest priority)SYNCABLE_CLI_TELEMETRYenvironment variable (medium priority)telemetry.enabledin config file (lowest priority)
Our telemetry system is designed with user privacy in mind. All data is anonymized and collected in compliance with privacy regulations.
- Rust 1.70.0 or later
- Git
- A code editor (we recommend VS Code with rust-analyzer)
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/syncable-cli.git cd syncable-cli - Add the upstream repository:
git remote add upstream https://github.com/syncable/syncable-cli.git
- Install development tools:
rustup component add rustfmt clippy
git checkout -b feature/your-feature-name- Follow the existing code style and patterns
- Add tests for new functionality
- Update documentation as needed
# Run all tests
cargo test
# Run specific test
cargo test test_name
# Run tests with output
cargo test -- --nocapture# Format code
cargo fmt
# Run linter
cargo clippy -- -D warnings
# Check for security issues
cargo auditWe follow conventional commit messages:
feat:New featurefix:Bug fixdocs:Documentation changestest:Test additions or modificationsrefactor:Code refactoringperf:Performance improvementschore:Maintenance tasks
Example:
git commit -m "feat: add support for Ruby language detection"- Language Support: Add detection for new languages (Ruby, PHP, C#)
- Framework Detection: Expand framework detection patterns
- Security Scanning: Integrate additional vulnerability databases
- Documentation: Improve user guides and API documentation
- Test Coverage: Add more unit and integration tests
- Cloud provider integrations (AWS, GCP, Azure)
- Kubernetes manifest generation
- Interactive configuration wizard
- Performance optimizations
- New IaC output formats
-
Update Your Branch:
git fetch upstream git rebase upstream/main
-
Push to Your Fork:
git push origin feature/your-feature-name
-
Create Pull Request:
- Go to the original repository on GitHub
- Click "New Pull Request"
- Select your branch
- Fill out the PR template
-
PR Requirements:
- Clear description of changes
- Tests pass (
cargo test) - Code is formatted (
cargo fmt) - No clippy warnings (
cargo clippy) - Documentation updated if needed
Place unit tests in the same file as the code:
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_function_name() {
// Test implementation
}
}Add integration tests in tests/integration/:
use assert_cmd::Command;
#[test]
fn test_cli_analyze() {
let mut cmd = Command::cargo_bin("sync-ctl").unwrap();
cmd.arg("analyze")
.arg("tests/fixtures/sample_project")
.assert()
.success();
}Add test projects in tests/fixtures/ with appropriate structure for testing.
Key directories:
src/analyzer/: Language and framework detectionsrc/generator/: IaC file generation (Phase 2)src/common/: Shared utilitiestemplates/: IaC templatestests/: Test suitedocs/: Documentation
Include:
- Rust version (
rustc --version) - OS and version
- Steps to reproduce
- Expected vs actual behavior
- Error messages
Include:
- Use case description
- Expected behavior
- Example scenarios
- Alternative solutions considered
- Start with
src/main.rsto understand the CLI structure - Review
src/analyzer/mod.rsfor the analysis pipeline - Check existing tests for usage examples
- Use
Result<T, E>for error handling - Implement traits for extensibility
- Use
logcrate for debugging - Follow the builder pattern for complex structs
- Use
rayonfor parallel processing - Cache expensive computations
- Avoid unnecessary allocations
- Profile before optimizing
- Discord: Join our community server
- GitHub Discussions: Ask questions
- Issues: Report bugs or request features
Contributors will be:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Given credit in relevant documentation
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Syncable CLI! 🚀