Skip to content

OSpoon/create-aiex

Repository files navigation

npm version npm downloads license

create-aiex

Scaffolding tool for aiex-cli projects — JSON Schema → SQLite with AI-powered extraction

Define your data structure once. Generate a database. Extract documents into it.


npm create aiex@latest

✨ Features

  • Interactive scaffolding — Project name, Git init, and dependency install prompts
  • Pre-configured project — Comes with .aiex/ (AI config + JSON Schema), input/ directory, and ready-to-use scripts
  • Latest aiex-cli — Scaffolded projects always depend on the latest aiex-cli version
  • Watch & Extract — Preset commands: extract:all, watch, web, schema:push, export, doctor

🚀 Getting Started

Create a new project

npm create aiex@latest

Or specify a project name directly:

npm create aiex@latest my-extraction-project

The interactive prompts will guide you through:

  1. Project name — Enter a valid npm package name
  2. Git init — Optionally initialize a Git repository
  3. Install dependencies — Automatically install packages with your detected package manager

Start extracting

cd my-extraction-project

# Place your documents (PDFs, images, text) in the input/ directory,
# then run batch extraction against a schema:
npx aiex extract --dir ./input --schema my-schema

# Or launch the web UI to design schemas and configure AI:
npx aiex web

📦 Scaffolded Project

├── .aiex/
│   ├── ai-config.json          # AI provider, models, and prompt templates
│   └── schema/
│       └── customers.json      # Example JSON Schema table definition
├── input/                      # Default document source directory
├── .editorconfig
├── .gitignore
└── package.json                # Pre-configured with aiex-cli and scripts

Available scripts

Command Description
npm run extract:all -- --schema <name> Batch extract all documents in input/
npm run watch -- --schema <name> Watch input/ for new files and auto-extract
npm run web Launch the web configuration UI
npm run schema:push Generate SQLite database from JSON Schema files
npm run export Export extracted data to CSV/XLSX
npm run doctor System diagnostics

🛠 Development

pnpm install
pnpm run dev       # Watch mode
pnpm run build     # Build bundle
pnpm run test      # Run tests
pnpm run lint      # Lint source
pnpm run typecheck # TypeScript type check

Release

pnpm run release

Bumps the version, creates a Git tag, and pushes — triggering GitHub Actions to publish to npm.


📄 License

MIT © OSpoon

About

Scaffolding tool for aiex-cli projects — JSON Schema → SQLite with AI-powered extraction

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors