aiex-cli 0.0.1-beta.3 → 0.0.1-beta.30
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 +58 -26
- package/dist/cli.mjs +7301 -2816
- package/dist/completions-C3rmTwXZ.mjs +90 -0
- package/dist/core/schema-sqlite/migrate-helper.mjs +49 -42
- package/dist/{doctor-BhNd6jt6.mjs → doctor-collector-DhiJrVw5.mjs} +280 -219
- package/dist/index.d.mts +15 -15
- package/dist/index.mjs +1 -1
- package/dist/table-schema.json +4 -0
- package/dist/web/assets/AISettings-BjXxD5Ts.js +339 -0
- package/dist/web/assets/DataBrowser-CwcTG80-.js +6 -0
- package/dist/web/assets/DataBrowser-DZT0kGQE.css +1 -0
- package/dist/web/assets/ExtractionViewer-CsdK1kKK.js +1 -0
- package/dist/web/assets/JsonSchemaEditor-BhY9BNOn.js +570 -0
- package/dist/web/assets/api-client-D2Y_-4JM.js +1 -0
- package/dist/web/assets/button-Cdgr9Igy.js +927 -0
- package/dist/web/assets/chunk-DtRyYLXJ.js +1 -0
- package/dist/web/assets/{cssMode-BloHqzZF.js → cssMode-CPThwItX.js} +1 -1
- package/dist/web/assets/dialog-CUkPLPNP.js +109 -0
- package/dist/web/assets/dist-9yHVMqQ0.js +1 -0
- package/dist/web/assets/{editor.api-BG499EJF.js → editor.api-C8BHpRhn.js} +1 -1
- package/dist/web/assets/{editor.main-BhEWG0_P.js → editor.main-BnOkwRFv.js} +2 -2
- package/dist/web/assets/{freemarker2-DOHaFATh.js → freemarker2-DWDTYVJR.js} +1 -1
- package/dist/web/assets/{handlebars-BIFWety9.js → handlebars-D4DzjGQ7.js} +1 -1
- package/dist/web/assets/{html-YGaqGZNd.js → html-DnzhKSoD.js} +1 -1
- package/dist/web/assets/{htmlMode-Bu3PyHjq.js → htmlMode-CR7UKfEH.js} +1 -1
- package/dist/web/assets/iconfont.1776926463538-BllfKX1O.ttf +0 -0
- package/dist/web/assets/iconfont.1776926463538-D9epzWxu.woff +0 -0
- package/dist/web/assets/index-C9N8oWt4.css +2 -0
- package/dist/web/assets/index-DCAKotsV.js +882 -0
- package/dist/web/assets/{javascript-N0gZqDK0.js → javascript-D2srszZ8.js} +1 -1
- package/dist/web/assets/{jsonMode-z5YscjcG.js → jsonMode-B4jaPYEr.js} +1 -1
- package/dist/web/assets/{liquid-BHfNNVLs.js → liquid-CIT2Wl_l.js} +1 -1
- package/dist/web/assets/{mdx-Dqu2t0et.js → mdx-CWLaEOFy.js} +1 -1
- package/dist/web/assets/{monaco.contribution-ByQ3yI-W.js → monaco.contribution-DDv5ldfS.js} +2 -2
- package/dist/web/assets/object-utils-DPPzLQjH.js +1 -0
- package/dist/web/assets/{python-icfse9Ji.js → python-6CGfpCNq.js} +1 -1
- package/dist/web/assets/{razor-DwVkryG9.js → razor-DEMMh3TD.js} +1 -1
- package/dist/web/assets/runtime-dom.esm-bundler-ei_N7Xjw.js +1 -0
- package/dist/web/assets/select-BGex2SPs.js +439 -0
- package/dist/web/assets/{tsMode-CLrI3bdf.js → tsMode-Cm1NtjPs.js} +1 -1
- package/dist/web/assets/{typescript-BzuZVF7m.js → typescript-BM9aPEFg.js} +1 -1
- package/dist/web/assets/{xml-Cr85kdqA.js → xml-CoSbvcg5.js} +1 -1
- package/dist/web/assets/{yaml-D3RbJnnO.js → yaml-56GOgy8k.js} +1 -1
- package/dist/web/index.html +10 -4
- package/package.json +19 -2
- package/src/core/schema-sqlite/migrate-helper.ts +41 -50
- package/src/core/schema-sqlite/migration-name.ts +14 -0
- package/dist/web/assets/chunk-BEqpzyXh.js +0 -1
- package/dist/web/assets/index-Bi376XVf.css +0 -2
- package/dist/web/assets/index-c6KB-9C-.js +0 -3262
- /package/dist/web/assets/{abap-Cry0R76c.js → abap-Bgec7Keq.js} +0 -0
- /package/dist/web/assets/{apex-xqbJ58nJ.js → apex-VBlPwEoQ.js} +0 -0
- /package/dist/web/assets/{azcli-D7JTNGKs.js → azcli-DKqrEFBx.js} +0 -0
- /package/dist/web/assets/{bat-Cuq6hn0K.js → bat-DdgQWy_0.js} +0 -0
- /package/dist/web/assets/{bicep-eTuQjz9F.js → bicep-CRMM43EB.js} +0 -0
- /package/dist/web/assets/{cameligo-DKgCRl36.js → cameligo-UatALtML.js} +0 -0
- /package/dist/web/assets/{clojure-B_aTBtVh.js → clojure-D8JU08RA.js} +0 -0
- /package/dist/web/assets/{coffee-BWAYpIPu.js → coffee-C56wu358.js} +0 -0
- /package/dist/web/assets/{cpp-BduBQE8d.js → cpp-CyZLvhJG.js} +0 -0
- /package/dist/web/assets/{csharp-CMqOVYKK.js → csharp-BJl3ixva.js} +0 -0
- /package/dist/web/assets/{csp-6cGliXw2.js → csp-CxEKxmO-.js} +0 -0
- /package/dist/web/assets/{css-CHnKqS9Q.js → css-B0t_muXd.js} +0 -0
- /package/dist/web/assets/{cypher-DMzZBj2L.js → cypher-D1hqiMFD.js} +0 -0
- /package/dist/web/assets/{dart-7hYfJ1Dv.js → dart-Bz550Pyv.js} +0 -0
- /package/dist/web/assets/{dockerfile-BflvjnJW.js → dockerfile-CIXgVAuA.js} +0 -0
- /package/dist/web/assets/{ecl-BEt6xb2p.js → ecl-D9qbvZoA.js} +0 -0
- /package/dist/web/assets/{elixir-CnrQCt6o.js → elixir-b2M38fAy.js} +0 -0
- /package/dist/web/assets/{flow9-CfLCoUuB.js → flow9-Dq1UYMkt.js} +0 -0
- /package/dist/web/assets/{fsharp-BQqR9uQ6.js → fsharp-BaeLhgfq.js} +0 -0
- /package/dist/web/assets/{go-C3AlMVwy.js → go-Bd-NFKIC.js} +0 -0
- /package/dist/web/assets/{graphql-O_-hDldf.js → graphql-DZVerJfy.js} +0 -0
- /package/dist/web/assets/{hcl-BQQD6Mtj.js → hcl-CAVzrZfH.js} +0 -0
- /package/dist/web/assets/{ini-Bf0RDfP_.js → ini-CyXdX58t.js} +0 -0
- /package/dist/web/assets/{java-nqX2KEDD.js → java-B5pNgvhy.js} +0 -0
- /package/dist/web/assets/{julia-B6P9U5er.js → julia-XRhmV3AN.js} +0 -0
- /package/dist/web/assets/{kotlin-B-LRk09-.js → kotlin-DOd3J5vr.js} +0 -0
- /package/dist/web/assets/{less-CEaIdW1f.js → less-veZSnyw6.js} +0 -0
- /package/dist/web/assets/{lexon-Qv4pvFSW.js → lexon-QWGkuK0H.js} +0 -0
- /package/dist/web/assets/{lua-CFpyR7YN.js → lua-CYGpjuO5.js} +0 -0
- /package/dist/web/assets/{m3-CvKhVPQn.js → m3-yNnrZkdc.js} +0 -0
- /package/dist/web/assets/{markdown-qldG3Vc4.js → markdown-BCSWEPSX.js} +0 -0
- /package/dist/web/assets/{mips-0D8PRyHq.js → mips-OpYmcC30.js} +0 -0
- /package/dist/web/assets/{msdax-DwZXSC5M.js → msdax-2oxoTO9Z.js} +0 -0
- /package/dist/web/assets/{mysql-BWq85KY4.js → mysql-5KlC-K_9.js} +0 -0
- /package/dist/web/assets/{objective-c-D653JUMG.js → objective-c-CcDCgtLx.js} +0 -0
- /package/dist/web/assets/{pascal-rWjRDdnR.js → pascal-BZGsbaEV.js} +0 -0
- /package/dist/web/assets/{pascaligo-Db8EehaF.js → pascaligo-DtD5qU3G.js} +0 -0
- /package/dist/web/assets/{perl-C68oq8-D.js → perl-C1jNNS3E.js} +0 -0
- /package/dist/web/assets/{pgsql-BXeHe33s.js → pgsql-CT0fhiZa.js} +0 -0
- /package/dist/web/assets/{php-CDVsAbfl.js → php-D6DrXoPM.js} +0 -0
- /package/dist/web/assets/{pla-DnryFT0q.js → pla-b3-HN2pF.js} +0 -0
- /package/dist/web/assets/{postiats-CDg_4Ev-.js → postiats-Bin2ApVS.js} +0 -0
- /package/dist/web/assets/{powerquery-CWPi8ROz.js → powerquery-7ASnn-ZG.js} +0 -0
- /package/dist/web/assets/{powershell-C5A0QX3-.js → powershell-t4p7sU1H.js} +0 -0
- /package/dist/web/assets/{preload-helper-DSXbuxSR.js → preload-helper-Dd-HcVz_.js} +0 -0
- /package/dist/web/assets/{protobuf-Cgt-BQbL.js → protobuf-BUGeWa_j.js} +0 -0
- /package/dist/web/assets/{pug-RPYJC9QB.js → pug-BuKcgC9s.js} +0 -0
- /package/dist/web/assets/{qsharp-BZ3S7fu_.js → qsharp-DxLLX8mo.js} +0 -0
- /package/dist/web/assets/{r-CN875f1X.js → r-DMlFgn7A.js} +0 -0
- /package/dist/web/assets/{redis-BLesvTwR.js → redis-cXItkC5u.js} +0 -0
- /package/dist/web/assets/{redshift-Byf_0XqD.js → redshift-BZVbW7HE.js} +0 -0
- /package/dist/web/assets/{restructuredtext-DYg_6BiZ.js → restructuredtext-BzjxwS8h.js} +0 -0
- /package/dist/web/assets/{ruby-C4OkxbC-.js → ruby-C5nyLV4l.js} +0 -0
- /package/dist/web/assets/{rust-xAoaEFMh.js → rust-BcmMsHdf.js} +0 -0
- /package/dist/web/assets/{sb-C8dHOW_y.js → sb-Dnb1iy6B.js} +0 -0
- /package/dist/web/assets/{scala-Spx0wP1o.js → scala-anMIFYpA.js} +0 -0
- /package/dist/web/assets/{scheme-D2mZlAUz.js → scheme-BItQTe08.js} +0 -0
- /package/dist/web/assets/{scss-DDCn3Ylu.js → scss-BOv51BJ5.js} +0 -0
- /package/dist/web/assets/{shell-M6px0EWn.js → shell-BsRYRTNN.js} +0 -0
- /package/dist/web/assets/{solidity-DUWMJi-f.js → solidity-BtuLgGDx.js} +0 -0
- /package/dist/web/assets/{sophia-DwJbUG-2.js → sophia-B0Vkc5MF.js} +0 -0
- /package/dist/web/assets/{sparql-ClQxbRPI.js → sparql-B7lvkZQM.js} +0 -0
- /package/dist/web/assets/{sql-BQdjW7Vy.js → sql-DvP5MpA3.js} +0 -0
- /package/dist/web/assets/{st-BpISyZ_v.js → st-GVUeyB3U.js} +0 -0
- /package/dist/web/assets/{swift-CMbl5gM4.js → swift-DSPIoCjm.js} +0 -0
- /package/dist/web/assets/{systemverilog-jx2Xs7uO.js → systemverilog-Icj2-k23.js} +0 -0
- /package/dist/web/assets/{tcl-GIGnfs89.js → tcl-Cd8KQcm-.js} +0 -0
- /package/dist/web/assets/{twig-Bc0mxc_m.js → twig-CBHmt8z3.js} +0 -0
- /package/dist/web/assets/{typespec-CEioAsEm.js → typespec-Ckc037mq.js} +0 -0
- /package/dist/web/assets/{vb-BPk67J-d.js → vb-B97GW9Wb.js} +0 -0
- /package/dist/web/assets/{wgsl-DOnyt8_J.js → wgsl-DIKmb3YH.js} +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="https://www.npmjs.com/package/aiex-cli"><img src="https://img.shields.io/npm/v/aiex?style=flat&colorA=18181B&colorB=green" alt="npm version"></a>
|
|
3
|
-
<a href="https://www.npmjs.com/package/aiex-cli"><img src="https://img.shields.io/npm/dm/aiex?style=flat&colorA=18181B&colorB=green" alt="npm downloads"></a>
|
|
2
|
+
<a href="https://www.npmjs.com/package/aiex-cli"><img src="https://img.shields.io/npm/v/aiex-cli?style=flat&colorA=18181B&colorB=green" alt="npm version"></a>
|
|
3
|
+
<a href="https://www.npmjs.com/package/aiex-cli"><img src="https://img.shields.io/npm/dm/aiex-cli?style=flat&colorA=18181B&colorB=green" alt="npm downloads"></a>
|
|
4
4
|
<a href="https://github.com/OSpoon/aiex-cli/blob/main/LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-green?style=flat&colorA=18181B&colorB=green" alt="license"></a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
@@ -21,10 +21,9 @@ npm install -g aiex-cli
|
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
aiex
|
|
24
|
+
aiex web # configure schemas and AI settings in the browser
|
|
25
25
|
aiex schema # generate SQLite from JSON Schema files
|
|
26
|
-
aiex extract -s invoice -f invoice.pdf # extract data with AI
|
|
27
|
-
aiex extract -s invoice -f invoice.pdf --db # extract and insert into database
|
|
26
|
+
aiex extract -s invoice -f invoice.pdf # extract data with AI and insert into database
|
|
28
27
|
```
|
|
29
28
|
|
|
30
29
|
<br>
|
|
@@ -34,23 +33,15 @@ aiex extract -s invoice -f invoice.pdf --db # extract and insert into database
|
|
|
34
33
|
- **JSON Schema → SQLite** — Define tables as JSON Schema files, generate Drizzle ORM schema, and migrate to SQLite
|
|
35
34
|
- **Visual Editor** — Browser-based UI for designing schemas without writing JSON by hand
|
|
36
35
|
- **AI Extraction** — Extract structured data from text, images, and PDFs using any OpenAI-compatible provider (OpenAI, Anthropic, Ollama, DeepSeek, local models, etc.)
|
|
36
|
+
- **Interactive Mode** — Run `aiex extract` without arguments for a guided extraction workflow
|
|
37
|
+
- **Batch Mode** — `aiex extract -d <dir>` processes entire directories with optional glob filtering
|
|
37
38
|
- **Built-in Model Registry** — Knows capabilities of 2000+ models (vision, structured output) so you don't have to guess
|
|
38
39
|
|
|
39
40
|
<br>
|
|
40
41
|
|
|
41
42
|
## 🚀 Getting Started
|
|
42
43
|
|
|
43
|
-
### 1.
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
aiex schema --init
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Creates a `.aiex/` directory with example schemas to get you started.
|
|
50
|
-
|
|
51
|
-
Add your own JSON Schema files to `.aiex/schema/` (one file per table), then run `aiex schema` to migrate them into the database.
|
|
52
|
-
|
|
53
|
-
### 2. Visual Editor
|
|
44
|
+
### 1. Configure In Web UI
|
|
54
45
|
|
|
55
46
|
```bash
|
|
56
47
|
aiex web
|
|
@@ -58,7 +49,7 @@ aiex web
|
|
|
58
49
|
|
|
59
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.
|
|
60
51
|
|
|
61
|
-
###
|
|
52
|
+
### 2. Generate Database
|
|
62
53
|
|
|
63
54
|
```bash
|
|
64
55
|
aiex schema
|
|
@@ -66,21 +57,29 @@ aiex schema
|
|
|
66
57
|
|
|
67
58
|
Converts your JSON Schema files into a SQLite database with full migration support.
|
|
68
59
|
|
|
69
|
-
###
|
|
60
|
+
### 3. Extract Data
|
|
70
61
|
|
|
71
62
|
```bash
|
|
72
|
-
aiex extract
|
|
73
|
-
aiex extract -s <schema> -
|
|
63
|
+
aiex extract # interactive mode (prompts for schema & input)
|
|
64
|
+
aiex extract -s <schema> -f <file> # from file (txt, pdf, png, jpg, ...)
|
|
65
|
+
aiex extract -s <schema> -t <text> # from text
|
|
66
|
+
aiex extract -s <schema> -f <file> -m <model> # specify AI model (overrides auto-selection)
|
|
67
|
+
aiex extract -s <schema> -d <directory> # batch extract all supported files in a directory
|
|
68
|
+
aiex extract -s <schema> -d <dir> -g "*.pdf" # batch with glob filter
|
|
74
69
|
```
|
|
75
70
|
|
|
76
71
|
The AI reads your document and outputs structured JSON matching your schema.
|
|
77
72
|
|
|
78
73
|
**Examples:**
|
|
79
74
|
```bash
|
|
80
|
-
aiex extract
|
|
81
|
-
aiex extract -s paper -f research.pdf
|
|
75
|
+
aiex extract # interactive mode
|
|
76
|
+
aiex extract -s paper -f research.pdf # save result to .aiex/extracted/ and insert into database
|
|
77
|
+
aiex extract -s paper -f research.pdf -m gpt-4o # use a specific model
|
|
78
|
+
aiex extract -s paper -d ./papers -g "*.pdf" # batch extract PDFs from a directory
|
|
82
79
|
```
|
|
83
|
-
Saves the extracted result to `.aiex/extracted/<schema-name>-<timestamp>.json` with fields like `title`, `firstAuthor`, `journal`, `year` — exactly as defined in your schema.
|
|
80
|
+
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
|
+
|
|
82
|
+
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.
|
|
84
83
|
|
|
85
84
|
<br>
|
|
86
85
|
|
|
@@ -88,13 +87,35 @@ Saves the extracted result to `.aiex/extracted/<schema-name>-<timestamp>.json` w
|
|
|
88
87
|
|
|
89
88
|
| Command | Description |
|
|
90
89
|
| --- | --- |
|
|
91
|
-
| `aiex schema --init` | Scaffold `.aiex/` directory with example schemas |
|
|
92
90
|
| `aiex schema` | Parse JSON Schema files and migrate to SQLite |
|
|
93
91
|
| `aiex schema --generate` | Generate Drizzle schema code only (skip migration) |
|
|
94
92
|
| `aiex web` | Launch visual schema editor in browser |
|
|
95
|
-
| `aiex extract
|
|
96
|
-
| `aiex extract -s <name> -f <file
|
|
93
|
+
| `aiex extract` | Interactive mode — prompts for schema and input source |
|
|
94
|
+
| `aiex extract -s <name> -f <file>` | Extract structured data from documents and insert into SQLite database |
|
|
95
|
+
| `aiex extract -s <name> -f <file> -m <model>` | Extract with a specific AI model |
|
|
96
|
+
| `aiex extract -s <name> -d <dir>` | Batch extract all supported files in a directory |
|
|
97
|
+
| `aiex extract -s <name> -d <dir> -g "*.pdf"` | Batch extract with glob filter |
|
|
97
98
|
| `aiex doctor` | System and configuration diagnostics |
|
|
99
|
+
| `aiex completion bash\|zsh\|fish` | Generate shell completion scripts |
|
|
100
|
+
|
|
101
|
+
### Shell Completions
|
|
102
|
+
|
|
103
|
+
Enable tab completion for commands and options:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# bash
|
|
107
|
+
source <(aiex completion bash)
|
|
108
|
+
|
|
109
|
+
# zsh
|
|
110
|
+
source <(aiex completion zsh)
|
|
111
|
+
|
|
112
|
+
# fish
|
|
113
|
+
aiex completion fish | source
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
To make it permanent, add the `source` line to your shell config file (`~/.bashrc`, `~/.zshrc`, or `~/.config/fish/config.fish`).
|
|
117
|
+
|
|
118
|
+
> Completions are dynamically generated from the command definitions — no manual updates needed when commands or options change.
|
|
98
119
|
|
|
99
120
|
<br>
|
|
100
121
|
|
|
@@ -108,6 +129,17 @@ aiex works with any OpenAI-compatible API provider. Configure in the Web UI (AI
|
|
|
108
129
|
|
|
109
130
|
The built-in model registry automatically suggests capabilities for 2000+ models from providers including OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek, Alibaba Cloud, and more.
|
|
110
131
|
|
|
132
|
+
### Langfuse Tracing
|
|
133
|
+
|
|
134
|
+
aiex can send AI model interaction traces to [Langfuse](https://langfuse.com) for monitoring and debugging.
|
|
135
|
+
|
|
136
|
+
- **Enable** — In Web UI → AI Settings → Langfuse Tracing, toggle on and enter your Langfuse Secret Key / Public Key
|
|
137
|
+
- **Self-hosted** — Optionally set a custom Host URL; defaults to `https://us.cloud.langfuse.com`
|
|
138
|
+
- **No impact when disabled** — No tracing is sent if keys are left empty
|
|
139
|
+
- **Non-blocking** — Misconfigured keys will not affect extraction
|
|
140
|
+
|
|
141
|
+
Once enabled, every `aiex extract` call is automatically traced with full request/response payloads, token usage, and latency.
|
|
142
|
+
|
|
111
143
|
<br>
|
|
112
144
|
|
|
113
145
|
## 🙏 Acknowledgments
|