Contributing to Syncable CLI
September 11, 2025 ยท View on GitHub
Thank you for your interest in contributing to the Syncable Infrastructure-as-Code CLI! This document provides guidelines and instructions for contributing.
๐ค Code of Conduct
We are committed to providing a welcoming and inclusive environment. Please be respectful and constructive in all interactions.
๐ก๏ธ Telemetry and Privacy
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
Opting Out of Telemetry
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.
๐ Getting Started
Prerequisites
- Rust 1.70.0 or later
- Git
- A code editor (we recommend VS Code with rust-analyzer)
Setting Up Development Environment
- 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
๐ Development Workflow
1. Create a Feature Branch
git checkout -b feature/your-feature-name
2. Make Your Changes
- Follow the existing code style and patterns
- Add tests for new functionality
- Update documentation as needed
3. Run Tests
# Run all tests
cargo test
# Run specific test
cargo test test_name
# Run tests with output
cargo test -- --nocapture
4. Check Code Quality
# Format code
cargo fmt
# Run linter
cargo clippy -- -D warnings
# Check for security issues
cargo audit
5. Commit Your Changes
We 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"
๐ Areas for Contribution
High Priority
- 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
Feature Ideas
- Cloud provider integrations (AWS, GCP, Azure)
- Kubernetes manifest generation
- Interactive configuration wizard
- Performance optimizations
- New IaC output formats
๐ Pull Request Process
-
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
๐งช Testing Guidelines
Unit Tests
Place unit tests in the same file as the code:
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_function_name() {
// Test implementation
}
}
Integration Tests
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();
}
Test Fixtures
Add test projects in tests/fixtures/ with appropriate structure for testing.
๐ Project Structure
Key directories:
src/analyzer/: Language and framework detectionsrc/generator/: IaC file generation (Phase 2)src/common/: Shared utilitiestemplates/: IaC templatestests/: Test suitedocs/: Documentation
๐ Reporting Issues
Bug Reports
Include:
- Rust version (
rustc --version) - OS and version
- Steps to reproduce
- Expected vs actual behavior
- Error messages
Feature Requests
Include:
- Use case description
- Expected behavior
- Example scenarios
- Alternative solutions considered
๐ก Tips for Contributors
Understanding the Codebase
- Start with
src/main.rsto understand the CLI structure - Review
src/analyzer/mod.rsfor the analysis pipeline - Check existing tests for usage examples
Common Patterns
- Use
Result<T, E>for error handling - Implement traits for extensibility
- Use
logcrate for debugging - Follow the builder pattern for complex structs
Performance Considerations
- Use
rayonfor parallel processing - Cache expensive computations
- Avoid unnecessary allocations
- Profile before optimizing
๐ Getting Help
- Discord: Join our community server
- GitHub Discussions: Ask questions
- Issues: Report bugs or request features
๐ Recognition
Contributors will be:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Given credit in relevant documentation
๐ License
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Syncable CLI! ๐