CLI Reference
The calor command-line tool provides commands for working with Calor code and analyzing C# codebases for migration.
Installation
Install calor as a global .NET tool:
Bash
dotnet tool install -g calorOr update an existing installation:
Bash
dotnet tool update -g calorAvailable Commands
| Command | Description |
|---|---|
calor (default) | Compile one or more Calor files to C#; type and effect checking are on by default |
calor run | Compile and execute Calor without a project file |
calor test | Compile Calor and run xUnit tests without a project file |
calor watch | Incrementally recompile changed Calor sources |
calor verify | Verify contracts with the seven-status proof vocabulary |
calor --analyze | Static analysis: find bugs via dataflow, Z3 verification, and taint tracking |
calor assess | Score C# files for migration potential (analyze remains an alias) |
calor analyze-convertibility | Estimate whether C# source can convert successfully |
calor coverage | Explain conversion coverage and blockers for one C# file |
calor feature-check | Query the C# feature-support registry |
calor convert | Convert a file between C# and Calor with explicit loss reporting |
calor migrate | Migrate projects between C# and Calor |
calor import | Generate inferred effect manifests and assumed-provenance contract annotations |
calor review-packet | Report the unproven remainder, waivers, interop, and caller impact |
calor init | Add the SDK and AI-agent integration to a project |
calor ids | Check, assign, and index declaration IDs |
calor format | Render canonical formatting; writes require experimental acknowledgment |
calor lint | Check agent-oriented formatting; fixes require experimental acknowledgment |
calor fix | Apply reversible mechanical source migrations |
calor effects | Resolve, validate, list, or suggest effect manifest entries |
calor benchmark | Compare Calor and C# across evaluation metrics |
calor mcp | Start the MCP server for coding agents |
calor self-check docs | Detect agent-documentation drift |
calor lsp | Start the language server over stdio |
calor hook | Run AI-agent hook checks |
calor self-test | Check the compiler distribution against embedded golden files |
calor evaluation | Run experimental type-system evaluation workflows |
Machine-readable commands use the shared envelope schema. Root compile and lint also support SARIF; watch emits one JSON envelope per rebuild as NDJSON.
Compilation (Default Command)
Compile Calor source files to C#:
Bash
calor --input file.calr --output file.g.csOptions
| Option | Description |
|---|---|
--input, -i | One or more Calor inputs; omitting it displays help |
--output, -o | Optional output path for a single input; otherwise writes beside each input |
--verbose, -v | Show detailed compilation output |
--no-enforce-effects | Opt out of default-on effect enforcement |
--no-type-check | Opt out of default-on type checking for this command |
--verify | Run Z3 contract verification |
--contract-mode | Runtime contract mode: off, debug, or release |
--format, -f | Diagnostics: text, json, or sarif |
Example
Bash
# Compile a single file
calor --input src/MyModule.calr --output src/MyModule.g.cs
# Compile with verbose output
calor -v -i src/MyModule.calr -o src/MyModule.g.csSee Also
- Getting Started - Installation and first program
- Syntax Reference - Complete language reference