cairn-lang-cli 2026.8.0

Command-line interface for the Cairn language
cairn-lang-cli-2026.8.0 is not a library.

cairn-lang-cli

The cairn command-line interface. This is the only Cairn crate that ships an executable; it wires the cairn-lang-core compiler, the format backends in cairn-lang-formats, and (when described logically) the redstone synthesizer in cairn-lang-redstone into the subcommands an author actually types.

Status

Skeleton. The current binary recognizes --version / --help and prints a stub usage block; every real subcommand returns a "not implemented yet" error.

Subcommands (planned)

The CLI surface follows the spec; each subcommand maps onto a chapter so the help text and the normative document can never drift.

Subcommand Purpose Spec reference
cairn compile <file.crn> --edition <e> --target <v> Compile a .crn source to NBT / schematic output for (edition, version) compilation §4.2, versioning-editions
cairn import <schematic> --mode raw|l1 Faithful transliteration of .nbt / .litematic / .schem / .mcstructure into raw-centric .crn ecosystem-interop §12.2
cairn info <file.crn> --editions java,bedrock Report registry compatibility window, semantic-sensitive members, and recommended test targets versioning-editions §10.5
cairn diff-blocks <schematic> <file.crn> Voxel XOR + state diff for the self-correction loop ecosystem-interop §12.2, evaluation

Targeting rules

Per compilation §4.2:

  • --edition is required for any subcommand that emits voxels. The same 1.21 means different things on Java and Bedrock, and Java's DataVersion is unrelated to Bedrock's block_version.
  • --target accepts either the legacy semver form (1.21.4) or a date-based string; both are resolved through DataVersion as the canonical ordering key (versioning-editions §10.1).

License

Apache-2.0. See LICENSE.