Small, fast, external-dependency-free CLI tool to bulk-import CSV files into PocketBase collections.
Handles large files, messy CSVs, missing values.
- Efficient parallel processing (configurable number of goroutines)
- Good handling of problematic CSVs:
- multiline quoted values
- custom delimiters
- irregular number of columns
- Creates missing IDs/field values automatically when PocketBase is configured to auto-generate them
- Skips "unique constraint" errors by default (useful when re-running imports)
- Real-time progress: shows processed rows + rows/second
- No external dependencies besides PocketBase itself
- Optional record validation before insert (
-validate=true/false) (Note: will slow down import speed)
- Go 1.25.5+ (only if building yourself)
- PocketBase v0.36+ compatible data directory
Download from GitHub Releases
Available for:
- Linux (amd64, arm64)
- macOS (amd64, arm64)
- Windows (amd64)
go install github.com/jim-ww/pocketbase-importer@latestpocketbase-importer \
-dataDir ./pb_data \
-collection users \
-i users.csv \
[flags]-dataDirPocketBase data directory (default:./pb_data)-collectionTarget collection name or ID-iInput CSV file path
| Flag | Default | Description |
|---|---|---|
-goroutines |
100 | Max concurrent insert operations |
-validate |
true | Run PocketBase validation rules before saving |
-delimiter |
, | CSV field delimiter (e.g. ; ` |
-printDelay |
1s | How often to refresh the progress line |
pocketbase-importer -dataDir ./pb_data/ -collection customers -i customers-export.csv -goroutines=250 -validate=false -printDelay=2sProcessed: 53482 rows | 7473.2 rows/sec (finished)
Import completed successfully.
- CSV must contain a header row
- Header names must match PocketBase field names (case-sensitive)
- Empty values are passed as-is → PocketBase applies defaults and auto-generates IDs when configured
- "Value must be unique" errors are silently skipped
- Very wide rows or extremely long values may increase memory usage