CLI reference
deduce <verb> <spec.fiqh> [flags]The brand is Deducible; the binary you run is deduce (you deduce a contract’s
compliance).
| 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, hanafi, maliki, shafii, hanbali |
Select the authority’s rule module. Governs check and build. |
--target <t> |
solidity, manifest, zk, all |
What build emits. Default all. |
--root <dir> |
path | Project root for resolving outputs. |
Examples
Section titled “Examples”# Check the same spec under two schools (a live khilāf)deduce check specs/musharakah_mutanaqisah.fiqh --rules hanafi # consistentdeduce check specs/musharakah_mutanaqisah.fiqh --rules maliki # refused: profit_tracks_capital
# Emit only the portable manifest (no Solidity)deduce build specs/ijarah_imbt.fiqh --root . --target manifest
# Draft from English, then it must still pass the gatededuce nl prompts/home_finance.txtBecause --rules governs build, a spec a chosen authority refuses will not generate a contract.
The authority decides whether code is emitted, not only whether it checks.
The nl gate
Section titled “The nl gate”deduce 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.
Beyond the CLI
Section titled “Beyond the CLI”- Language server.
deduce lsppowers a VS Code extension with precise, cited diagnostics inline. - FFI / Wasm. A C-ABI surface (
fiqh_check_json) builds tolibfiqhc_ffi.sofor JVM, .NET, and C integration, and todeducible.wasmfor in-browser validation (the Playground runs the real engine this way). - Invariant gateway. A small HTTP service serves manifests and answers
POST /enforce { target, terms }with allow or deny plus cited violations, andPOST /authorizefor contract terms and every party’s capacity. Useful as SupTech that issues no fatwa. See Integration & APIs.