CLI · Sources and ingestion
Sources are declared as YAML under sources/; ingestion verbs move data from those systems into landing zones and bronze.
kiri discover
Scaffold a whole Kirimana project from a live source system in one pass: scan schemas, group tables into candidate sources, and emit contracts plus a report.
Usage: kiri discover [OPTIONS]
| Flag | Description | Default |
|---|---|---|
--target | Source platform to introspect (closed menu; databricks among the supported platforms) | |
--conn | Connection string. May include ${vault:<id>:<key>} tokens. | |
--output, -o | Directory for the scaffold + report | scaffold |
--schemas | Comma-separated schemas to scan (default: all) | |
--max-tables | Stop after this many tables — useful for a smoke run | |
--known-source | Pin a known source, 'name:schema.glob' (e.g. 'erp:dbo.*'). Repeatable; pinned members override the FK-derived grouping. | |
--with-ai / --no-ai | AI-augmented descriptions + classification. Requires --max-cost. | off |
--max-cost | Hard cap on AI spend (USD). Scan halts before the cap is breached; the partial scaffold is preserved. | |
--force-ai-for-all | Invoke AI for every table, not just low-heuristic-confidence ones | off |
--probe-sample-data | Fetch N sample rows (PII-suspect columns excluded) and forward to the AI provider. Requires --with-ai and --confirm-data-egress. | 0 |
--confirm-data-egress | Required gate when sampling rows — acknowledges data leaves your perimeter | off |
--layout | legacy (per-table contracts/<schema>/<table>.yml) or layer (per-(domain, layer) 01-config/<domain>/<layer>.yml; requires --domain) | legacy |
--yes, -y | Skip the interactive pre-scan cost confirmation | off |
Additional source-system-specific discovery targets are documented in the product repo.
kiri source
Source-YAML lifecycle: scaffold, validate, inspect, and machine-edit.
kiri source scaffold NAME --owner <email> --domain <d>— rendersources/<name>.yml.--modesets the ingestion mode (seekiri ingest modes);--tables customers,ordersseeds table stubs;--classificationdefaults tointernal.kiri source validate --content sources/<name>.yml— validate a source file.kiri source introspect NAME TABLE --owner <email> --domain <d>— sample a reachable source and emit a draft source YAML.--mode rest_api|database; REST flags (--url,--method,--header,--query-param,--auth-kind none|bearer|header|basicwith vault refs for credentials) or database flags (--db-kind,--db-host,--db-port,--db-name,--db-schema,--db-username-ref,--db-password-ref).--aiapplies audited AI annotations to the sampled schema;--write -o <path>saves the draft.kiri source tables SOURCE_NAME— list a source’s tables with server-side filtering:--queryfree-text over names + columns,--filter all|ungoverned|governed|pii|vault, cursor-paged via--limit/--cursor.kiri source table SOURCE_NAME TABLE_NAME— full detail record for one table (logical or physical name).kiri source group SOURCE_NAME --urns <urn,urn>— recommend contract groupings for a set of source-table URNs.--ai-augmentedrephrases each multi-table group’s reason; the decision and signals stay deterministic.
Safe machine edits
kiri source checksum --target sources/<name>.yml— SHA-256 of the file, used as an optimistic lock.kiri source commit --target <file> --content <new> [--checksum <sha>]— atomic write; refuses when the on-disk hash differs.kiri source patch --op <op> [--args <json>] [--apply]— closed-menu ops:set_source_owner,set_source_classification,set_source_domain,set_source_description,add_table,remove_table,add_table_column,remove_table_column,set_column_pii,set_column_classification,set_table_ingestion,clear_table_ingestion. Dry-run by default;--applywrites after validation succeeds.
kiri ingest
Author sources and trigger ingest runs.
kiri ingest modes
List supported ingestion modes (the same closed menu kiri source scaffold accepts). --include-planned / --no-planned toggles roadmap modes; --format json|text.
kiri ingest new-source
Author a new source via an AI-assisted, closed-menu onboarding flow.
Usage: kiri ingest new-source [OPTIONS]
Interactive by default (--no-interactive to disable); --backend skips the chooser and routes straight to a named engine’s setup flow — native and landing_zone are the built-in backends; further pluggable engine backends are documented in the product repo. --yes skips the save confirmation for CI.
kiri ingest sync
Trigger the chosen ingest backend for the project’s sources.
Usage: kiri ingest sync --backend <name> [OPTIONS]
The backend must be named explicitly — Kirimana never silently defaults. native runs through kiri apply; landing_zone scans landing zones. --source / --table scope the sync; --dry-run prints the plan without calling the backend.
kiri ingest bronze
Scan landing zones and convert incoming files into bronze Delta tables.
Usage: kiri ingest bronze [OPTIONS]
--source restricts to one landing-zone source (default: all); --target, -t picks the named profile.
kiri fetch
Pull from REST endpoints or databases into landing files.
Usage: kiri fetch [OPTIONS]
--source fetches only one source (default: all rest_api sources); --table narrows within it. kiri apply runs this implicitly unless --skip-fetch is set.
kiri map-source
Map a reporting goal’s needed_silver_entity to a concrete source.
kiri map-source --goal <goal-name> --entity <silver-entity>
Used in the gold-first workflow: declare the reporting goal, then bind each needed silver entity to a real source table.