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— parse/resolve/validateinspect— export AST/DAG/layout/policy viewsrun— full pipelinetest— run@testblockscodegen— generate SDK from interfaces
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:
--runtime-input <json-file>: values for@input(...)--budget <int>: layout budget--context-budget <int>: execution context budget--pure/--exec: execution mode
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:
--filter <name-pattern>--output summary|verbose|json--budget <int>--gas-limit <int>--pure/--exec
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.