06. CLI Reference (facet-fct)

Compiler version in this repo: fct 0.1.2 Language target: FACET v2.1.3

Install

cargo install --git https://github.com/rokoss21/facet-compiler --bin facet-fct
facet-fct --version

Optional alias:

alias fct=facet-fct

Top-level help

facet-fct --help

Commands:

build

facet-fct build --input file.facet

Use when you need Phase 1 + Phase 2 validation only.

run

facet-fct run --input file.facet --format pretty

Important options:

Example:

facet-fct run \
  --input examples/basic_prompt.facet \
  --runtime-input examples/basic_prompt.input.json \
  --format pretty \
  --pure

inspect

facet-fct inspect --input file.facet --ast ast.json --dag dag.json --layout layout.json --policy policy.json

Useful for deterministic debugging and CI artifacts.

test

facet-fct test --input file.facet

Options:

Common workflows

Validate before run

facet-fct build --input contract.facet
facet-fct run --input contract.facet --format pretty

Run with runtime input

facet-fct run --input contract.facet --runtime-input runtime.json --format pretty

CI check

facet-fct build --input contract.facet
facet-fct test --input contract.facet --output summary --pure

Notes on command naming

The spec names the reference CLI as fct; this implementation ships binary facet-fct. Using alias fct=facet-fct gives spec-style command names locally.