aiex-cli 0.1.0 → 0.1.1-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 CHANGED
@@ -32,13 +32,13 @@ aiex watch -s invoice -d ./watch_folder # watch folder daemon for automatic extr
32
32
 
33
33
  ## ✨ Features
34
34
 
35
- - **JSON Schema → SQLite** — Define tables as JSON Schema files, generate Drizzle ORM schema, and migrate to SQLite
35
+ - **AIEX JSON Schema → SQLite** — Define tables with a Drizzle-backed JSON Schema dialect, generate Drizzle ORM schema, and migrate to SQLite
36
36
  - **Web Configuration & Viewer** — Browser-based UI for designing schemas, configuring integrations, previewing prompts, and browsing extracted data
37
37
  - **AI Extraction** — Extract structured data from files (text, images, PDFs) using any OpenAI-compatible provider (OpenAI, Anthropic, Ollama, DeepSeek, local models, etc.)
38
38
  - **Interactive Mode** — Run `aiex extract` without arguments for a guided extraction workflow
39
39
  - **Batch Mode** — `aiex extract -d <dir>` processes entire directories with optional glob filtering
40
40
  - **Incremental Extraction** — File hash deduplication skips already-processed files; use `--force` to override
41
- - **Data Dump** — `aiex dump` exports SQLite tables to CSV or Excel (.xlsx)
41
+ - **Web Data Export** — Export SQLite table data to CSV, Excel (.xlsx), or JSON from the Web UI
42
42
  - **Notion Sync** — Optionally sync CLI extraction results to configured Notion data sources
43
43
  - **Extraction Audit Trail** — Every extraction is recorded with status, input source, output path, token usage, database inserts, Notion pages, and errors
44
44
  - **Built-in Model Registry** — Knows capabilities of 2000+ models (vision, structured output) so you don't have to guess
@@ -61,7 +61,7 @@ Opens a browser UI where you can visually design and manage your schemas, config
61
61
  aiex schema
62
62
  ```
63
63
 
64
- Converts your JSON Schema files into a SQLite database with full migration support.
64
+ Converts AIEX JSON Schema files into a SQLite database with full migration support. AIEX uses a Drizzle-backed schema dialect rather than the full JSON Schema specification; see [Docs/schema-dialect.md](Docs/schema-dialect.md) for the supported mapping surface.
65
65
 
66
66
  ### 3. Extract Data
67
67
 
@@ -73,10 +73,6 @@ aiex extract -s <schema> -f <file> --no-insert # extract and save JSON witho
73
73
  aiex extract -s <schema> -f <file> --force # force re-extraction even if already processed
74
74
  aiex extract -s <schema> -d <directory> # batch extract all supported files in a directory
75
75
  aiex extract -s <schema> -d <dir> -g "*.pdf" # batch with glob filter
76
- aiex extract history # list extraction audit records
77
- aiex extract show <audit-id> # show full audit record JSON
78
- aiex extract retry <audit-id> # retry a previous extraction
79
- aiex extract rm <audit-id> # delete an audit record and cached upload
80
76
  ```
81
77
 
82
78
  The AI reads your document and outputs structured JSON matching your schema.
@@ -89,33 +85,21 @@ aiex extract -s paper -f research.pdf --no-insert # save result only, skip data
89
85
  aiex extract -s paper -f research.pdf -m gpt-4o # use a specific model
90
86
  aiex extract -s paper -f research.pdf --force # force re-extraction even if already processed
91
87
  aiex extract -s paper -d ./papers -g "*.pdf" # batch extract PDFs from a directory
92
- aiex extract history # inspect recent extraction runs
93
88
  ```
94
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.
95
90
 
96
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.
97
92
 
98
- 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.
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. Use the Web UI to inspect, retry, or delete extraction records.
99
94
 
100
95
  ### 4. Watch Folder Daemon (Auto-Extraction)
101
96
 
102
97
  ```bash
98
+ aiex watch
103
99
  aiex watch -s <schema> -d <folder>
104
100
  ```
105
101
 
106
- Runs a background watcher daemon to monitor a folder for new incoming files (such as scanned documents or downloads), automatically performing offline data extraction, database insertion, and system notifications.
107
-
108
- ### 5. Dump Data
109
-
110
- ```bash
111
- aiex dump -s <schema> # dump to CSV (default)
112
- aiex dump -s <schema> -f xlsx -o output.xlsx # dump to Excel
113
- aiex dump -t <table> -f csv -o output.csv # dump a specific table by name
114
- ```
115
-
116
- Dumps all extracted data for a given schema (or table) from the SQLite database to CSV or Excel format.
117
-
118
- <br>
102
+ Runs a background watcher daemon to monitor a folder for new incoming files (such as scanned documents or downloads), automatically performing offline data extraction, database insertion, and system notifications. Run without arguments to choose a schema, watch directory, model, and insert mode interactively.
119
103
 
120
104
  ## 📖 Commands
121
105
 
@@ -123,6 +107,7 @@ Dumps all extracted data for a given schema (or table) from the SQLite database
123
107
  | --- | --- |
124
108
  | `aiex schema` | Parse JSON Schema files and migrate to SQLite |
125
109
  | `aiex schema --generate` | Generate Drizzle schema code only (skip migration) |
110
+ | `aiex schema --force` | Allow a high-risk schema migration after reviewing the migration risk report |
126
111
  | `aiex web` | Launch visual schema/configuration UI and data viewer in browser |
127
112
  | `aiex extract` | Interactive mode — prompts for schema and file/directory input |
128
113
  | `aiex extract -s <name> -f <file>` | Extract structured data from a file and insert into SQLite database |
@@ -131,15 +116,9 @@ Dumps all extracted data for a given schema (or table) from the SQLite database
131
116
  | `aiex extract -s <name> -f <file> --force` | Force re-extraction even if the file has already been processed |
132
117
  | `aiex extract -s <name> -d <dir>` | Batch extract all supported files in a directory |
133
118
  | `aiex extract -s <name> -d <dir> -g "*.pdf"` | Batch extract with glob filter |
134
- | `aiex extract history` | List extraction audit records |
135
- | `aiex extract show <audit-id>` | Show a full extraction audit record |
136
- | `aiex extract retry <audit-id>` | Retry a previous extraction run |
137
- | `aiex extract retry <audit-id> --no-insert` | Retry without inserting into SQLite |
138
- | `aiex extract rm <audit-id>` | Delete an audit record and its cached upload |
119
+ | `aiex watch` | Guided setup for watching a directory and automatically extracting new files |
139
120
  | `aiex watch -s <name> -d <dir>` | Watch a directory for new files and automatically extract data |
140
121
  | `aiex watch -s <name> -d <dir> --no-insert` | Watch and save JSON without inserting into SQLite |
141
- | `aiex dump -s <name>` | Dump extracted data for a schema to CSV |
142
- | `aiex dump -s <name> -f xlsx -o <file>` | Dump to Excel (.xlsx) |
143
122
  | `aiex doctor` | System and configuration diagnostics |
144
123
  | `aiex completion bash\|zsh\|fish` | Generate shell completion scripts |
145
124