jev extract

September 18, 2026 ยท View on GitHub

Pull values out of text without letting the model invent them. Regexes find every candidate span in code, Jev picks the one that matches the field's meaning, code normalizes the verbatim value.

jev extract [text] --want <field> [--want <field>...] [--context <text>] [options]

When to use

Invoices, emails, forms, logs: anything where you need specific values and cannot afford a hallucinated one. If no regex matches, the field is none and no API call is made.

Fields

FormExampleMeaning
builtin--want email,phone,dateemail, phone, url, amount, date, percent, number
custom regex--want invoice=/INV-\d+/Your pattern, named
custom regex with meaning--want po=/PO\s?\d{6}/:the purchase order numberThe description drives the question
aliased builtin--want "sender=email:the sender's address" (quote descriptions with spaces)Same pattern, different meaning, so two emails can be told apart

Options

OptionMeaningDefault
[text]Text, @file, or -stdin
-w, --want <field>A field, repeatable; comma-separate builtinsrequired
-c, --context <text>What the document is, e.g. "supplier invoice"
--min-confidence <p>Below this confidence the value is review0.6
--fail-on <list>Exit 2 when any field is review or missingnone

Output

Per field: value (verbatim), normalized, confidence, action (auto, review, none), candidates (how many spans matched).

BuiltinNormalized form
emaillowercased
phonedigits only, leading + kept
urltrailing punctuation stripped
amount{"value": 1250, "currency": "USD"}
dateYYYY-MM-DD
percent, numbernumber

Example

jev extract @invoice.txt --want amount,date --want invoice=/INV-\d+/ --context "supplier invoice"
Field    Value          Normalized                        Conf  Action  Cands
-------  -------------  --------------------------------  ----  ------  -----
amount   \$1,250.00      {"value":1250,"currency":"USD"}   0.97  auto    3
date     Sept 30, 2026  2026-09-30                        0.94  auto    2
invoice  INV-2231                                         1.00  auto    1

Patterns: pre-parsed value extraction, date extraction.