Extract a schematic-equivalent SPICE netlist (devices + connectivity, no
parasitics) from a GDSII or OASIS layout file and report a structured summary
-- see docs/design/lvs-extraction-spike.md section 2a for the contract and
docs/cli/extract.md for the CLI surface. Runs fully headless via KLayout's
native LayoutToNetlist/NetlistSpiceWriter -- no GUI, no Qt. PDK resolution
(when --pdk/--pdk-root are given) reuses `klt pdk find`'s resolver. NOTE:
anonymous net numbering ('$N' labels assigned to a net with no drawn label) is
NOT a stable contract across klayout versions or host platforms (issue #1063)
-- do not diff raw netlist text across environments; compare with `klt lvs`
(topological, unaffected by this numbering) instead. See docs/cli/extract.md's
'Anonymous net numbering' section.

positional arguments:
  file|request path to a GDSII or OASIS layout file, OR a `klt extract` request document (issue #1867): a path to a JSON file, '-' to read the request from stdin, or an inline JSON object string. The two forms share this slot and are told apart by value shape, never by position -- '-', a value starting with '{', or a file whose first non-whitespace byte is '{' is a request document; anything else is a layout path. A request document is mutually exclusive with this command's own flags, which it carries as fields instead -- see docs/cli/extract.md, 'Request document'. Omit when using --check (the input path is read from the committed report instead; give it alongside --check to override that recorded path, issue #2699)

options:
  -h, --help show this help message and exit
  --deck DECK extraction deck to run (currently: asap7, gf180mcu, sg13cmos5l, sg13g2, sky130). Required unless --check is given (an omitted --deck with positional 'file' is an application error, exit 1, not an argparse usage error -- see docs/cli/extract.md's exit-code contract). Not validated by argparse -- an unknown deck name also exits 1 with a clean error.
  -o, --output OUTPUT path to write the extracted SPICE netlist (default: <file> with its extension replaced by .spice; see --no-netlist)
  --no-netlist census-only run: write no netlist anywhere (nothing lands next to the input) and report netlist_path/netlist_sha256 as null. Counts and status are identical to a normal run. Cannot be combined with -o/--output or --subcircuit/--subcircuit-output
  --progress, --no-progress write stage start/finish lines and a periodic heartbeat to stderr (stdout stays the pure response). Default: heartbeat lines only (every 30s of a long stage) when stderr is not a TTY, nothing on a TTY; --no-progress forces off
  --top TOP top cell to extract when the stream has more than one (required in that case; optional otherwise)
  --pdk PDK PDK variant to resolve (e.g. sky130A); overrides $PDK. Optional -- extraction runs from --deck alone when omitted; when given, an unresolvable PDK is an application error. Omitted, MOS devices are written as bare M cards that are not mismatch-capable under Monte Carlo; pass --pdk for the subckt-wrapper X call.
  --pdk-root PDK_ROOT explicit PDK install root; overrides $PDK_ROOT and the search order
  --parasitics additionally extract first-order lumped RC parasitics (one series R + one ground C per net, from the deck's curated sheet-resistance/capacitance table) as extra R/C cards in the written netlist and a `parasitics` block in the JSON. Off by default; when omitted, output is byte-identical to a schematic-equivalent extraction. See docs/cli/extract.md.
  --mom-net NET cross-check (and replace) this one net's --parasitics ground capacitance against the `klt mom` Method-of- Moments field solver instead of the deck's lumped-RC coefficient table (issue #798, Epic #701 Phase 1b); requires --parasitics. Both the written SPICE `C` card and the `parasitics.nets[]` entry for this net carry the MoM value; the pre-swap lumped-RC value and the measured delta between the two are reported in the new `parasitics.mom_crosscheck` block. Requires the klt_mom_native extension to be built (see docs/cli/mom.md#building-the-native-extension); an unbuilt extension, a name matching no net with ground- eligible parasitics geometry, or a solver-level failure is an error. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's '--mom- net' section.
  --substrate-spreading NET estimate the resistance *through silicon* between this net's substrate-tap contacts, using the Kelvin two- disc spreading-resistance closed form and the curated PDK stackup's substrate resistivity (issue #2561, Phase 2 of issue #2515); requires --parasitics. Reported in an additive `parasitics.substrate_spreading` JSON block -- one entry per tap pair, each tagged with the accuracy regime it falls in and with the resistivity's own provenance echoed alongside. This is a two-terminal *estimate*, NOT an N-terminal substrate network solve: on a net with more than two taps every pair is reported and flagged `pairwise_approximation`. A name matching no net, or a net with no drawn substrate tie, is an error. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's '-- substrate-spreading' section.
  --spef PATH additionally write --parasitics's per-net R/C model as a Standard Parasitic Exchange Format (SPEF) file at this path (issue #948, Epic #700 Phase 3) -- a format translation of the same per-net R/C model reported in the JSON `parasitics` block and injected into the written SPICE, for `read_spef`-style STA consumption (e.g. `klt place-and-route`'s `route` stage). Requires --parasitics. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's 'SPEF export' section.
  --critical-net NET scope the lateral (same-layer, sidewall) coupling- capacitance pass onto this net (issue #976, Epic #709 Phase 2a); repeatable. A same-layer net pair only gets lateral coupling computed when at least one side is named this way -- see docs/design/extract-fidelity- roadmap.md's Stage 2b cost estimate for why this is scoped rather than run across the whole layout unconditionally, the way vertical-overlap coupling (issue #760) already is. Requires --parasitics. A name matching no net in this layout is not an error -- it is reported in `warnings` instead. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's '--critical-net' section.
  --parasitics-net NET scope --parasitics' per-net ground R/C pass onto this net (issue #1700); repeatable. Without it the ground R/C pass measures every net in the design, which dominates runtime on a large block even when only a handful of nets' R/C is wanted; with it, only the named nets are measured (and only a pair of named nets can couple). Requires --parasitics. A name matching no net in this layout is not an error -- it is reported in `warnings` instead, same as --critical-net. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's '--parasitics-net' section.
  --critical-net-pattern GLOB like --critical-net, but a shell-style glob (e.g. 'bl_*') resolved against the extracted nets' escaped spelling; repeatable, merged with any exact --critical-net names (issue #2974). Anonymous `\$N` nets match only a glob that itself starts with `\$`. A pattern matching no net is reported in `warnings` (an error under --strict-net-patterns). Requires --parasitics. See docs/cli/extract.md's '--critical- net' section.
  --critical-net-all treat every labelled (non-anonymous) net as --critical-net, minus any --critical-net-exclude glob (issue #2974). Requires --parasitics.
  --critical-net-exclude GLOB glob of nets to leave out of --critical-net-all / --critical-net-pattern (e.g. 'VSS', 'sub*'); repeatable. Requires --critical-net-all (issue #2974).
  --parasitics-net-pattern GLOB like --parasitics-net, but a shell-style glob resolved against the extracted nets; repeatable, merged with any exact --parasitics-net names (issue #2974). Requires --parasitics. See docs/cli/extract.md's '-- parasitics-net' section.
  --strict-net-patterns exit 1 when a --critical-net-pattern / --parasitics- net-pattern matches no net, or --critical-net-all selects none, instead of reporting it in `warnings` (issue #2974).
  --fail-on-unmodelled exit 1 (error envelope) when the report's `unmodelled_poly[]` is non-empty -- poly shapes (`unmarked` or `marked_unrecognised`) extracted as no device -- instead of succeeding with only a warning (issue #5388). Default behaviour is unchanged.
  --parasitics-top-cell-only additionally split each net's --parasitics ground R/C into the portion drawn directly in the top cell versus the portion drawn inside an instantiated sub-block (issue #1704), reported as the additive `resistance_ohm_top_cell`/`capacitance_ff_top_cell` fields on each `parasitics.nets[]` entry. Lets a caller who has already extracted a sub-block separately subtract its contribution back out of a composed top-level net's R/C. Requires --parasitics. Ground terms only -- does not attribute coupling capacitance to a source cell. Off by default -- byte- identical to today's behavior. See docs/cli/extract.md's '--parasitics-top-cell-only' section.
  --resistance-graph additionally attach a terminal-aware resistor-graph result to each `parasitics.nets[]` entry as `resistance_graph` (issue #2982): the terminal-pair effective-resistance matrix, graph node/edge counts, the legacy scalar and diagnostics. Additive only -- `resistance_ohm` and every other field keep their legacy value. Requires --parasitics. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's '--resistance-graph' section.
  --resistance-graph-r-cut OHM per-cut via/contact resistance for --resistance-graph (issue #2983); 0 is an ideal via. The shipped decks do curate a per-cut table (issue #3053) but klt extract does not consume it yet, so without this flag a net with a cross-level landing is `unsupported` and `resistance_graph.selected_resistance_ohm` falls back to the legacy scalar. Must be >= 0. Requires --resistance-graph. See docs/cli/extract.md's '-- resistance-graph' section.
  --distributed-rc model every --critical-net-named net's parasitic R/C as a distributed, multi-segment ladder instead of a single lumped star (issue #977, Epic #709 Phase 2b): terminals are ordered along their approximate physical spread, the net's total resistance is split into series segments between adjacent terminals, and its total capacitance into per-terminal ground capacitors. Requires --critical-net (reuses that flag's own net set rather than a second net classification mechanism). A named net with fewer than 2 device terminals keeps the star model (nothing to chain) -- reported in `warnings`, not an error. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's '--distributed-rc' section.
  --substrate-tie-ohms OHM resistance of the DC-reference tie each synthesized substrate net gets to ground under --parasitics (issue #3089). Default 1e12: the substrate is only capacitively held, i.e. floating in transient analysis. A small value pins it; 0 is a hard tie (written as a 1 mohm resistor -- SPICE has no zero-ohm resistor). Must be >= 0. Reported as `parasitics.substrate_dc_tie.resistance_ohm`/`mode`. Requires --parasitics. See docs/cli/extract.md's 'Substrate tie value' section.
  --resistance-path NET_ID FROM TO report the shortest SERIES path resistance between two emitted node IDs (`terminals[].leg_net` values) of one --distributed-rc ladder, selected by its `parasitics.nets[].net_id` (issue #2765). Repeatable; results land in `parasitics.resistance_paths[]` with status ok/limit_exceeded/node_not_found/no_path. Not an effective two-port resistance (parallel paths are not combined) and not a physical-route resistance -- the ladder is the terminal-ordered approximation --distributed-rc builds. Requires --parasitics and --distributed-rc. See docs/cli/extract.md's '-- resistance-path' section.
  --resistance-path-max-nodes N --resistance-path node cap (positive integer, default 10000): a selected net with more ladder nodes is answered `limit_exceeded` before any search. Requires --resistance-path.
  --resistance-path-max-resistors N --resistance-path resistor cap (positive integer, default 10000): a selected net with more ladder segments is answered `limit_exceeded` before any search. Requires --resistance-path.
  --parasitic-variant VARIANT drop parasitic elements at injection time (issue #3056); repeatable and composable. One of drop-r:NET|* (short the net's star legs into its hub -- no series R), drop-c-ground:NET|* (omit the net's ground C), or drop-c-coupling (omit every Ccc_* card). Requires --parasitics. Anything else is a usage error; a NET matching no net is reported in `warnings`. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's '--parasitic-variant' section.
  --mom-rlc-net NET substitute a caller-supplied R/L/C for this one net's --parasitics Phase 1/2 lumped-RC ground model -- e.g. from a separate `klt mom` (Method-of-Moments, Epic #701) run against this net's real geometry (issue #988, Epic #709 Phase 3a). Requires --parasitics and at least one of --mom-rlc-resistance-ohm/--mom-rlc- capacitance-ff/--mom-rlc-inductance-nh. Unlike --mom- net (which drives its own internal solve), this command never calls `klt mom` itself -- the values are opaque caller input, applied verbatim. Mutually exclusive with --distributed-rc naming the same net. A name matching no net with ground-eligible parasitics geometry is an error (unlike --critical-net's tolerant `warnings` convention -- a caller-supplied measured value is expected to land somewhere). Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's '--mom-rlc-net' section.
  --mom-rlc-resistance-ohm OHM the --mom-rlc-net net's substituted total series resistance, ohms; replaces its written SPICE `R` card(s)' total and its `parasitics.nets[].resistance_ohm`. Requires --mom- rlc-net.
  --mom-rlc-capacitance-ff FF the --mom-rlc-net net's substituted total ground capacitance, femtofarads; replaces its written SPICE `C` card's value and its `parasitics.nets[].capacitance_ff`. Requires --mom- rlc-net.
  --mom-rlc-inductance-nh NH add one series inductor (henries, in the written SPICE `L` card) between the --mom-rlc-net net's hub and its ground capacitor, nanohenries. Purely additive -- there is no inductance term in this command's default RC-only model to replace. Requires --mom-rlc-net.
  --def-net-names name routed nets from the DEF net name KLayout's LEF/DEF reader recorded on their geometry as a GDS shape property (property 1, `LEFDEFReaderConfiguration.net_property_name`'s default) instead of from GDS text labels (issue #951, Epic #700 Phase 3). On a routed GDS from `klt place- and-route` this recovers the design's own net names (`_019_`, `req_msg[3]`) in place of KLayout's synthesized `$<id>` placeholders and pin-label-joined `A,X` names, which is what lets the emitted SPICE/SPEF line up with the netlist an STA tool has linked. Off by default -- property 1 carries no guaranteed meaning in a GDS that did not come from a LEF/DEF merge, so this is opt-in, and every other layout's output is byte-identical to today's. A run that opts in and finds no such property says so in `warnings`. See docs/cli/extract.md's '--def-net-names' section.
  --def-net-connections PATH correlate --spef's `*D_NET` blocks against real cell- instance pins by parsing this routed DEF file's own `NETS` section (issue #961, Epic #700 Phase 3) -- emits `*I <inst>:<pin>` `*CONN` entries (in addition to any `*P` port entry) and wires each into the RC network with a zero-ohm connectivity leg from the net's own node, which is what lets a real OpenSTA `read_spef` session actually attach this net's parasitics to a design pin instead of discarding the whole `*D_NET` block as unconnected. A net name that appears more than once in the extraction (e.g. several un-strapped `VGND` islands) is skipped -- see docs/cli/extract.md's 'SPEF export' section. Requires --spef. Off by default -- byte-identical to today's behavior.
  --top-cell-pins promote only labels drawn directly in the top cell to top-level pins. Extraction is flat, so by default every named net becomes a pin -- including nets named only by a label inside an instanced sub-cell, which are internal nodes once instanced (issue #291). With this flag such below-top labels keep their net name but stay internal. A warning naming any below-top label promotion is emitted either way. See docs/cli/extract.md.
  --pins PINS comma-separated declared pin set (e.g. 'A,B,VDD,VSS'), issue #514. Orthogonal to --top-cell-pins (a per-cell filter): this is per-net -- a promoted net matches this set when any one of its comma-joined component labels is in it (issue #1687, not a whole-string match), and every net that matches none of its labels keeps its name but is demoted to an internal node, instead of being promoted to a top-level pin. Use this to name an internal node of a lumped schematic device (e.g. one tap of a metal-option ladder) for documentation without blocking `klt lvs`'s options.combine_devices from folding the series chain. Off by default -- every named net still promotes to a pin, byte-identical to today's behavior. See docs/cli/extract.md.
  --def-pins PATH derive the declared pin set automatically from this routed DEF file's own PINS section (issue #1390), instead of requiring --pins to be hand-derived. The automatic counterpart to --top-cell-pins for a `klt place-and-route`-produced (DEF->GDS-merged) layout: that merge flattens the whole design into the top cell, so --top-cell-pins's below-top-label heuristic cannot tell a genuine top-level port from an internal DEF NETS connection point (both land 'in the top cell'). Reuses --pins' own per-net, any-component- label reconciliation (issue #1687), with the DEF's own PINS section as the declared set instead of a hand- derived --pins list. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's 'DEF- derived declared pins' section.
  --rename-declared-pins rename each surviving promoted pin net to its declared name (issue #2854): a net whose comma-joined component labels contain exactly one --pins/--def-pins name is renamed to it, so the written .SUBCKT header and nets[] carry the declared name (e.g. 'vss') instead of KLayout's joined multi-label form (e.g. 'VGND|g_vss_m1|vss') -- which is what lets `klt lvs`'s options.anchor_top_level_pins pair it with a same- named reference pin. A net matching 2+ declared names is reported (a short between interface pins), never renamed; a rename colliding with an existing net name is skipped and reported. Every rename is disclosed in a warnings entry and the additive pin_renames response field. Requires --pins or --def-pins. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's 'Renaming promoted pins to their declared name' section.
  --tie-declared-pins alias a net matching 2+ declared --pins/--def-pins names back to every declared pin (issue #4383): the net is renamed to its first declared name and the other declared names are added to the .SUBCKT header as ports tied to it by a 1 micro-ohm resistor, so the extracted pin list matches the schematic's. Each tie is reported in the additive pin_ties response field and a declared_pin_short warning stays. Implies --rename-declared-pins; requires --pins or --def-pins. Off by default -- byte-identical to today's behavior.
  --pin-source-cells CELL[,CELL...] comma-separated cell name(s) whose own drawn pin-name labels (anywhere in the hierarchy, at any depth) declare genuine top-level pins -- issue #1513, a third, *positional* declared-pin mechanism for a `klt gen-compose`d assembly of several pre-labelled macros with no governing top-level DEF of its own to anchor --def-pins on. Unlike --top-cell-pins (a per-cell- depth filter that demotes a composition's own hand- drawn interconnect labels, since they necessarily live in an instanced sub-cell, not the new top cell) and --pins/--def-pins (per-net string matching, which cannot tell two distinct nets apart when they coincidentally share a joined label component -- e.g. two independently-labelled macros that each happen to use 'CLK' internally), this resolves each named cell's own labels to their real net by probing that label's own position, not by matching its text. Every currently-promoted pin not reached this way is demoted, exactly as --pins/--def-pins demote on a miss. Applied after --pins/--def-pins's own reconciliation (when given), so it can only further restrict. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's 'Pin-source cells' section.
  --deck-option KEY=VALUE select a caller-visible flavour of a deck's shared- geometry device family (issue #595), as KEY=VALUE; repeatable. Today's only recognised key is gf180mcu's `poly_res` (values `1k` (default), `2k`, `3k`), which selects which of the identically-drawn `ppolyf_u_{1k,2k,3k}` sheet-rho interpretations a `Resistor`-marked poly segment extracts as -- mirroring the upstream PDK LVS deck's own build-time `POLY_RES` variable, which the drawn geometry alone cannot distinguish. An unrecognised key or value is an error, not a silently-kept default. Omitted by default, which resolves every deck exactly as before this flag existed. The resolved mapping is echoed in the JSON response's `provenance.deck.options`. See docs/cli/extract.md's 'Selecting a shared-geometry resistor flavour' section.
  --label-layer ROLE=LAYER/DATATYPE read net/pin name text for one label ROLE from the given GDS layer/datatype instead of the one this --deck's curated default picked (issue #2656), as ROLE=LAYER/DATATYPE; repeatable. ROLE is `well`, `poly`, or `metal<i>` (0-based, index-aligned with the deck's own metal stack, so `metal0` is the level `contact` lands on); the value `none` reads no label layer for that role at all. A PDK layer map usually declares more than one text purpose per conductor and a deck has to pick one -- IHP's shared layer map declares both `Metal1.pin` (8/2) and `Metal1.text` (8/25), and `sg13cmos5l` reads `.pin` where `sg13g2` reads `.text` -- so a placed-and-routed stream whose names went on the other purpose names nothing: only named nets are promoted, so the whole top-level pin interface comes out empty and `klt lvs` has no anchor against a reference. `--label-layer metal0=8/25 --label-layer metal1=10/25 ...` points the reader at the purpose the flow actually wrote. Replaces the deck's own pair for that role rather than adding to it, and moves only where *names* are read from -- the deck's drawing/connectivity layers are untouched. A ROLE this deck has no label slot for is an error, not a silent no-op. Omitted by default, which reads labels exactly as before this flag existed. The mapping is echoed in the JSON response's `label_layers` field. See docs/cli/extract.md's 'Overriding a deck's label layers' section.
  --device-model CLASS=SUBCKT with --pdk/--pdk-root, write the bipolar device CLASS as an `X` call to the named PDK subcircuit SUBCKT (issue #4234), repeatable. For a bipolar class the deck recognises but has no curated PDK binding for -- today gf180mcu's `bjt`, whose cell name and polarity the tool cannot guess but the schematic states. A CLASS the deck does not declare, or one that already has a curated binding (sky130's `pnp`), is an error; curated data is never overridden. Omitted by default -- output is byte-identical to before this flag existed. The mapping is echoed in the JSON response's `device_models` field. See docs/cli/extract.md.
  --probe name=ID,layer=ROLE,x=UM,y=UM ask which extracted net lies under one point (issue #2986), as 'name=<id>,layer=<role>,x=<um>,y=<um>'; repeatable. x/y are micrometres in the top cell's frame (the frame label positions use). ROLE is the same vocabulary as --label-layer: `well`, `poly`, or `metal<i>` (0-based, index-aligned with the deck's metal stack). Answered on the extraction this command already runs, so the net is the same one `nets[]` reports under --def-net-names / --abstract-cells / --pins. The JSON `probes[]` carries {name, layer, x_um, y_um, found, net, cluster_id}; two probes on one net share `cluster_id`. A point on empty space or inside a black-box region is `found: false`, not an error. See docs/cli/extract.md's 'Point-to-net probes'.
  --defer-resistor-fixed-offset omit each opted-in resistor device class's `fixed_offset_ohm` head/end-resistance term from the extracted `R` (issue #588), leaving only the raw per- primitive body resistance in both the written SPICE and the JSON `devices[].params.r_ohm`. Use this when the netlist will be read back through `klt lvs`'s pre- extracted `layout.netlist` + `layout.deck` + `options.combine_devices: true` path, which applies the offset once per *post-combine* logical device -- extracting it per drawn primitive first would double- count it across a series fold. Off by default: the offset is applied at extraction time, byte-identical to today's behavior. A deck with no `fixed_offset_ohm`-opted-in resistor class (everything except sky130's res_high_po today) is unaffected either way. See docs/cli/extract.md.
  --abstract-cells PATTERN treat every instantiated cell whose name matches this fnmatch glob (e.g. 'sky130_fd_sc_hd__*') as an opaque, pinned black box instead of flattening it to its own devices (issue #620); repeatable, OR'd together. Pins are resolved per distinct cell type, from that cell's own metal_labels/well_label/poly_label text when present, else from --abstract-cell-lef; a matched type with neither pin source is an error. Emits one .SUBCKT per matched cell type (empty body) and one X<instance> card per matched instance in the written SPICE, wired via the same net names the un-abstracted portion already uses. Everything not matched extracts exactly as today. Off by default. See docs/cli/extract.md's 'Cell-level (black-box + pins) abstraction' section.
  --abstract-cell-lef PATH LEF file (or directory of *.lef/*.tlef files) to resolve pins from for an --abstract-cells-matched cell type that draws no in-cell pin label -- the MACRO/PIN/PORT block whose name matches the cell type; repeatable, first match wins. Has no effect without --abstract-cells (an error if given alone). See docs/cli/extract.md's 'Cell-level (black-box + pins) abstraction' section.
  --subcircuit CELL additionally write a second SPICE deck carrying one named '.SUBCKT CELL' block for that sub-cell's own extracted devices, so a post-layout testbench can instantiate a routed block's sub-circuit standalone (issue #2245). Devices are attributed positionally, by the same instance path devices[].instance_path reports; nets that also carry a device terminal from outside the sub-cell (or are a pin of the flat deck) become .SUBCKT pins, with their series parasitic legs kept inside and their shunt (ground/coupling) capacitance attributed to the parent -- see docs/cli/extract.md's 'Sub-circuit isolation' section for the full attribution rule. Near-inverse of --abstract-cells (which emits an empty black box), and mutually exclusive with it. The cell must be placed exactly once under the top cell. The flat netlist is written first and is byte-for-byte unchanged; off by default.
  --subcircuit-output PATH where --subcircuit writes its sliced deck (default: the flat netlist path with '.CELL' inserted before its extension, e.g. build/gcd.spice -> build/gcd.delaywin_hv.spice). Requires --subcircuit. See docs/cli/extract.md's 'Sub-circuit isolation' section.
  --hierarchical-cells CELL[,CELL...] comma-separated cell name(s) to emit as their own '.SUBCKT' in the written SPICE instead of flattening them into the top circuit (issue #2722): one definition per named cell, one X instance per placement, so per-circuit klt lvs options such as options.combine_devices_per_circuit can scope the layout side. The cells must be reachable non-top cells, and every placement of one cell must be electrically identical; a named cell containing another named cell yields a nested '.SUBCKT' tree (#2916). Absent/top/unreachable names and combination with --parasitics, --subcircuit or --abstract-cells are errors (rejected by design, #2916). devices[]/nets[] keep describing the flat extraction and a 'hierarchy' block is added to the JSON response. Off by default -- the flat bytes and JSON are unchanged. See docs/cli/extract.md's 'Hierarchical output' section.
  --matched-group NAME=INST1,INST2[,...] declare a set of device instances (devices[].name, e.g. '$1') expected to stay geometrically matched -- a differential pair, a current-mirror leg (issue #1018); repeatable, one group per flag. After extraction, every parameter every resolved member reports in common (e.g. w_um/l_um for a MOS pair, r_ohm for a matched resistor pair) is compared for exact equality (post-rounding) across the group; a divergence is reported in the new matched_device_groups[] field and in warnings, citing the group name, the mismatched field, and each member's value. This is a self- consistency check within one extraction, not a comparison against a reference netlist (that is `klt lvs`'s job). An instance name matching no extracted device is not an error -- it is reported in matched_device_groups[].unresolved_instances and in warnings instead. A group name repeated across two --matched-group flags, or fewer than two instance names in one entry, is an error. Off by default -- byte-identical to today's behavior. See docs/cli/extract.md's 'Matched-device geometry check' section.
  --check REPORT verify a previously committed 'klt extract --format json' report (REPORT) instead of running a fresh extraction (issue #1149). The input layout is read from REPORT itself unless the positional 'file' is also given, which then overrides REPORT's recorded input unconditionally (issue #2699: needed when REPORT's input is outside any repository). Cheap mode (default): re-hash the input layout and deck named in REPORT's provenance block and compare against the recorded content_hash values, no extraction engine re- run. Combine with --rerun for full mode (re-run the extraction and diff verdict-bearing fields). Exits 0 if still consistent, 3 if drifted -- see docs/cli/extract.md, '--check'
  --rerun full mode for --check (issue #1149): re-run the extraction named in REPORT (best-effort -- reconstructs only file/deck/top/deck_options; see docs/cli/extract.md, '--check', for reconstruction limits) and diff verdict-bearing fields against the committed report, excluding provenance.klt_version/klayout_version/pdk.version (fields that legitimately vary between runs of identical inputs). Requires --check; a clean error (exit 1) otherwise
  --backend {local,batch} where the extraction runs: 'local' (this host) or 'batch' (the batch runner, through the same S3 job contract as `klt sim --backend batch`). Default: $KLT_EXTRACT_BACKEND, else 'local'. A batch failure is an error (exit 1), never a fallback to a local run. Fresh extractions only (not --check). See docs/cli/extract.md's 'Batch backend'
  --timeout-s TIMEOUT_S --backend batch only: wall-clock bound on the runner's extraction in seconds (default: 3000). The job's timeout is this plus the batch overhead and is not capped client-side; one above the fleet's max_job_seconds is refused before submission
  --batch-root BATCH_ROOT --backend batch only: the directory whose git-tracked files are uploaded as the job's input tree (default: the layout's git checkout). The layout must be a tracked file under it; the uncompressed total is capped at 64 MiB
  --batch-include GLOB --backend batch only, repeatable: upload only the git- tracked files under the batch root matching this root- relative glob (a bare directory name selects everything under it)
  --batch-exclude GLOB --backend batch only, repeatable: leave the files matching this root-relative glob out of the upload (applied after --batch-include)
  --format {text,json} output format (default: text)
