CLI · Platform operations
Wiring, health, maintenance, and the operational plumbing around a running platform.
kiri databricks
kiri databricks setup
Wire Kirimana to a provisioned Databricks workspace from a third-party handoff file.
Usage: kiri databricks setup --handoff <yaml> [OPTIONS]
--handoff points at the handoff YAML produced by whoever provisioned the workspace (see the Databricks/Azure handoff guide in the product repo). --target dev|test|prod names the environment written into kiri.yml. Smoke tests run immediately; --skip-workflows, --skip-vault, or --skip-health-check defer them when the handoff is incomplete.
kiri databricks health
Verify Kirimana’s wiring to a Databricks workspace, probe by probe.
Usage: kiri databricks health [OPTIONS]
The target’s adapter must be databricks. Checks run by default and are individually skippable:
| Probe | Skip flag | What it verifies |
|---|---|---|
SCIM /Me | --skip-workflows | Service-principal token works |
| Vault refs | --skip-vault | Secret references resolve |
USE CATALOG | --skip-catalog | Catalog is reachable |
| CREATE/DROP SCHEMA | --skip-schema | Idempotent probe against _kiri_health_probe |
| CREATE/DROP TABLE | --skip-table | Table DDL rights in the probe schema |
| ALTER TABLE | --skip-modify | MODIFY grant (Unity Catalog live-mode pushes require it) |
| SELECT | --skip-select | Read grant for catalog-pull use cases |
| Jobs list | --skip-workflows-manage | SP can list jobs (Can View at minimum) |
| Audit delivery | --skip-audit-delivery | Workspace Diagnostic Settings deliver audit logs somewhere |
| Landing storage | --skip-landing-storage | ADLS landing-zone write/read/delete (self-skips when no landing_storage block is configured) |
--format json for CI consumption.
kiri azure
kiri azure list-envs --project-name <name>— list every environment of a Kirimana Azure deployment. Resource groups are scoped to<project_name>-<env>-rg;--subscriptionoverrides the active Azure subscription.
kiri adapter
kiri adapter list— registered platform adapters and their capabilities.kiri adapter conformance-test --adapter databricks— run the baseline adapter conformance suite.
(kiri adapters is a deprecated alias for kiri adapter list.)
Table maintenance
kiri optimize --source <s> --table <t>— compact small parquet files in a Delta table.kiri vacuum --source <s> --table <t> [--retention-hours 168] [--dry-run] [--force]— delete parquet files no longer referenced by the Delta log.--forceallows retention shorter than the 168-hour default — destructive, be sure. Contract-declared retention sweeps arekiri retention --auto(governance page).kiri history --source <s> --table <t> [--limit 10]— Delta commit history for a bronze table.
kiri cost
FinOps rollups from apply telemetry.
kiri cost report --by contract --since-days 30
--by contract | environment | project picks the aggregation axis; the data comes from .kiri/cost.jsonl (override with --cost-file).
kiri federation
Probe and inspect remote federation producers (cross-project contract sharing).
kiri federation health [--transport http|filesystem] [--base-url <url> | --path <export.json>] [--token <t>]— probe a producer.kiri federation list— contracts visible at a remote producer, filterable by--domain,--classification,--release-state draft|bronze|silver|gold|deprecated,--active-only.kiri federation resolve URN— look up one contract by URN (kirimana:contract:…).
The producer side publishes via kiri catalog publish (governance page).
kiri repo
kiri repo link [--create] [--private|--public] [--dry-run]— create, link, and push the GitHub remote for a project. Idempotent (--createadopts an existing repo);--dry-runprints the exact commands.
kiri incident
Incident dispatch to an external ITSM.
kiri incident setup— walk through wiring an ITSM into the project (--skip-health-checkwhen the vault secret isn’t set yet).kiri incident health— verify the configured ITSM is reachable.kiri incident dispatch --source-id <source:scope> --title <t> --summary <md>— manually dispatch one incident.--source-idis the stable dedup key (e.g.apply:fact-orders:fail,sla:orders:freshness);--severity low|medium|high|critical,--category technical|data|orchestration, plus trace links--apply-id,--contract-name,--target-env,--git-sha.kiri incident status SOURCE_ID/kiri incident list-recent [--limit 20]— dispatch state from the incidents JSONL log.kiri incident-api keys create --name <label>/list/revoke KEY_ID— manage API keys for the public incidents REST API.
AI-agent utilities
Utilities that make a project legible to AI assistants (including Kiri’s own MCP server integration):
kiri ai index— generate.kirimana/index.json, a machine-readable project index.kiri ai cli-reference— generate.kirimana/cli.json, the machine-readable CLI reference.kiri ai plan "<goal>"— propose a deterministic, closed-menu plan of CLI steps for a stated goal (advisory; nothing is executed).kiri explain ARTIFACT— trace a generated line back to its source contract declaration.kiri auto status/kiri auto attach— inspect the project’s DPA mode;attachflips a contract-mode project to hybrid so Kiri can own scaffolding in.kiri/contracts/. Graduating Kiri-owned contracts back to user ownership iskiri graduate(gold page).kiri maturity assess [--format text|json|markdown] [--require-level <n>]— score the project against a BI-maturity model;--require-levelexits non-zero below the floor, so platforms can gate merges on a committed maturity level.
kiri ai-batch
Run the residue classification batch produced by kiri inventory pre-classify (lineage page) through the audited AI provider:
kiri ai-batch check # can we make a call at all?
kiri ai-batch prepare --batch ai-batch.jsonl --results r.jsonl --max-cost-usd 5
kiri ai-batch run --batch ai-batch.jsonl --results r.jsonl --max-cost-usd 5
kiri ai-batch results-summary --results r.jsonl
prepare validates the batch and prints a cost estimate that must not exceed --max-cost-usd; run enforces the same cap mid-run and is resumable via the results file; --rate-limit (default 30/min) throttles calls. Results feed kiri contract merge-classification (contracts page).