aiex-cli 0.0.1-beta.20 → 0.0.1-beta.22
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 +4 -6
- package/dist/cli.mjs +4 -10
- package/dist/{doctor-B5JSikzk.mjs → doctor-XmZIqHqt.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/web/assets/{DataBrowser-Cv_L28uJ.js → DataBrowser-DzY1vpJg.js} +1 -1
- package/dist/web/assets/{index-DOsKu0Uq.js → index-Dyy6y4OR.js} +2 -2
- package/dist/web/index.html +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,8 +23,7 @@ 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 # 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>
|
|
@@ -78,11 +77,10 @@ The AI reads your document and outputs structured JSON matching your schema.
|
|
|
78
77
|
|
|
79
78
|
**Examples:**
|
|
80
79
|
```bash
|
|
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
|
|
80
|
+
aiex extract -s paper -f research.pdf # save result to .aiex/extracted/ and insert into database
|
|
83
81
|
aiex extract -s paper -f research.pdf -m gpt-4o # use a specific model
|
|
84
82
|
```
|
|
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.
|
|
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. Data is automatically inserted into the SQLite database.
|
|
86
84
|
|
|
87
85
|
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.
|
|
88
86
|
|
|
@@ -97,7 +95,7 @@ By default, aiex automatically selects a model based on your input type (vision-
|
|
|
97
95
|
| `aiex schema --generate` | Generate Drizzle schema code only (skip migration) |
|
|
98
96
|
| `aiex web` | Launch visual schema editor in browser |
|
|
99
97
|
| `aiex extract -s <name> -f <file>` | Extract structured data from documents via AI |
|
|
100
|
-
| `aiex extract -s <name> -f <file
|
|
98
|
+
| `aiex extract -s <name> -f <file>` | Extract and insert into SQLite database |
|
|
101
99
|
| `aiex extract -s <name> -f <file> -m <model>` | Extract with a specific AI model |
|
|
102
100
|
| `aiex doctor` | System and configuration diagnostics |
|
|
103
101
|
| `aiex completion bash\|zsh\|fish` | Generate shell completion scripts |
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as formatDoctorDiagnosticsJson, S as doctorDiagnosticsTableRows, _ as JsonSchemaDefinitionSchema, a as DEFAULT_PROMPT_CONFIG, b as generateDrizzleSchema, c as AIConfigSchema, d as description, f as name, h as createMigrationConfig, i as writeAIConfig, l as createConfig, m as version, n as getDefaultAIConfig, o as PLACEHOLDER_SCHEMA, p as package_default, r as readAIConfig, s as PLACEHOLDER_TEXT, t as collectDoctorDiagnostics, u as seedConfig, v as parseJsonSchema, y as toSnakeCase } from "./doctor-
|
|
1
|
+
import { C as formatDoctorDiagnosticsJson, S as doctorDiagnosticsTableRows, _ as JsonSchemaDefinitionSchema, a as DEFAULT_PROMPT_CONFIG, b as generateDrizzleSchema, c as AIConfigSchema, d as description, f as name, h as createMigrationConfig, i as writeAIConfig, l as createConfig, m as version, n as getDefaultAIConfig, o as PLACEHOLDER_SCHEMA, p as package_default, r as readAIConfig, s as PLACEHOLDER_TEXT, t as collectDoctorDiagnostics, u as seedConfig, v as parseJsonSchema, y as toSnakeCase } from "./doctor-XmZIqHqt.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import process from "node:process";
|
|
@@ -13449,12 +13449,6 @@ const extractCommand = defineCommand({
|
|
|
13449
13449
|
type: "string",
|
|
13450
13450
|
alias: "m",
|
|
13451
13451
|
description: "AI model to use for extraction (overrides auto-selection)"
|
|
13452
|
-
},
|
|
13453
|
-
db: {
|
|
13454
|
-
type: "boolean",
|
|
13455
|
-
alias: "d",
|
|
13456
|
-
description: "Insert extracted data into SQLite database",
|
|
13457
|
-
default: false
|
|
13458
13452
|
}
|
|
13459
13453
|
},
|
|
13460
13454
|
async run({ args }) {
|
|
@@ -13545,7 +13539,7 @@ const extractCommand = defineCommand({
|
|
|
13545
13539
|
s.stop("Extraction complete");
|
|
13546
13540
|
if (result.outputPath) consola.success(`Result saved: ${pc.cyan(result.outputPath)}`);
|
|
13547
13541
|
if (result.tokensUsed) consola.info(pc.gray(`Token usage: prompt=${result.tokensUsed.prompt}, completion=${result.tokensUsed.completion}, total=${result.tokensUsed.total}`));
|
|
13548
|
-
if (
|
|
13542
|
+
if (result.data) {
|
|
13549
13543
|
const s2 = spinner();
|
|
13550
13544
|
s2.start("Inserting into database...");
|
|
13551
13545
|
const dbError = await ensureDatabaseReady(config.databasePath, schema);
|
|
@@ -13680,7 +13674,7 @@ const schemaCommand = defineCommand({
|
|
|
13680
13674
|
await fs.mkdir(config.migrationsPath, { recursive: true });
|
|
13681
13675
|
const examReportSchema = {
|
|
13682
13676
|
$schema: $id,
|
|
13683
|
-
title: "
|
|
13677
|
+
title: "ScoreReport",
|
|
13684
13678
|
type: "object",
|
|
13685
13679
|
table: {
|
|
13686
13680
|
name: "score_report",
|
|
@@ -13784,7 +13778,7 @@ const schemaCommand = defineCommand({
|
|
|
13784
13778
|
const examStatus = await writeJsonIfAbsent(path.join(config.schemaPath, "score_report.json"), examReportSchema);
|
|
13785
13779
|
consola.success(`Initialized ${pc.cyan(".aiex/")} with example schemas`);
|
|
13786
13780
|
if (examStatus === "skipped") consola.warn(`${pc.cyan(".aiex/schema/score_report.json")} already exists, skipped`);
|
|
13787
|
-
consola.info("Example includes:
|
|
13781
|
+
consola.info("Example includes: ScoreReport (college entrance exam score report)");
|
|
13788
13782
|
outro("Run: aiex schema");
|
|
13789
13783
|
return;
|
|
13790
13784
|
}
|
|
@@ -411,7 +411,7 @@ function generateDrizzleConfig() {
|
|
|
411
411
|
//#endregion
|
|
412
412
|
//#region package.json
|
|
413
413
|
var name = "aiex-cli";
|
|
414
|
-
var version = "0.0.1-beta.
|
|
414
|
+
var version = "0.0.1-beta.22";
|
|
415
415
|
var description = "JSON Schema → SQLite with AI-powered data extraction";
|
|
416
416
|
var package_default = {
|
|
417
417
|
name,
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as formatDoctorDiagnosticsJson, S as doctorDiagnosticsTableRows, _ as JsonSchemaDefinitionSchema, b as generateDrizzleSchema, g as generateDrizzleConfig, h as createMigrationConfig, t as collectDoctorDiagnostics, v as parseJsonSchema, x as buildDoctorDiagnostics } from "./doctor-
|
|
1
|
+
import { C as formatDoctorDiagnosticsJson, S as doctorDiagnosticsTableRows, _ as JsonSchemaDefinitionSchema, b as generateDrizzleSchema, g as generateDrizzleConfig, h as createMigrationConfig, t as collectDoctorDiagnostics, v as parseJsonSchema, x as buildDoctorDiagnostics } from "./doctor-XmZIqHqt.mjs";
|
|
2
2
|
|
|
3
3
|
export { JsonSchemaDefinitionSchema, buildDoctorDiagnostics, collectDoctorDiagnostics, createMigrationConfig, doctorDiagnosticsTableRows, formatDoctorDiagnosticsJson, generateDrizzleConfig, generateDrizzleSchema, parseJsonSchema };
|