Skip to content

CLI reference

Terminal window
deducible <verb> <spec.fiqh> [flags]
Verb Purpose
parse Parse a spec and print its AST.
check Run the fiqh invariant engine; report consistency. No files emitted.
build check, then emit codegen artifacts on success.
nl Draft a .fiqh from a natural-language prompt (via an LLM), then re-check it through the same formal gate.
lsp Start the stdio JSON-RPC language server (editor diagnostics).
fuzz [N] Run the property/fuzz harness for N iterations (default 100k).
Flag Values Notes
--rules <name> aaoifi, dsn-mui, … Select the jurisdiction’s rule module.
--target <t> solidity, manifest, zk, all What build emits. Default all.
--root <dir> path Project root for resolving outputs.
Terminal window
# Check under two jurisdictions
deducible check specs/musharakah_mutanaqisah.fiqh --rules aaoifi
deducible check specs/musharakah_mutanaqisah.fiqh --rules dsn-mui
# Emit only the portable manifest (no Solidity)
deducible build specs/ijarah_imbt.fiqh --target manifest
# Draft from English, then it must still pass the gate
deducible nl prompts/home_finance.txt

deducible nl is deliberately not a shortcut around compliance. The model drafts a candidate .fiqh; that draft is then fed through the same check every hand-written spec faces. A draft that invents a forbidden term is refused exactly as a human’s would be — the LLM proposes, the engine disposes.

  • Language serverdeducible lsp powers a VS Code extension with precise, cited diagnostics inline.
  • FFI / Wasm — a C-ABI surface (fiqh_check_json) builds to libfiqhc_ffi.so for JVM/.NET/C integration, and to deducible.wasm for in-browser validation.
  • Invariant gateway — a small HTTP service serves manifests and answers POST /enforce { target, terms } → allow/deny with cited violations, and POST /authorize → contract terms and every party’s capacity. Useful as SupTech that issues no fatwa.