Metadata-Version: 2.4
Name: exactor-cli
Version: 1.29.0
Summary: Exactor CLI & Python SDK — XOR-native Boolean minimization for ZK/FHE/MPC and EDA (https://exactor.tech)
Author: Exactor Research
License: Proprietary
Project-URL: Homepage, https://exactor.tech
Project-URL: Documentation, https://exactor.tech/GETTING_STARTED.md
Project-URL: API, https://exactor.tech/public-swagger-ui
Keywords: boolean,logic-minimization,xor,esop,synthesis,zk,fhe,mpc,blif,aiger,eda,verilog,fsm
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# exactor-cli

**Boolean logic minimization for the real world — XOR-native, verifiable, one command.**

`exactor-cli` is the official Python client for the [Exactor Cloud Engine](https://exactor.tech): the only optimizer that returns the **minimal Boolean function itself** in canonical ESOP/XOR form — not just a smaller circuit. Built for the workloads where structure matters: **ZK proofs, FHE, MPC, ACL/rule matrices, and hardware flows**.

```bash
pip install exactor-cli
```

---

## Why Exactor

| | Typical EDA tools | **Exactor** |
|---|---|---|
| Output | A circuit (AIG/XAG netlist) | **The minimal Boolean function** (canonical ESOP, XOR factors intact) |
| Native formats | BLIF/AIGER | BLIF · AIGER `.aag` · bench · PLA · `exactor-netlist-v1` — **in and out** |
| ZK/FHE/MPC | bolt-on scripts | **first-class emitters**: Bristol, Circom, testbench + certificate |
| Sequential | full flows | FSM state minimization + reachability (`fsm_minimize`, `fsm_init`) |
| Verification | separate tool | per-result verification + formal equivalence via Yosys plugin |
| Price | free but DIY | **light jobs free (0 SU)** — pay only for heavy synthesis |

Works wherever Python 3.8+ runs — stdlib only, zero dependencies.

---

## Quickstart — first simplification in 2 minutes

```bash
# 1. Get a free API key at https://exactor.tech (Console → API Keys)

# 2. Login
exactor login --token ek_YOUR_KEY

# 3. Minimize
exactor minimize circuit.pla -o out.v
```

```
  EXACTOR CLOUD // SYNTHESIS COMPLETE (FORMALLY VERIFIED)
  Solver Latency:  16 ms
  Result Equation: !(c ^ b) & !a + (d ^ c) & !a
```

No install at all? The API is plain HTTPS:

```bash
curl -X POST https://exactor.tech/api/simplify \
  -H "Authorization: Bearer ek_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"variables":["a","b","c","d"],"minterms":[0,1,2,5,6,7],"emit":["verilog"]}'
```

---

## As a library

```python
from exactor import ExactorClient, ExactorError

client = ExactorClient(token="ek_...")          # or EXACTOR_TOKEN env

# Boolean function by minterms
res = client.simplify(variables=["a","b","c","d"],
                      minterms=[0,1,2,5,6,7],
                      emit=["verilog","metrics"])
print(res["result"], res["su_used"])

# Structural netlist — accepts BLIF, .aag, .bench or exactor-netlist-v1 JSON
res = client.simplify_netlist(open("circuit.blif").read(),
                              fsm_minimize=True, fsm_init="0")

# Free dry-run analysis (0 SU)
print(client.analyze(["a","b","c"], [0,1,5,7]))
```

`ExactorError` exposes `.status`, `.is_quota` (402), `.is_rate_limited` (429).

---

## What you can throw at it

- **`.pla`** — Espresso standard
- **`.json`** — `{variables, minterms, dont_cares}`
- **`.blif`** — ABC/Yosys `write_blif` output, straight in
- **`.aag`** — ASCII AIGER (Simplifier/SAT-sweeping tools)
- **`.bench`** — ISCAS bench (Simplifier native)
- **`exactor-netlist-v1`** — structural DAG from the `yosys-exactor` plugin, including sequential flop/latch cuts

Outputs: Verilog, VHDL, BLIF, xespresso ESOP, **Bristol** (ZK), **Circom** (ZK), self-checking **testbench** + equivalence certificate, Yosys script.

---

## CLI reference

```bash
exactor login --token ek_...            # store credentials
exactor whoami / balance                # plan + SU balance
exactor minimize in.pla -o out.v        # sync simplify (.pla/.json/.blif/.aag/.bench)
exactor minimize big.pla --async --wait # distributed job for large inputs
exactor minimize net.json --fsm-minimize --fsm-init 0
exactor status <job_id>                 # async job polling
```

Engine knobs: `--max-sim-vars`, `--esop-budget`, `--no-fhe-cost-aware`, `--simplifier-prepass` / `--no-simplifier-prepass`, `--blind` (π/σ anonymized submission).

---

## Billing — light jobs are free

Jobs within the FREE envelope (≤32 vars / ≤2K minterms; netlists ≤32 in / ≤5K gates) cost **0 SU on every plan** — rate-limited, not metered. SU are only consumed by heavy synthesis (33–128 vars, large netlists, FSM minimization at scale). See [credits-and-billing](https://exactor.tech) for the full model.

---

## Links

- **Service & console:** https://exactor.tech
- **Interactive API docs:** https://exactor.tech/public-swagger-ui
- **Getting started guide:** https://exactor.tech/GETTING_STARTED.md
- **Yosys plugin:** `yosys-exactor` (`exactor_netlist`, `exactor_spec`, `exactor_import`)

---

*Proprietary client for the Exactor Cloud Engine. Python 3.8+, stdlib only.*
