Documentation Index
Fetch the complete documentation index at: https://docs.kiwifs.com/llms.txt
Use this file to discover all available pages before exploring further.
KiwiFS can import rows from relational and document databases, converting each record into a markdown page with structured frontmatter.
PostgreSQL
kiwifs import --from postgres \
--dsn "postgres://user:pass@localhost:5432/mydb" \
--table users \
--prefix people/ \
--root ./knowledge
Options
| Flag | Description |
|---|
--dsn | PostgreSQL connection string (required) |
--table | Table name |
--query | Custom SQL query (overrides --table) |
--columns | Comma-separated fields to include |
--prefix | Path prefix in KiwiFS (default: table name) |
--limit | Max rows to import |
--dry-run | Preview without writing |
kiwifs import --from postgres \
--dsn "postgres://user:pass@localhost/mydb" \
--query "SELECT id, name, email FROM users WHERE active = true" \
--prefix active-users/
MySQL
kiwifs import --from mysql \
--dsn "user:pass@tcp(localhost:3306)/mydb" \
--table articles \
--prefix articles/
Same flags as PostgreSQL. The DSN format follows Go’s mysql driver convention.
SQLite
kiwifs import --from sqlite \
--db ./data.db \
--table entries \
--prefix entries/
| Flag | Description |
|---|
--db | Path to SQLite database file (required) |
--table | Table name |
--query | Custom SQL query (overrides --table) |
MongoDB
kiwifs import --from mongodb \
--uri "mongodb://localhost:27017" \
--database myapp \
--collection articles \
--prefix articles/
| Flag | Description |
|---|
--uri | MongoDB connection URI (required) |
--database | Database name (required) |
--collection | Collection name (required) |
Firestore
kiwifs import --from firestore \
--project my-gcp-project \
--collection users \
--prefix users/
| Flag | Description |
|---|
--project | GCP project ID (required) |
--collection | Firestore collection name (required) |
Firestore requires Google Cloud credentials. Set GOOGLE_APPLICATION_CREDENTIALS or run within a GCP environment.
MCP usage
All database imports are also available via the kiwi_import MCP tool:
{
"tool": "kiwi_import",
"arguments": {
"from": "postgres",
"dsn": "postgres://user:pass@localhost/mydb",
"table": "users",
"prefix": "people/",
"dry_run": true
}
}
Use dry_run: true to preview what would be imported before writing any files.
Each imported record becomes a markdown file:
---
_imported_at: "2026-04-25T18:46:15Z"
_source: users
_source_id: pg:users:42
name: Jane Doe
email: jane@example.com
role: admin
---
# Jane Doe
> Auto-imported from users (row pg:users:42)
Re-importing the same data is idempotent — KiwiFS compares _source_id and field values, skipping unchanged records.