8. Seed from Files
Purpose: Parse CSV, XLSX, or DOCX files from the seeding folder into seed entries and optionally run the full explosion pipeline for a single topic.
Prerequisites:
.env.localhasDATABASE_URLand API key for the routed model (see available models)- Content files placed in
.notes/seeding-folder/(gitignored) - Content profiles configured in
scripts/seed/lib/content-profiles.tsfor custom file paths
Cost / Duration: ~$1 (low) | 30 minutes - 2 hours
Prompt
I need to seed entries from content files (CSV, XLSX, or DOCX).
### Step 1: Preview parsing (no DB writes)
First, let me see what would be extracted without writing anything:
```bash
bun scripts/seed/seed-from-files.ts --parse --dry-run
```
Review the output for correct category mapping and entity names.
Flag any issues with file parsing or category assignments.
### Step 2: Parse and insert entries
Once the preview looks good:
```bash
bun scripts/seed/seed-from-files.ts --parse
```
This parses all files in `.notes/seeding-folder/` and inserts entries
into `seed_entry_queue`.
### Step 3: Check statistics
```bash
bun scripts/seed/seed-from-files.ts --stats
```
Report entries per topic category, completion status, and parse counts.
### Step 4: Run full pipeline for a single topic (optional)
If I want to parse, explode, and generate content for one topic in one go:
```bash
bun scripts/seed/seed-from-files.ts --all --topic <TOPIC_SLUG> --budget 5
```
The `--budget` flag caps AI spend in dollars.
If entries get wrong category assignments, check the content profile mapping
in `scripts/seed/lib/content-profiles.ts` or use `--topic` to force a category.
If a category slug is not found in `topic_categories` (1,104 active
categories across 33 roots), it needs to be added via migration.
See [Add New Topic Category](../taxonomy/01-add-new-topic-category.md).
Verification
- Dry run shows correct entity extraction from files
- Entries appear in
seed_entry_queuewithstatus = 'pending' -
topic_category_idset correctly for all entries - Stats command shows expected counts per category
- No XLSX/CSV/DOCX parsing errors
Related Prompts
- Seed the Database -- Full seeding pipeline
- Generate Curated Entries -- AI-generated entries (alternative to files)
- Bulk Enqueue Entries -- Dispatch entries to workers after parsing