v0.6.7Two new compile-time diagnostics catch non-compiling Calor earlier: Calor0116 rejects malformed four-field function headers, and Calor0205 flags a value returned from a void, iterator, constructor, setter, or event accessor — together closing the “value returned from void” gap. Every agent-readable doc surface was also swept to indent-only syntax, guarded by a compile-time test.See what's new

migrate

Migrate an entire project between C# and Calor.

Bash
calor migrate <path> [options]

Overview

The migrate command converts all applicable files in a project or directory. It:

  • Scans for convertible files
  • Creates a migration plan
  • Converts files in parallel (optional)
  • Generates detailed reports
  • Handles errors gracefully without stopping

Quick Start

Bash
# Preview migration (dry run)
calor migrate ./src --dry-run

# Migrate C# to Calor
calor migrate ./src

# Migrate with report
calor migrate ./src --report migration-report.md

# Migrate Calor back to C#
calor migrate ./src --direction calor-to-cs

Options

OptionShortDefaultDescription
--dry-run-nfalsePreview changes without writing files
--benchmark-bfalseInclude before/after metrics comparison
--direction-dcs-to-calorMigration direction
--parallel-ptrueRun conversions in parallel
--report-rNoneSave migration report to file (.md or .json)
--verbose-vfalseEnable verbose output
--explicit-call-closersfalseEmit explicit §/C for every §C call (v0.6.0-compatible output).

Migration Plan

Before converting, the command analyzes your codebase and creates a plan:

Bash
calor migrate ./src --dry-run

Output:

Plain Text
=== Migration Plan ===

Direction: C# → Calor
Source: ./src

Files to Convert:
  ✓ 24 files fully convertible
  ⚠ 8 files partially convertible (will have warnings)
  ✗ 3 files skipped (unsupported constructs)

Benchmark Summary

Use --benchmark to see aggregate metrics:

Bash
calor migrate ./src --benchmark

Output includes:

Plain Text
=== Benchmark Summary ===

Token Savings: 17,090 tokens (37.8% reduction)

Migration Reports

Generate detailed reports for documentation:

Bash
# Markdown report
calor migrate ./src --report migration-report.md

# JSON report
calor migrate ./src --report migration-report.json

Exit Codes

CodeMeaning
0All files migrated successfully
1Some files failed or had warnings
2Error - invalid arguments, directory not found, etc.

See Also