Skip to content

vibepg import ​

Synopsis ​

bash
vibepg import <name> <table> <file> [--schema <schema>] [--columns <cols>] [--delimiter <delim>] [--no-header]

Description ​

Import a CSV (or TSV, or other delimited file) into a table. vibepg streams the file into the container and runs \copy <table> FROM STDIN, so you don't need psql or pg_restore on your host.

Arguments ​

NameRequiredDescription
nameyesInstance name
tableyesTarget table name. PostgreSQL identifier rules.
fileyesPath to the CSV/TSV file on your host

Options ​

FlagTypeDefaultDescription
--schemastringpublicSchema containing the target table
--columnsstring(none)Comma-separated column list (e.g. id,name,email)
--delimiterstring,Field separator. Use \t for tabs.
--no-headerboolfalseThe file has no header row

Examples ​

bash
# Default CSV with header
vibepg import demo users users.csv

# TSV with custom schema and explicit columns
vibepg import demo events events.tsv \
  --schema analytics \
  --delimiter "\t" \
  --columns id,event_type,created_at

# Headerless pipe-delimited file
vibepg import demo audit audit.txt --delimiter "|" --no-header

Notes ​

  • The table must already exist. Use run with a schema file if you need to create it first.
  • --columns is required when the CSV doesn't include all the table's columns or when column order differs.
  • Identifier-safe rules apply to --schema, --columns, and <table>.

See also ​

Released under the MIT License.