Skip to main content
Private Preview·Early access by invitation.Request access →
Kirimana.
Docs · CLI reference

CLI · Gold and analytics

The gold layer works goal-first: declare a ReportingGoal from a business question, draft the models that answer it, and publish the semantic layer that BI tools consume.

kiri design

Draft a ReportingGoal from a freeform business question.

Usage: kiri design [OPTIONS]
FlagDescriptionDefault
--goal-fileMarkdown file containing the business question (required)
--nameOverride the AI-proposed name (filename stem)
--domainPreferred business domain (e.g. customer)
--write / --no-writeWrite to <project>/models/gold/<name>.ymloff
--overwriteOverwrite an existing goal fileoff
--allow-stubExplicitly allow audited skeleton output when AI is unconfiguredoff

kiri suggest

AI-assisted draft generation for silver and gold models and tests. Every draft prints by default; --write saves it, --allow-stub permits audited template output when AI is unconfigured.

kiri suggest gold

Draft a gold dbt model for one fact or dimension of a ReportingGoal.

Usage: kiri suggest gold --goal <name> (--fact <f> | --dim <d>) [OPTIONS]
FlagDescriptionDefault
--fact / --dimFact or dimension name from the goal’s spec (one required)
--scd-typeFor --dim: `type_1type_2
--surrogate-key-strategyFor --dim: `hashsequence
--fact-kindFor --fact: `transactionperiodic_snapshot
--writeSave under models/gold/ as <goal>__<name>.sqloff

kiri suggest silver / kiri suggest tests

  • kiri suggest silver --source <s> --table <t> — draft a silver dbt model from a bronze table; --goal / --entity scope the AI context to a reporting goal. (Details on the silver page.)
  • kiri suggest tests --source <s> --table <t> — draft dbt-core data tests (not_null, uniqueness, …). --goal sharpens test choices with the goal’s KPIs; --sample-rows (default 5, 0 to disable) controls how many bronze rows the AI sees. Saves as models/silver/<source>__<table>.yml with --write.

kiri kpi

KPI lineage and freshness lookups.

  • kiri kpi list — every KPI name discoverable in the project.
  • kiri kpi describe NAME — a KPI’s lineage, owner, freshness, and definition. --target picks the environment for the freshness lookup; --no-freshness skips the manifest read (faster); --format text|json.
kiri kpi describe revenue
kiri kpi describe revenue --format json
kiri kpi describe customer_churn --no-freshness

kiri semantic

Semantic-layer emission, apply, and verification.

kiri semantic sync

Emit semantic-layer YAML from gold contracts.

Usage: kiri semantic sync --backend <name> [OPTIONS]

Supported backends: cube, metricflow, databricks-metric-views. Output defaults to stdout for piping into downstream deploy tooling; -o writes a file. --target is used by databricks-metric-views to read the runtime’s metric-views capability flag.

kiri semantic apply

Apply gold semantic models to Unity Catalog Metric Views.

Usage: kiri semantic apply --backend databricks-metric-views [OPTIONS]

Only databricks-metric-views is live-applyable today. Dry-run by default: --no-dry-run executes the CREATE OR REPLACE VIEW … WITH METRICS DDL against the live target, and requires KIRIMANA_SEMANTIC_VIEWS_LIVE=1 plus a Unity Catalog target — otherwise it downgrades to dry-run.

kiri semantic verify

Diff live Unity Catalog Metric Views against what the contracts declare.

Usage: kiri semantic verify --backend databricks-metric-views [OPTIONS]

--fail-on missing|stale|all (default all) controls the exit code; the JSON report goes to --output or stdout.

There is also a contract-level export path — kiri contract export semantic-layer — documented on the contracts page; it reads semantic_layer.target / semantic_layer.output_path from kiri.yml.

kiri graduate

Graduate Kiri-owned contracts (from auto/hybrid DPA mode) into the user-owned contract tree, putting them under normal review and governance.

kiri graduate --project .

Gold scaffolding at migration scale

For bulk gold/mart scaffolding from an upstream inventory, kiri scaffold emits contracts wholesale:

  • kiri scaffold all --plan minimal|pit-only|plan-a-1to1|plan-b-kimball|plan-b-layer --output <dir> — fan out a closed-menu plan. All plans except minimal require --inventory (upstream inventory JSON) and --entity-map; plan-b-kimball additionally requires --mart-lineage and --routing-map.
  • kiri scaffold mart --upstream-layer <l> --upstream-entity <e> --upstream-catalog <c> --output <yml> — emit a mart contract. Columns come from --column-list (authoritative) or are extracted from --view-sql via sqlglot; --parity-required exact|approximate|advisory records the migration parity bar. A mart body SQL is required (--sql) unless --allow-placeholder is explicitly set — placeholder marts mask missing business logic and are refused by default.
  • kiri scaffold silver --pattern scd2|type1|append-only|snapshot or --from-marts — emit silver contracts pattern-driven or inferred from mart contracts (--contracts + --routing-map).
Updated 5 July 2026 · v1.0.0-beta.1