aiex-cli 0.0.1 → 0.0.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -2
- package/dist/cli.mjs +880 -35
- package/dist/{doctor-collector-CykRm0fC.mjs → doctor-collector-BhNgLdrJ.mjs} +31 -4
- package/dist/index.mjs +1 -1
- package/dist/web/assets/AISettings-DU-jBPOf.js +205 -0
- package/dist/web/assets/{DataBrowser-CwcTG80-.js → DataBrowser-DQwOvooY.js} +3 -3
- package/dist/web/assets/ExtractRunner-CzfLlCCf.js +1 -0
- package/dist/web/assets/{ExtractionViewer-CsdK1kKK.js → ExtractionViewer-D7tghmR-.js} +1 -1
- package/dist/web/assets/{JsonSchemaEditor-D477lV5a.js → JsonSchemaEditor-DXhYW-Un.js} +3 -3
- package/dist/web/assets/{api-client-D2Y_-4JM.js → api-client-CIC2X8_4.js} +1 -1
- package/dist/web/assets/baseinput-B7PU5-38.js +2 -0
- package/dist/web/assets/checkbox-CCQwMfLd.js +142 -0
- package/dist/web/assets/{cssMode-CPThwItX.js → cssMode-CCz1uj8b.js} +1 -1
- package/dist/web/assets/dialog-8xaIXBKO.js +108 -0
- package/dist/web/assets/{editor.main-BnOkwRFv.js → editor.main-DOue-nGf.js} +2 -2
- package/dist/web/assets/{freemarker2-DWDTYVJR.js → freemarker2-C87H7V8i.js} +1 -1
- package/dist/web/assets/{handlebars-D4DzjGQ7.js → handlebars-TLnoktZW.js} +1 -1
- package/dist/web/assets/{html-DnzhKSoD.js → html-Rewbtgcp.js} +1 -1
- package/dist/web/assets/{htmlMode-CR7UKfEH.js → htmlMode-Cr9y3YUi.js} +1 -1
- package/dist/web/assets/index-BEorm4a5.css +2 -0
- package/dist/web/assets/{index-DVDVw-GK.js → index-FPVIOydC.js} +38 -38
- package/dist/web/assets/{javascript-D2srszZ8.js → javascript-BO8DPECx.js} +1 -1
- package/dist/web/assets/{jsonMode-B4jaPYEr.js → jsonMode-B78m_Y1l.js} +1 -1
- package/dist/web/assets/{liquid-CIT2Wl_l.js → liquid-CDp_8YUE.js} +1 -1
- package/dist/web/assets/{mdx-CWLaEOFy.js → mdx-CeR1GULE.js} +1 -1
- package/dist/web/assets/{monaco.contribution-DDv5ldfS.js → monaco.contribution-tCitzj1_.js} +2 -2
- package/dist/web/assets/{python-6CGfpCNq.js → python-DWmB1hQ6.js} +1 -1
- package/dist/web/assets/{razor-DEMMh3TD.js → razor-BVk762Lq.js} +1 -1
- package/dist/web/assets/runtime-dom.esm-bundler-DZwuSnld.js +1 -0
- package/dist/web/assets/select-DKPPF403.js +438 -0
- package/dist/web/assets/{tsMode-Cm1NtjPs.js → tsMode-Gjs5D1gt.js} +1 -1
- package/dist/web/assets/{typescript-BM9aPEFg.js → typescript-Cw6YtwrM.js} +1 -1
- package/dist/web/assets/utils-CZhxh2Ya.js +2 -0
- package/dist/web/assets/{xml-CoSbvcg5.js → xml-guZq0YZJ.js} +1 -1
- package/dist/web/assets/{yaml-56GOgy8k.js → yaml-B9TbU-LX.js} +1 -1
- package/dist/web/index.html +9 -8
- package/package.json +2 -1
- package/dist/web/assets/AISettings-CI6Lgx0p.js +0 -339
- package/dist/web/assets/dialog-CUkPLPNP.js +0 -109
- package/dist/web/assets/index-C9N8oWt4.css +0 -2
- package/dist/web/assets/runtime-dom.esm-bundler-ei_N7Xjw.js +0 -1
- package/dist/web/assets/select-BGex2SPs.js +0 -439
- /package/dist/web/assets/{abap-Bgec7Keq.js → abap-C3UM4cME.js} +0 -0
- /package/dist/web/assets/{apex-VBlPwEoQ.js → apex-BQBZvQmN.js} +0 -0
- /package/dist/web/assets/{azcli-DKqrEFBx.js → azcli-Dn9Awrok.js} +0 -0
- /package/dist/web/assets/{bat-DdgQWy_0.js → bat-JgEezSDo.js} +0 -0
- /package/dist/web/assets/{bicep-CRMM43EB.js → bicep-vcQeC7wE.js} +0 -0
- /package/dist/web/assets/{cameligo-UatALtML.js → cameligo-C0cr0T3L.js} +0 -0
- /package/dist/web/assets/{clojure-D8JU08RA.js → clojure-Brc1-rbW.js} +0 -0
- /package/dist/web/assets/{coffee-C56wu358.js → coffee-BiZYU83a.js} +0 -0
- /package/dist/web/assets/{cpp-CyZLvhJG.js → cpp-ikWHCInz.js} +0 -0
- /package/dist/web/assets/{csharp-BJl3ixva.js → csharp-BRWs_LfH.js} +0 -0
- /package/dist/web/assets/{csp-CxEKxmO-.js → csp-CcAumoJw.js} +0 -0
- /package/dist/web/assets/{css-B0t_muXd.js → css-BZm6paiA.js} +0 -0
- /package/dist/web/assets/{cypher-D1hqiMFD.js → cypher-CDQMONdb.js} +0 -0
- /package/dist/web/assets/{dart-Bz550Pyv.js → dart-Ci4SZdF1.js} +0 -0
- /package/dist/web/assets/{dist-9yHVMqQ0.js → dist-B5Yem2Jn.js} +0 -0
- /package/dist/web/assets/{dockerfile-CIXgVAuA.js → dockerfile-BV0tAr-M.js} +0 -0
- /package/dist/web/assets/{ecl-D9qbvZoA.js → ecl-CP7nM2KN.js} +0 -0
- /package/dist/web/assets/{editor.api-C8BHpRhn.js → editor.api-BU_q4v8i.js} +0 -0
- /package/dist/web/assets/{elixir-b2M38fAy.js → elixir-GcA6wFiI.js} +0 -0
- /package/dist/web/assets/{flow9-Dq1UYMkt.js → flow9-CIb9youF.js} +0 -0
- /package/dist/web/assets/{fsharp-BaeLhgfq.js → fsharp-BVaBE4co.js} +0 -0
- /package/dist/web/assets/{go-Bd-NFKIC.js → go-Bbqf306x.js} +0 -0
- /package/dist/web/assets/{graphql-DZVerJfy.js → graphql-DJPrC4l-.js} +0 -0
- /package/dist/web/assets/{hcl-CAVzrZfH.js → hcl-QyfWVWpM.js} +0 -0
- /package/dist/web/assets/{ini-CyXdX58t.js → ini-CgstZeS8.js} +0 -0
- /package/dist/web/assets/{java-B5pNgvhy.js → java-D4AG88ZY.js} +0 -0
- /package/dist/web/assets/{julia-XRhmV3AN.js → julia-CN8U9648.js} +0 -0
- /package/dist/web/assets/{kotlin-DOd3J5vr.js → kotlin-gNNgpJhY.js} +0 -0
- /package/dist/web/assets/{less-veZSnyw6.js → less-C3SY2L8t.js} +0 -0
- /package/dist/web/assets/{lexon-QWGkuK0H.js → lexon-CznnqzUX.js} +0 -0
- /package/dist/web/assets/{lua-CYGpjuO5.js → lua-f3xyJgy5.js} +0 -0
- /package/dist/web/assets/{m3-yNnrZkdc.js → m3-Cl7J89p-.js} +0 -0
- /package/dist/web/assets/{markdown-BCSWEPSX.js → markdown-Bv2fnzzT.js} +0 -0
- /package/dist/web/assets/{mips-OpYmcC30.js → mips-D6rXUTWa.js} +0 -0
- /package/dist/web/assets/{msdax-2oxoTO9Z.js → msdax-Bb1N2x5J.js} +0 -0
- /package/dist/web/assets/{mysql-5KlC-K_9.js → mysql-DXSr6oD7.js} +0 -0
- /package/dist/web/assets/{object-utils-I4gWdSnS.js → object-utils-Cm2M3fPO.js} +0 -0
- /package/dist/web/assets/{objective-c-CcDCgtLx.js → objective-c-CEJiVkDa.js} +0 -0
- /package/dist/web/assets/{pascal-BZGsbaEV.js → pascal-BtkMEIba.js} +0 -0
- /package/dist/web/assets/{pascaligo-DtD5qU3G.js → pascaligo-C7FAwqk7.js} +0 -0
- /package/dist/web/assets/{perl-C1jNNS3E.js → perl-D9kqkBbN.js} +0 -0
- /package/dist/web/assets/{pgsql-CT0fhiZa.js → pgsql-BjGTBL1W.js} +0 -0
- /package/dist/web/assets/{php-D6DrXoPM.js → php-BN0c0noA.js} +0 -0
- /package/dist/web/assets/{pla-b3-HN2pF.js → pla-B94QTqOt.js} +0 -0
- /package/dist/web/assets/{postiats-Bin2ApVS.js → postiats-DH91dqBs.js} +0 -0
- /package/dist/web/assets/{powerquery-7ASnn-ZG.js → powerquery-D7P0oUen.js} +0 -0
- /package/dist/web/assets/{powershell-t4p7sU1H.js → powershell-CCVHmJax.js} +0 -0
- /package/dist/web/assets/{preload-helper-Dd-HcVz_.js → preload-helper-DgFuoWHe.js} +0 -0
- /package/dist/web/assets/{protobuf-BUGeWa_j.js → protobuf-BIP7pixC.js} +0 -0
- /package/dist/web/assets/{pug-BuKcgC9s.js → pug-DcbLK7HH.js} +0 -0
- /package/dist/web/assets/{qsharp-DxLLX8mo.js → qsharp-B-VY_WOG.js} +0 -0
- /package/dist/web/assets/{r-DMlFgn7A.js → r-DwRtsJsj.js} +0 -0
- /package/dist/web/assets/{redis-cXItkC5u.js → redis-CaW0tkwu.js} +0 -0
- /package/dist/web/assets/{redshift-BZVbW7HE.js → redshift-3tS8G0ME.js} +0 -0
- /package/dist/web/assets/{restructuredtext-BzjxwS8h.js → restructuredtext-_TNyGyK0.js} +0 -0
- /package/dist/web/assets/{ruby-C5nyLV4l.js → ruby-A-MwVfO4.js} +0 -0
- /package/dist/web/assets/{rust-BcmMsHdf.js → rust-oemlUIvG.js} +0 -0
- /package/dist/web/assets/{sb-Dnb1iy6B.js → sb-BDZuaI3W.js} +0 -0
- /package/dist/web/assets/{scala-anMIFYpA.js → scala-Bfo2loK4.js} +0 -0
- /package/dist/web/assets/{scheme-BItQTe08.js → scheme-N2eo7rjB.js} +0 -0
- /package/dist/web/assets/{scss-BOv51BJ5.js → scss-vjjSCTgN.js} +0 -0
- /package/dist/web/assets/{shell-BsRYRTNN.js → shell-Bfb9Yq6w.js} +0 -0
- /package/dist/web/assets/{solidity-BtuLgGDx.js → solidity-C9RbukzG.js} +0 -0
- /package/dist/web/assets/{sophia-B0Vkc5MF.js → sophia-DWV_MWOg.js} +0 -0
- /package/dist/web/assets/{sparql-B7lvkZQM.js → sparql-iMXILWhh.js} +0 -0
- /package/dist/web/assets/{sql-DvP5MpA3.js → sql-CJDj31JM.js} +0 -0
- /package/dist/web/assets/{st-GVUeyB3U.js → st-BG9AQ1OO.js} +0 -0
- /package/dist/web/assets/{swift-DSPIoCjm.js → swift-B579DvHm.js} +0 -0
- /package/dist/web/assets/{systemverilog-Icj2-k23.js → systemverilog-BNgaF3ZX.js} +0 -0
- /package/dist/web/assets/{tcl-Cd8KQcm-.js → tcl-grdtJiUA.js} +0 -0
- /package/dist/web/assets/{twig-CBHmt8z3.js → twig-JAsFXBZw.js} +0 -0
- /package/dist/web/assets/{typespec-Ckc037mq.js → typespec-D3hIQXEU.js} +0 -0
- /package/dist/web/assets/{vb-B97GW9Wb.js → vb-H38jRcEz.js} +0 -0
- /package/dist/web/assets/{wgsl-DIKmb3YH.js → wgsl-BC5Grc5r.js} +0 -0
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npm install -g aiex-cli
|
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
aiex web # configure schemas
|
|
24
|
+
aiex web # configure schemas, AI settings, and run extractions in the browser
|
|
25
25
|
aiex schema # generate SQLite from JSON Schema files
|
|
26
26
|
aiex extract -s invoice -f invoice.pdf # extract data with AI and insert into database
|
|
27
27
|
```
|
|
@@ -32,9 +32,11 @@ aiex extract -s invoice -f invoice.pdf # extract data with AI and insert into d
|
|
|
32
32
|
|
|
33
33
|
- **JSON Schema → SQLite** — Define tables as JSON Schema files, generate Drizzle ORM schema, and migrate to SQLite
|
|
34
34
|
- **Visual Editor** — Browser-based UI for designing schemas without writing JSON by hand
|
|
35
|
+
- **Web Extraction Workbench** — Run text/file extraction in the browser, review audit history, inspect details, retry failed runs, and delete history records
|
|
35
36
|
- **AI Extraction** — Extract structured data from text, images, and PDFs using any OpenAI-compatible provider (OpenAI, Anthropic, Ollama, DeepSeek, local models, etc.)
|
|
36
37
|
- **Interactive Mode** — Run `aiex extract` without arguments for a guided extraction workflow
|
|
37
38
|
- **Batch Mode** — `aiex extract -d <dir>` processes entire directories with optional glob filtering
|
|
39
|
+
- **Extraction Audit Trail** — Every CLI/Web extraction is recorded with status, input source, output path, token usage, database inserts, and errors
|
|
38
40
|
- **Built-in Model Registry** — Knows capabilities of 2000+ models (vision, structured output) so you don't have to guess
|
|
39
41
|
|
|
40
42
|
<br>
|
|
@@ -47,7 +49,7 @@ aiex extract -s invoice -f invoice.pdf # extract data with AI and insert into d
|
|
|
47
49
|
aiex web
|
|
48
50
|
```
|
|
49
51
|
|
|
50
|
-
Opens a browser UI where you can visually design and manage your schemas, configure AI settings, preview extraction prompts, and apply changes to the database.
|
|
52
|
+
Opens a browser UI where you can visually design and manage your schemas, configure AI settings, run text/file extraction, inspect extraction history, retry failed runs, preview extraction prompts, browse inserted data, and apply changes to the database.
|
|
51
53
|
|
|
52
54
|
### 2. Generate Database
|
|
53
55
|
|
|
@@ -64,8 +66,13 @@ aiex extract # interactive mode (prompts for schema
|
|
|
64
66
|
aiex extract -s <schema> -f <file> # from file (txt, pdf, png, jpg, ...)
|
|
65
67
|
aiex extract -s <schema> -t <text> # from text
|
|
66
68
|
aiex extract -s <schema> -f <file> -m <model> # specify AI model (overrides auto-selection)
|
|
69
|
+
aiex extract -s <schema> -f <file> --no-insert # extract and save JSON without inserting into SQLite
|
|
67
70
|
aiex extract -s <schema> -d <directory> # batch extract all supported files in a directory
|
|
68
71
|
aiex extract -s <schema> -d <dir> -g "*.pdf" # batch with glob filter
|
|
72
|
+
aiex extract history # list extraction audit records
|
|
73
|
+
aiex extract show <audit-id> # show full audit record JSON
|
|
74
|
+
aiex extract retry <audit-id> # retry a previous extraction
|
|
75
|
+
aiex extract rm <audit-id> # delete an audit record and cached upload
|
|
69
76
|
```
|
|
70
77
|
|
|
71
78
|
The AI reads your document and outputs structured JSON matching your schema.
|
|
@@ -74,13 +81,17 @@ The AI reads your document and outputs structured JSON matching your schema.
|
|
|
74
81
|
```bash
|
|
75
82
|
aiex extract # interactive mode
|
|
76
83
|
aiex extract -s paper -f research.pdf # save result to .aiex/extracted/ and insert into database
|
|
84
|
+
aiex extract -s paper -f research.pdf --no-insert # save result only, skip database insert
|
|
77
85
|
aiex extract -s paper -f research.pdf -m gpt-4o # use a specific model
|
|
78
86
|
aiex extract -s paper -d ./papers -g "*.pdf" # batch extract PDFs from a directory
|
|
87
|
+
aiex extract history # inspect recent extraction runs
|
|
79
88
|
```
|
|
80
89
|
Saves the extracted result to `.aiex/extracted/<schema-name>-<timestamp>.json` with fields like `title`, `firstAuthor`, `journal`, `year` — exactly as defined in your schema. Data is automatically inserted into the SQLite database.
|
|
81
90
|
|
|
82
91
|
By default, aiex automatically selects a model based on your input type (vision-capable for images, structured output for text). Use `--model` / `-m` to override and specify any model from your AI configuration.
|
|
83
92
|
|
|
93
|
+
Every extraction is also recorded under `.aiex/extracted/_audit/`. Audit records include the run status (`running`, `succeeded`, `failed`, or `stale`), schema name, input source, output file, token usage, inserted table rows, retry lineage, and error message. Uploaded files used by Web extraction are cached under `.aiex/uploads/` so failed or historical file extractions can be retried. Deleting an audit record removes its cached upload, but keeps extracted JSON result files to avoid accidental data loss.
|
|
94
|
+
|
|
84
95
|
<br>
|
|
85
96
|
|
|
86
97
|
## 📖 Commands
|
|
@@ -93,8 +104,14 @@ By default, aiex automatically selects a model based on your input type (vision-
|
|
|
93
104
|
| `aiex extract` | Interactive mode — prompts for schema and input source |
|
|
94
105
|
| `aiex extract -s <name> -f <file>` | Extract structured data from documents and insert into SQLite database |
|
|
95
106
|
| `aiex extract -s <name> -f <file> -m <model>` | Extract with a specific AI model |
|
|
107
|
+
| `aiex extract -s <name> -f <file> --no-insert` | Extract and save JSON without inserting into SQLite |
|
|
96
108
|
| `aiex extract -s <name> -d <dir>` | Batch extract all supported files in a directory |
|
|
97
109
|
| `aiex extract -s <name> -d <dir> -g "*.pdf"` | Batch extract with glob filter |
|
|
110
|
+
| `aiex extract history` | List extraction audit records |
|
|
111
|
+
| `aiex extract show <audit-id>` | Show a full extraction audit record |
|
|
112
|
+
| `aiex extract retry <audit-id>` | Retry a previous extraction run |
|
|
113
|
+
| `aiex extract retry <audit-id> --no-insert` | Retry without inserting into SQLite |
|
|
114
|
+
| `aiex extract rm <audit-id>` | Delete an audit record and its cached upload |
|
|
98
115
|
| `aiex doctor` | System and configuration diagnostics |
|
|
99
116
|
| `aiex completion bash\|zsh\|fish` | Generate shell completion scripts |
|
|
100
117
|
|