aiex-cli 0.0.1-beta.1 → 0.0.1-beta.11
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 +52 -11
- package/dist/cli.mjs +6847 -2390
- package/dist/completions-ygS1okck.mjs +90 -0
- package/dist/core/schema-sqlite/migrate-helper.mjs +14 -5
- package/dist/{doctor-Dk4QYsbc.mjs → doctor-B51gjYND.mjs} +21 -7
- package/dist/index.mjs +1 -1
- package/dist/web/assets/AISettings-CWJri3cS.js +334 -0
- package/dist/web/assets/DataBrowser-DZT0kGQE.css +1 -0
- package/dist/web/assets/DataBrowser-rznfVRaV.js +3 -0
- package/dist/web/assets/JsonSchemaEditor-C9iyQs7N.js +929 -0
- package/dist/web/assets/api-client-Dsg4WOM9.js +1 -0
- package/dist/web/assets/button-kTMweGMc.js +927 -0
- package/dist/web/assets/chunk-DtRyYLXJ.js +1 -0
- package/dist/web/assets/{cssMode-BloHqzZF.js → cssMode-DAbG0CMn.js} +1 -1
- package/dist/web/assets/dialog-CWuu7WjI.js +108 -0
- package/dist/web/assets/{editor.api-BG499EJF.js → editor.api-DLXGyrN1.js} +1 -1
- package/dist/web/assets/{editor.main-BhEWG0_P.js → editor.main-BqhfoHxy.js} +2 -2
- package/dist/web/assets/{freemarker2-DOHaFATh.js → freemarker2-B9_5ct2b.js} +1 -1
- package/dist/web/assets/{handlebars-BIFWety9.js → handlebars-TY59WcoQ.js} +1 -1
- package/dist/web/assets/{html-YGaqGZNd.js → html-CLULsh27.js} +1 -1
- package/dist/web/assets/{htmlMode-Bu3PyHjq.js → htmlMode-BvG7RNbU.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-CeKUL9zn.js +882 -0
- package/dist/web/assets/index-DjT-OGwD.css +2 -0
- package/dist/web/assets/{javascript-N0gZqDK0.js → javascript-DHrLp6gu.js} +1 -1
- package/dist/web/assets/{jsonMode-z5YscjcG.js → jsonMode-DBDhdzl1.js} +1 -1
- package/dist/web/assets/lib-C30cIFrm.js +1 -0
- package/dist/web/assets/{liquid-BHfNNVLs.js → liquid-tGeb-nqF.js} +1 -1
- package/dist/web/assets/{mdx-Dqu2t0et.js → mdx-Cmdz78VU.js} +1 -1
- package/dist/web/assets/{monaco.contribution-ByQ3yI-W.js → monaco.contribution-CroYPUF5.js} +2 -2
- package/dist/web/assets/overlayeventbus-AtOpmI6n.js +80 -0
- package/dist/web/assets/{python-icfse9Ji.js → python-Dmfz4iDE.js} +1 -1
- package/dist/web/assets/{razor-DwVkryG9.js → razor-BJicZHJs.js} +1 -1
- package/dist/web/assets/table-schema-mJrrf9qw.js +2 -0
- package/dist/web/assets/{tsMode-CLrI3bdf.js → tsMode-DYqTyE66.js} +1 -1
- package/dist/web/assets/{typescript-BzuZVF7m.js → typescript-DLnTe9Hf.js} +1 -1
- package/dist/web/assets/{xml-Cr85kdqA.js → xml-BIYqLORk.js} +1 -1
- package/dist/web/assets/{yaml-D3RbJnnO.js → yaml-BjmulkMX.js} +1 -1
- package/dist/web/index.html +10 -5
- package/dist/web/logo.png +0 -0
- package/package.json +8 -2
- package/src/core/schema-sqlite/migrate-helper.ts +9 -4
- 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-DrZwwXZX.js} +0 -0
- /package/dist/web/assets/{apex-xqbJ58nJ.js → apex-CrCz0btt.js} +0 -0
- /package/dist/web/assets/{azcli-D7JTNGKs.js → azcli-BapzKHay.js} +0 -0
- /package/dist/web/assets/{bat-Cuq6hn0K.js → bat-C_NRAiA1.js} +0 -0
- /package/dist/web/assets/{bicep-eTuQjz9F.js → bicep-C7pp2CNk.js} +0 -0
- /package/dist/web/assets/{cameligo-DKgCRl36.js → cameligo-BhhK9vxZ.js} +0 -0
- /package/dist/web/assets/{clojure-B_aTBtVh.js → clojure-D0ujmUyE.js} +0 -0
- /package/dist/web/assets/{coffee-BWAYpIPu.js → coffee-DHEl7Jbb.js} +0 -0
- /package/dist/web/assets/{cpp-BduBQE8d.js → cpp-Iil-3nzZ.js} +0 -0
- /package/dist/web/assets/{csharp-CMqOVYKK.js → csharp-Dh0Ee7SY.js} +0 -0
- /package/dist/web/assets/{csp-6cGliXw2.js → csp-mwzjw0JL.js} +0 -0
- /package/dist/web/assets/{css-CHnKqS9Q.js → css-COIa8ZTR.js} +0 -0
- /package/dist/web/assets/{cypher-DMzZBj2L.js → cypher-GVc17FC4.js} +0 -0
- /package/dist/web/assets/{dart-7hYfJ1Dv.js → dart-phiCaE7_.js} +0 -0
- /package/dist/web/assets/{dockerfile-BflvjnJW.js → dockerfile-BMaDhdim.js} +0 -0
- /package/dist/web/assets/{ecl-BEt6xb2p.js → ecl-Cj47kvqp.js} +0 -0
- /package/dist/web/assets/{elixir-CnrQCt6o.js → elixir-DBbstcE1.js} +0 -0
- /package/dist/web/assets/{flow9-CfLCoUuB.js → flow9-ChHb1adO.js} +0 -0
- /package/dist/web/assets/{fsharp-BQqR9uQ6.js → fsharp-CMk2OIJN.js} +0 -0
- /package/dist/web/assets/{go-C3AlMVwy.js → go-BrMkuJg0.js} +0 -0
- /package/dist/web/assets/{graphql-O_-hDldf.js → graphql-PSR1UKGv.js} +0 -0
- /package/dist/web/assets/{hcl-BQQD6Mtj.js → hcl-DAQrbDOW.js} +0 -0
- /package/dist/web/assets/{ini-Bf0RDfP_.js → ini-0TG5BxW0.js} +0 -0
- /package/dist/web/assets/{java-nqX2KEDD.js → java-rgorz17v.js} +0 -0
- /package/dist/web/assets/{julia-B6P9U5er.js → julia-C8VMdHm8.js} +0 -0
- /package/dist/web/assets/{kotlin-B-LRk09-.js → kotlin-CllWo3gX.js} +0 -0
- /package/dist/web/assets/{less-CEaIdW1f.js → less-Cgca25AP.js} +0 -0
- /package/dist/web/assets/{lexon-Qv4pvFSW.js → lexon-D0GHdBaw.js} +0 -0
- /package/dist/web/assets/{lua-CFpyR7YN.js → lua-DmRsNG-P.js} +0 -0
- /package/dist/web/assets/{m3-CvKhVPQn.js → m3-BgL5dNKT.js} +0 -0
- /package/dist/web/assets/{markdown-qldG3Vc4.js → markdown-BuJfycGS.js} +0 -0
- /package/dist/web/assets/{mips-0D8PRyHq.js → mips-C9m_93PR.js} +0 -0
- /package/dist/web/assets/{msdax-DwZXSC5M.js → msdax-CpFHC9OI.js} +0 -0
- /package/dist/web/assets/{mysql-BWq85KY4.js → mysql-qFvltsqN.js} +0 -0
- /package/dist/web/assets/{objective-c-D653JUMG.js → objective-c-Bnmr858J.js} +0 -0
- /package/dist/web/assets/{pascal-rWjRDdnR.js → pascal-WP0_D5AO.js} +0 -0
- /package/dist/web/assets/{pascaligo-Db8EehaF.js → pascaligo-Blom4Rij.js} +0 -0
- /package/dist/web/assets/{perl-C68oq8-D.js → perl-B-vk8g64.js} +0 -0
- /package/dist/web/assets/{pgsql-BXeHe33s.js → pgsql-Cgvz6v67.js} +0 -0
- /package/dist/web/assets/{php-CDVsAbfl.js → php-8a3Lrw9m.js} +0 -0
- /package/dist/web/assets/{pla-DnryFT0q.js → pla-DuFqEZ8V.js} +0 -0
- /package/dist/web/assets/{postiats-CDg_4Ev-.js → postiats-DkLtSgkp.js} +0 -0
- /package/dist/web/assets/{powerquery-CWPi8ROz.js → powerquery-BJ1aNepW.js} +0 -0
- /package/dist/web/assets/{powershell-C5A0QX3-.js → powershell-rE98k687.js} +0 -0
- /package/dist/web/assets/{preload-helper-DSXbuxSR.js → preload-helper-DWTEM3RW.js} +0 -0
- /package/dist/web/assets/{protobuf-Cgt-BQbL.js → protobuf-CUheFacr.js} +0 -0
- /package/dist/web/assets/{pug-RPYJC9QB.js → pug-LDcAMD8w.js} +0 -0
- /package/dist/web/assets/{qsharp-BZ3S7fu_.js → qsharp-IHfqKOfK.js} +0 -0
- /package/dist/web/assets/{r-CN875f1X.js → r-D-QApv87.js} +0 -0
- /package/dist/web/assets/{redis-BLesvTwR.js → redis-SXdDyWR9.js} +0 -0
- /package/dist/web/assets/{redshift-Byf_0XqD.js → redshift-Y6lsCryn.js} +0 -0
- /package/dist/web/assets/{restructuredtext-DYg_6BiZ.js → restructuredtext-edObr9a8.js} +0 -0
- /package/dist/web/assets/{ruby-C4OkxbC-.js → ruby-CNnUfF-8.js} +0 -0
- /package/dist/web/assets/{rust-xAoaEFMh.js → rust-IHUZWzBr.js} +0 -0
- /package/dist/web/assets/{sb-C8dHOW_y.js → sb-DrUvY44N.js} +0 -0
- /package/dist/web/assets/{scala-Spx0wP1o.js → scala-B4hbXGLM.js} +0 -0
- /package/dist/web/assets/{scheme-D2mZlAUz.js → scheme-BGrd12j3.js} +0 -0
- /package/dist/web/assets/{scss-DDCn3Ylu.js → scss-x5G1ES4U.js} +0 -0
- /package/dist/web/assets/{shell-M6px0EWn.js → shell-DOehe2Y8.js} +0 -0
- /package/dist/web/assets/{solidity-DUWMJi-f.js → solidity-BeRvcwWV.js} +0 -0
- /package/dist/web/assets/{sophia-DwJbUG-2.js → sophia-DZbkUNjy.js} +0 -0
- /package/dist/web/assets/{sparql-ClQxbRPI.js → sparql-B7_oi5-h.js} +0 -0
- /package/dist/web/assets/{sql-BQdjW7Vy.js → sql-CTlsFWVE.js} +0 -0
- /package/dist/web/assets/{st-BpISyZ_v.js → st-DJVEJdPE.js} +0 -0
- /package/dist/web/assets/{swift-CMbl5gM4.js → swift-CwhT3fYa.js} +0 -0
- /package/dist/web/assets/{systemverilog-jx2Xs7uO.js → systemverilog-BQN63pkN.js} +0 -0
- /package/dist/web/assets/{tcl-GIGnfs89.js → tcl-DqwfpskA.js} +0 -0
- /package/dist/web/assets/{twig-Bc0mxc_m.js → twig-BiyenUgc.js} +0 -0
- /package/dist/web/assets/{typespec-CEioAsEm.js → typespec-CWOJribt.js} +0 -0
- /package/dist/web/assets/{vb-BPk67J-d.js → vb-Cq5F87m3.js} +0 -0
- /package/dist/web/assets/{wgsl-DOnyt8_J.js → wgsl-BAvW2lVr.js} +0 -0
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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
|
|
|
7
|
-
<h1 align="center">
|
|
7
|
+
<h1 align="center">AIEX</h1>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<b>JSON Schema → SQLite — with AI-powered data extraction</b>
|
|
@@ -23,7 +23,8 @@ npm install -g aiex-cli
|
|
|
23
23
|
```bash
|
|
24
24
|
aiex schema --init # set up .aiex/schema/ directory
|
|
25
25
|
aiex schema # generate SQLite from JSON Schema files
|
|
26
|
-
aiex extract -s invoice -f invoice.pdf
|
|
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
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
<br>
|
|
@@ -47,6 +48,8 @@ aiex schema --init
|
|
|
47
48
|
|
|
48
49
|
Creates a `.aiex/` directory with example schemas to get you started.
|
|
49
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
|
+
|
|
50
53
|
### 2. Visual Editor
|
|
51
54
|
|
|
52
55
|
```bash
|
|
@@ -66,17 +69,22 @@ Converts your JSON Schema files into a SQLite database with full migration suppo
|
|
|
66
69
|
### 4. Extract Data
|
|
67
70
|
|
|
68
71
|
```bash
|
|
69
|
-
aiex extract -s <schema> -f <file>
|
|
70
|
-
aiex extract -s <schema> -t <text>
|
|
72
|
+
aiex extract -s <schema> -f <file> # from file (txt, pdf, png, jpg, ...)
|
|
73
|
+
aiex extract -s <schema> -t <text> # from text
|
|
74
|
+
aiex extract -s <schema> -f <file> -m <model> # specify AI model (overrides auto-selection)
|
|
71
75
|
```
|
|
72
76
|
|
|
73
77
|
The AI reads your document and outputs structured JSON matching your schema.
|
|
74
78
|
|
|
75
|
-
**
|
|
79
|
+
**Examples:**
|
|
76
80
|
```bash
|
|
77
|
-
aiex extract -s paper -f research.pdf
|
|
81
|
+
aiex extract -s paper -f research.pdf # save result to .aiex/extracted/
|
|
82
|
+
aiex extract -s paper -f research.pdf --db # also insert into SQLite database
|
|
83
|
+
aiex extract -s paper -f research.pdf -m gpt-4o # use a specific model
|
|
78
84
|
```
|
|
79
|
-
|
|
85
|
+
Saves the extracted result to `.aiex/extracted/<schema-name>-<timestamp>.json` with fields like `title`, `firstAuthor`, `journal`, `year` — exactly as defined in your schema. Add `--db` to also insert the data directly into the SQLite database.
|
|
86
|
+
|
|
87
|
+
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.
|
|
80
88
|
|
|
81
89
|
<br>
|
|
82
90
|
|
|
@@ -85,11 +93,33 @@ Creates `output.json` with fields like `title`, `firstAuthor`, `journal`, `year`
|
|
|
85
93
|
| Command | Description |
|
|
86
94
|
| --- | --- |
|
|
87
95
|
| `aiex schema --init` | Scaffold `.aiex/` directory with example schemas |
|
|
88
|
-
| `aiex schema
|
|
96
|
+
| `aiex schema` | Parse JSON Schema files and migrate to SQLite |
|
|
89
97
|
| `aiex schema --generate` | Generate Drizzle schema code only (skip migration) |
|
|
90
98
|
| `aiex web` | Launch visual schema editor in browser |
|
|
91
|
-
| `aiex extract -s <name>` | Extract structured data from documents via AI |
|
|
99
|
+
| `aiex extract -s <name> -f <file>` | Extract structured data from documents via AI |
|
|
100
|
+
| `aiex extract -s <name> -f <file> --db` | Extract and insert into SQLite database |
|
|
101
|
+
| `aiex extract -s <name> -f <file> -m <model>` | Extract with a specific AI model |
|
|
92
102
|
| `aiex doctor` | System and configuration diagnostics |
|
|
103
|
+
| `aiex completion bash\|zsh\|fish` | Generate shell completion scripts |
|
|
104
|
+
|
|
105
|
+
### Shell Completions
|
|
106
|
+
|
|
107
|
+
Enable tab completion for commands and options:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# bash
|
|
111
|
+
source <(aiex completion bash)
|
|
112
|
+
|
|
113
|
+
# zsh
|
|
114
|
+
source <(aiex completion zsh)
|
|
115
|
+
|
|
116
|
+
# fish
|
|
117
|
+
aiex completion fish | source
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
To make it permanent, add the `source` line to your shell config file (`~/.bashrc`, `~/.zshrc`, or `~/.config/fish/config.fish`).
|
|
121
|
+
|
|
122
|
+
> Completions are dynamically generated from the command definitions — no manual updates needed when commands or options change.
|
|
93
123
|
|
|
94
124
|
<br>
|
|
95
125
|
|
|
@@ -103,6 +133,17 @@ aiex works with any OpenAI-compatible API provider. Configure in the Web UI (AI
|
|
|
103
133
|
|
|
104
134
|
The built-in model registry automatically suggests capabilities for 2000+ models from providers including OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek, Alibaba Cloud, and more.
|
|
105
135
|
|
|
136
|
+
### Langfuse Tracing
|
|
137
|
+
|
|
138
|
+
aiex can send AI model interaction traces to [Langfuse](https://langfuse.com) for monitoring and debugging.
|
|
139
|
+
|
|
140
|
+
- **Enabled** — In Web UI → AI Settings → Langfuse Tracing, toggle on and enter your Langfuse Public Key / Secret Key
|
|
141
|
+
- **Self-hosted** — Optionally set a custom Host URL; defaults to `https://us.cloud.langfuse.com`
|
|
142
|
+
- **No impact when disabled** — No tracing is sent if keys are left empty
|
|
143
|
+
- **Non-blocking** — Misconfigured keys will not affect extraction
|
|
144
|
+
|
|
145
|
+
Once enabled, every `aiex extract` call is automatically traced with full request/response payloads, token usage, and latency.
|
|
146
|
+
|
|
106
147
|
<br>
|
|
107
148
|
|
|
108
149
|
## 🙏 Acknowledgments
|