sync

Function sync 

Source
pub fn sync(
    manifest: Option<String>,
    output_dir: Option<String>,
    dry_run: Option<bool>,
    force: Option<bool>,
    audit: Option<bool>,
    rule: Option<String>,
    verbose: Option<bool>,
    watch: Option<bool>,
    validate_only: Option<bool>,
    format: Option<String>,
    timeout: Option<u64>,
) -> Result<SyncOutput>
Expand description

Execute the complete code synchronization pipeline from a ggen.toml manifest.

This is THE ONLY command in ggen v5. It replaces all previous commands (ggen generate, ggen validate, ggen template, etc.) with a single unified pipeline.

§Pipeline Flow

ggen.toml → ontology → CONSTRUCT inference → SELECT → Template → Code

§Examples

# Basic sync (the primary workflow)
ggen sync

# Sync from specific manifest
ggen sync --manifest project/ggen.toml

# Dry-run to preview changes
ggen sync --dry-run

# Sync specific rule only
ggen sync --rule structs

# Force overwrite with audit trail
ggen sync --force --audit

# Watch mode for development
ggen sync --watch --verbose

# Validate without generating
ggen sync --validate-only

# JSON output for CI/CD
ggen sync --format json