aiex-cli 0.0.0
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/LICENSE.md +21 -0
- package/README.md +118 -0
- package/bin/cli.mjs +2 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +9948 -0
- package/dist/core/schema-sqlite/migrate-helper.d.mts +1 -0
- package/dist/core/schema-sqlite/migrate-helper.mjs +190 -0
- package/dist/doctor-Wic10PLt.mjs +711 -0
- package/dist/index.d.mts +281 -0
- package/dist/index.mjs +3 -0
- package/dist/table-schema.json +220 -0
- package/dist/web/assets/abap-Cry0R76c.js +1 -0
- package/dist/web/assets/apex-xqbJ58nJ.js +1 -0
- package/dist/web/assets/azcli-D7JTNGKs.js +1 -0
- package/dist/web/assets/bat-Cuq6hn0K.js +1 -0
- package/dist/web/assets/bicep-eTuQjz9F.js +2 -0
- package/dist/web/assets/cameligo-DKgCRl36.js +1 -0
- package/dist/web/assets/chunk-BEqpzyXh.js +1 -0
- package/dist/web/assets/clojure-B_aTBtVh.js +1 -0
- package/dist/web/assets/codicon-DCmgc-ay.ttf +0 -0
- package/dist/web/assets/coffee-BWAYpIPu.js +1 -0
- package/dist/web/assets/cpp-BduBQE8d.js +1 -0
- package/dist/web/assets/csharp-CMqOVYKK.js +1 -0
- package/dist/web/assets/csp-6cGliXw2.js +1 -0
- package/dist/web/assets/css-CHnKqS9Q.js +3 -0
- package/dist/web/assets/cssMode-BloHqzZF.js +4 -0
- package/dist/web/assets/cypher-DMzZBj2L.js +1 -0
- package/dist/web/assets/dart-7hYfJ1Dv.js +1 -0
- package/dist/web/assets/dockerfile-BflvjnJW.js +1 -0
- package/dist/web/assets/ecl-BEt6xb2p.js +1 -0
- package/dist/web/assets/editor-BR-TvLsg.css +1 -0
- package/dist/web/assets/editor-DPKWm9GW.css +1 -0
- package/dist/web/assets/editor.api-BG499EJF.js +642 -0
- package/dist/web/assets/editor.main-BhEWG0_P.js +53 -0
- package/dist/web/assets/editor.worker-DwXe4U6w.js +12 -0
- package/dist/web/assets/elixir-CnrQCt6o.js +1 -0
- package/dist/web/assets/flow9-CfLCoUuB.js +1 -0
- package/dist/web/assets/freemarker2-DOHaFATh.js +3 -0
- package/dist/web/assets/fsharp-BQqR9uQ6.js +1 -0
- package/dist/web/assets/go-C3AlMVwy.js +1 -0
- package/dist/web/assets/graphql-O_-hDldf.js +1 -0
- package/dist/web/assets/handlebars-BIFWety9.js +1 -0
- package/dist/web/assets/hcl-BQQD6Mtj.js +1 -0
- package/dist/web/assets/html-YGaqGZNd.js +1 -0
- package/dist/web/assets/htmlMode-Bu3PyHjq.js +4 -0
- package/dist/web/assets/index-Bi376XVf.css +2 -0
- package/dist/web/assets/index-c6KB-9C-.js +3262 -0
- package/dist/web/assets/ini-Bf0RDfP_.js +1 -0
- package/dist/web/assets/java-nqX2KEDD.js +1 -0
- package/dist/web/assets/javascript-N0gZqDK0.js +1 -0
- package/dist/web/assets/json.worker-DhD1Scrm.js +51 -0
- package/dist/web/assets/jsonMode-z5YscjcG.js +10 -0
- package/dist/web/assets/julia-B6P9U5er.js +1 -0
- package/dist/web/assets/kotlin-B-LRk09-.js +1 -0
- package/dist/web/assets/less-CEaIdW1f.js +2 -0
- package/dist/web/assets/lexon-Qv4pvFSW.js +1 -0
- package/dist/web/assets/liquid-BHfNNVLs.js +1 -0
- package/dist/web/assets/lua-CFpyR7YN.js +1 -0
- package/dist/web/assets/m3-CvKhVPQn.js +1 -0
- package/dist/web/assets/markdown-qldG3Vc4.js +1 -0
- package/dist/web/assets/mdx-Dqu2t0et.js +1 -0
- package/dist/web/assets/mips-0D8PRyHq.js +1 -0
- package/dist/web/assets/monaco.contribution-ByQ3yI-W.js +2 -0
- package/dist/web/assets/msdax-DwZXSC5M.js +1 -0
- package/dist/web/assets/mysql-BWq85KY4.js +1 -0
- package/dist/web/assets/objective-c-D653JUMG.js +1 -0
- package/dist/web/assets/pascal-rWjRDdnR.js +1 -0
- package/dist/web/assets/pascaligo-Db8EehaF.js +1 -0
- package/dist/web/assets/perl-C68oq8-D.js +1 -0
- package/dist/web/assets/pgsql-BXeHe33s.js +1 -0
- package/dist/web/assets/php-CDVsAbfl.js +1 -0
- package/dist/web/assets/pla-DnryFT0q.js +1 -0
- package/dist/web/assets/postiats-CDg_4Ev-.js +1 -0
- package/dist/web/assets/powerquery-CWPi8ROz.js +1 -0
- package/dist/web/assets/powershell-C5A0QX3-.js +1 -0
- package/dist/web/assets/preload-helper-DSXbuxSR.js +1 -0
- package/dist/web/assets/primeicons-C6QP2o4f.woff2 +0 -0
- package/dist/web/assets/primeicons-DMOk5skT.eot +0 -0
- package/dist/web/assets/primeicons-Dr5RGzOO.svg +345 -0
- package/dist/web/assets/primeicons-MpK4pl85.ttf +0 -0
- package/dist/web/assets/primeicons-WjwUDZjB.woff +0 -0
- package/dist/web/assets/protobuf-Cgt-BQbL.js +2 -0
- package/dist/web/assets/pug-RPYJC9QB.js +1 -0
- package/dist/web/assets/python-icfse9Ji.js +1 -0
- package/dist/web/assets/qsharp-BZ3S7fu_.js +1 -0
- package/dist/web/assets/r-CN875f1X.js +1 -0
- package/dist/web/assets/razor-DwVkryG9.js +1 -0
- package/dist/web/assets/redis-BLesvTwR.js +1 -0
- package/dist/web/assets/redshift-Byf_0XqD.js +1 -0
- package/dist/web/assets/restructuredtext-DYg_6BiZ.js +1 -0
- package/dist/web/assets/ruby-C4OkxbC-.js +1 -0
- package/dist/web/assets/rust-xAoaEFMh.js +1 -0
- package/dist/web/assets/sb-C8dHOW_y.js +1 -0
- package/dist/web/assets/scala-Spx0wP1o.js +1 -0
- package/dist/web/assets/scheme-D2mZlAUz.js +1 -0
- package/dist/web/assets/scss-DDCn3Ylu.js +3 -0
- package/dist/web/assets/shell-M6px0EWn.js +1 -0
- package/dist/web/assets/solidity-DUWMJi-f.js +1 -0
- package/dist/web/assets/sophia-DwJbUG-2.js +1 -0
- package/dist/web/assets/sparql-ClQxbRPI.js +1 -0
- package/dist/web/assets/sql-BQdjW7Vy.js +1 -0
- package/dist/web/assets/st-BpISyZ_v.js +1 -0
- package/dist/web/assets/swift-CMbl5gM4.js +1 -0
- package/dist/web/assets/systemverilog-jx2Xs7uO.js +1 -0
- package/dist/web/assets/tcl-GIGnfs89.js +1 -0
- package/dist/web/assets/tsMode-CLrI3bdf.js +11 -0
- package/dist/web/assets/twig-Bc0mxc_m.js +1 -0
- package/dist/web/assets/typescript-BzuZVF7m.js +1 -0
- package/dist/web/assets/typespec-CEioAsEm.js +1 -0
- package/dist/web/assets/vb-BPk67J-d.js +1 -0
- package/dist/web/assets/wgsl-DOnyt8_J.js +298 -0
- package/dist/web/assets/xml-Cr85kdqA.js +1 -0
- package/dist/web/assets/yaml-D3RbJnnO.js +1 -0
- package/dist/web/index.html +25 -0
- package/package.json +86 -0
- package/src/core/schema-sqlite/migrate-helper.ts +246 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-PRESENT OSpoon <https://github.com/OSpoon>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
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>
|
|
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
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">aiex</h1>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<b>JSON Schema → SQLite — with AI-powered data extraction</b>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
Define your data structure once. Generate a database. Extract documents into it.
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<br>
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g aiex-cli
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
cd my-project && aiex schema --init # set up your schema directory
|
|
25
|
+
aiex schema "*.json" # generate SQLite from JSON Schema
|
|
26
|
+
aiex extract -s invoice -f invoice.pdf # extract data with AI
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
<br>
|
|
30
|
+
|
|
31
|
+
## ✨ Features
|
|
32
|
+
|
|
33
|
+
- **JSON Schema → SQLite** — Define tables as JSON Schema files, generate Drizzle ORM schema, and migrate to SQLite
|
|
34
|
+
- **Visual Editor** — Browser-based UI for designing schemas without writing JSON by hand
|
|
35
|
+
- **AI Extraction** — Extract structured data from text, images, and PDFs using any OpenAI-compatible provider (OpenAI, Anthropic, Ollama, DeepSeek, local models, etc.)
|
|
36
|
+
- **Built-in Model Registry** — Knows capabilities of 2000+ models (vision, structured output) so you don't have to guess
|
|
37
|
+
|
|
38
|
+
<br>
|
|
39
|
+
|
|
40
|
+
## 🚀 Getting Started
|
|
41
|
+
|
|
42
|
+
### 1. Initialize
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
aiex schema --init
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Creates a `.aiex/` directory with example schemas to get you started.
|
|
49
|
+
|
|
50
|
+
### 2. Visual Editor
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
aiex web
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
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.
|
|
57
|
+
|
|
58
|
+
### 3. Generate Database
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
aiex schema "*.json"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Converts your JSON Schema files into a SQLite database with full migration support.
|
|
65
|
+
|
|
66
|
+
### 4. Extract Data
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
aiex extract -s <schema> -f <file> # from file (txt, pdf, png, jpg, ...)
|
|
70
|
+
aiex extract -s <schema> -t <text> # from text
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The AI reads your document and outputs structured JSON matching your schema.
|
|
74
|
+
|
|
75
|
+
**Example:**
|
|
76
|
+
```bash
|
|
77
|
+
aiex extract -s paper -f research.pdf
|
|
78
|
+
```
|
|
79
|
+
Creates `output.json` with fields like `title`, `firstAuthor`, `journal`, `year` — exactly as defined in your schema.
|
|
80
|
+
|
|
81
|
+
<br>
|
|
82
|
+
|
|
83
|
+
## 📖 Commands
|
|
84
|
+
|
|
85
|
+
| Command | Description |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| `aiex schema --init` | Scaffold `.aiex/` directory with example schemas |
|
|
88
|
+
| `aiex schema <files>` | Parse JSON Schema files and migrate to SQLite |
|
|
89
|
+
| `aiex schema --generate` | Generate Drizzle schema code only (skip migration) |
|
|
90
|
+
| `aiex web` | Launch visual schema editor in browser |
|
|
91
|
+
| `aiex extract -s <name>` | Extract structured data from documents via AI |
|
|
92
|
+
| `aiex doctor` | System and configuration diagnostics |
|
|
93
|
+
|
|
94
|
+
<br>
|
|
95
|
+
|
|
96
|
+
## 🔧 AI Configuration
|
|
97
|
+
|
|
98
|
+
aiex works with any OpenAI-compatible API provider. Configure in the Web UI (AI Settings panel):
|
|
99
|
+
|
|
100
|
+
- **Provider** — Set your base URL and API key
|
|
101
|
+
- **Models** — Add models with vision and/or structured output capabilities
|
|
102
|
+
- **Prompts** — Customize system and user prompt templates with `{schema}` and `{text}` placeholders
|
|
103
|
+
|
|
104
|
+
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
|
+
|
|
106
|
+
<br>
|
|
107
|
+
|
|
108
|
+
## 🙏 Acknowledgments
|
|
109
|
+
|
|
110
|
+
This project includes source code adapted from [jsonschema-builder-vue](https://github.com/gcasotti/jsonschema-builder-vue) by Gabriel Casotti, used and modified under the MIT License.
|
|
111
|
+
|
|
112
|
+
The AI model capabilities registry is derived from [LiteLLM](https://github.com/BerriAI/litellm)'s `model_prices_and_context_window.json`, used under the MIT License.
|
|
113
|
+
|
|
114
|
+
<br>
|
|
115
|
+
|
|
116
|
+
## 📄 License
|
|
117
|
+
|
|
118
|
+
[MIT](./LICENSE.md) © [OSpoon](https://github.com/OSpoon)
|
package/bin/cli.mjs
ADDED
package/dist/cli.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|