For engineers connecting a Postgres database so agents understand its tables and columns.
Updated
To connect Postgres, run brainbox ingest with a postgres:// URL. The CLI introspects tables, columns, keys and relationships, ingestion proposes entities and relationships, and agents read them over MCP. By default no rows are read.
Run ingest with the connection string. Name a project with --project; otherwise it is named after the current directory. By default the CLI reads schema metadata only, never rows. Opt-in column profiling (--profile-data, on meta ingest db) samples rows to compute statistics, and full mode also sends enum values and JSON key shapes.
npx -y @brainbox-labs/cli@latest ingest postgres://user:pass@host:5432/mydb --tables orders,customers --reviewEntities for your tables with fields and types, relationships with cardinality and join keys, and where each entity lives (its runtime binding). Add a data dictionary and SQL files to add meaning, then approve the draft.
If an ETL builds your schema, pass the mapping document so the server can say which upstream column fed each one. Profiling is opt-in; preview what would be uploaded first with brainbox profile preview <url>.
npx -y @brainbox-labs/cli@latest meta ingest db postgres://user:pass@host/mydb --mapping etl/orders-mapping.yaml| Option | What it does |
|---|---|
| --tables a,b | Limit to these tables |
| --review | Stop before publishing and print a review link |
| --sql <dir>, --sql-file <file> (meta ingest db) | Add SQL query files |
| --mapping <path> (meta ingest db) | ETL or column mapping document for lineage |
| --profile-data [full] (meta ingest db) | Opt-in column profiling |
| --skip-profile-columns | Exclude table.column pairs from profiling |