aiex-cli 0.0.1 → 0.0.2-beta.10
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 +22 -4
- package/dist/cli.mjs +1085 -48
- package/dist/{doctor-collector-CykRm0fC.mjs → doctor-collector-DlG_mJKG.mjs} +31 -4
- package/dist/index.mjs +1 -1
- package/dist/web/assets/AISettings-DwXkpWZU.js +346 -0
- package/dist/web/assets/ExtractionViewer-DNcRCmNK.js +1 -0
- package/dist/web/assets/{api-client-D2Y_-4JM.js → api-client-CG1VV5gz.js} +1 -1
- package/dist/web/assets/index-C2Nbrhs2.css +2 -0
- package/dist/web/assets/{index-DVDVw-GK.js → index-CWSsEI38.js} +38 -38
- package/dist/web/index.html +3 -3
- package/package.json +2 -1
- package/dist/web/assets/AISettings-CI6Lgx0p.js +0 -339
- package/dist/web/assets/ExtractionViewer-CsdK1kKK.js +0 -1
- package/dist/web/assets/index-C9N8oWt4.css +0 -2
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, integrations, and inspect data
|
|
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
|
```
|
|
@@ -31,10 +31,12 @@ aiex extract -s invoice -f invoice.pdf # extract data with AI and insert into d
|
|
|
31
31
|
## ✨ Features
|
|
32
32
|
|
|
33
33
|
- **JSON Schema → SQLite** — Define tables as JSON Schema files, generate Drizzle ORM schema, and migrate to SQLite
|
|
34
|
-
- **
|
|
34
|
+
- **Web Configuration & Viewer** — Browser-based UI for designing schemas, configuring integrations, previewing prompts, and browsing extracted data
|
|
35
35
|
- **AI Extraction** — Extract structured data from text, images, and PDFs using any OpenAI-compatible provider (OpenAI, Anthropic, Ollama, DeepSeek, local models, etc.)
|
|
36
36
|
- **Interactive Mode** — Run `aiex extract` without arguments for a guided extraction workflow
|
|
37
37
|
- **Batch Mode** — `aiex extract -d <dir>` processes entire directories with optional glob filtering
|
|
38
|
+
- **Notion Sync** — Optionally sync CLI extraction results to configured Notion data sources
|
|
39
|
+
- **Extraction Audit Trail** — Every extraction is recorded with status, input source, output path, token usage, database inserts, Notion pages, 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
|
|
52
|
+
Opens a browser UI where you can visually design and manage your schemas, configure AI and integrations, preview extraction prompts, browse inserted SQLite data, inspect extracted JSON files, and apply schema changes to the database. Extraction itself runs from the CLI.
|
|
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, synced Notion pages, retry lineage, and error message. 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
|
|
@@ -89,12 +100,18 @@ By default, aiex automatically selects a model based on your input type (vision-
|
|
|
89
100
|
| --- | --- |
|
|
90
101
|
| `aiex schema` | Parse JSON Schema files and migrate to SQLite |
|
|
91
102
|
| `aiex schema --generate` | Generate Drizzle schema code only (skip migration) |
|
|
92
|
-
| `aiex web` | Launch visual schema
|
|
103
|
+
| `aiex web` | Launch visual schema/configuration UI and data viewer in browser |
|
|
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
|
|
|
@@ -126,6 +143,7 @@ aiex works with any OpenAI-compatible API provider. Configure in the Web UI (AI
|
|
|
126
143
|
- **Provider** — Set your base URL and API key
|
|
127
144
|
- **Models** — Add models with vision and/or structured output capabilities
|
|
128
145
|
- **Prompts** — Customize system and user prompt templates with `{schema}` and `{text}` placeholders
|
|
146
|
+
- **Integrations** — Optionally connect Notion from AI Settings; use Connect & Map to bind a schema to an existing Notion data source
|
|
129
147
|
|
|
130
148
|
The built-in model registry automatically suggests capabilities for 2000+ models from providers including OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek, Alibaba Cloud, and more.
|
|
131
149
|
|