import
Import data from external sources including the local filesystem plus ChatGPT, Notion, Obsidian, and Telegram exports. Each source type has a dedicated adapter that normalizes the data into the Unsterwerx document format.
Usage
bash
unsterwerx import <SUBCOMMAND>
Subcommands
| Subcommand | Description |
|---|---|
run | Import data from any supported source |
backfill | Backfill missing provenance rows for legacy documents |
status | Show import status and registered sources |
sources | List available source adapters |
history | Show import batch history |
import run
Imports data from a source path. The source type is auto-detected from the directory/file structure, or can be specified explicitly.
bash
unsterwerx import run [OPTIONS] <PATH>
Arguments
| Argument | Required | Description |
|---|---|---|
PATH | Yes | Path to source data (directory or export file) |
Options
| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--source-type | string | auto | Source type: local, chatgpt, notion, obsidian, telegram | |
--dry-run | flag | Show what would be imported without writing to the database | ||
--weight | integer | Override the source trust weight | ||
--scope | string | Scope path for imported documents (e.g., acme/sales) | ||
--background | flag | Run in background (returns immediately with job ID) | ||
--foreground | flag | Force foreground execution (overrides background_default config) | ||
--resume | string | Resume a stale/stopped/failed run by job ID or prefix | ||
--json | flag | Output as JSON |
Example
bash
unsterwerx import run /path/to/documents
unsterwerx import run --source-type chatgpt ~/Downloads/chatgpt-export.zip
unsterwerx import run --dry-run /path/to/documents
unsterwerx import run --scope acme/engineering /path/to/project-docs
import status
Shows registered import sources with item counts and recent batch history.
bash
unsterwerx import status
Import Sources
══════════════════════════════════════════════════════════════
chatgpt ChatGPT Export weight=1 items=0
local Local Filesystem weight=2 items=1901
notion Notion Export weight=2 items=0
obsidian Obsidian Vault weight=2 items=0
telegram Telegram Export weight=1 items=0
══════════════════════════════════════════════════════════════
Recent Batches
──────────────────────────────────────────────────────────────
[+] 2e96772f local 2873 items (1901 imported, 0 skipped, 32 errors)
──────────────────────────────────────────────────────────────
import sources
Lists available import source adapters and their supported formats.
bash
unsterwerx import sources
Available Import Adapters
══════════════════════════════════════════════════════════════
local Local filesystem directory (PDF, DOCX, XLSX, PPTX, TXT, CSV, Markdown, SQL)
chatgpt ChatGPT data export (ZIP with conversations.json)
notion Notion workspace export (ZIP with markdown files)
obsidian Obsidian vault directory (markdown with wikilinks)
telegram Telegram data export (directory with result.json)
══════════════════════════════════════════════════════════════
import history
Shows import batch history with item counts and outcomes.
bash
unsterwerx import history [OPTIONS]
Options
| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--source-type | string | Filter by source type | ||
--limit | integer | 20 | Maximum number of batches to show |
bash
unsterwerx import history
Import History
══════════════════════════════════════════════════════════════
2e96772f local 2026-02-25 16:25:52 → 2026-02-25 16:32:59
(1901 imported, 0 skipped, 32 errors)
path: /path/to/documents/ (2873 total)
══════════════════════════════════════════════════════════════
Notes
- The
localadapter is the same pipeline used byunsterwerx ingest. Usingimport runwith a local directory is equivalent toingest. - Source type auto-detection looks for characteristic files:
conversations.json(ChatGPT),*.mdwith wikilinks (Obsidian),result.json(Telegram), or*.zipwith Notion export structure. - Each source adapter has a default trust weight (1–5) that can be overridden with
--weight. - Import batches track the full lifecycle: start time, end time, items processed, errors, and duplicate counts.
- The
--scopeflag assigns all imported documents to a scope (e.g.,acme/sales). Scope assignment is one-way. Re-importing with a different scope produces a conflict error. - See Import Sources Guide for detailed instructions per source type.