CLI Reference
This page documents the current Cobra tree in cli/cmd/. For a machine-readable
snapshot, run dk docs -o llm; for operator workflows, use the grouped summary
below.
Command workflow at a glance
flowchart LR
A[init or project init] --> B[dev up]
B --> C[run / test / lint]
C --> D[build]
D --> E[publish]
E --> F[promote]
F --> G[status / logs / rollback]
Global flags
dk defines one persistent global flag in cli/cmd/root.go:
| Flag | Default | Meaning |
|---|---|---|
--output, -o | table | Root output format: table, json, or yaml |
Commands with their own local --output flag (for example dk docs,
dk dataset list, dk dataset show, and dk pipeline show) override the root
meaning for that command.
Project management
dk init [name]
Scaffold a new Transform package.
Flags: --runtime, -r (required in non-interactive mode); --mode=batch; --namespace, -n default; --team=my-team; --owner; repeatable --ext.
dk project init <name>
Scaffold a multi-transform project directory.
Flags: --description.
Development
dk dev
Parent group for local stack commands. Persistent flag: --runtime=k3d.
dk dev up
Start the local dev stack. No local flags.
dk dev down
Stop the local dev stack.
Flags: --volumes=false.
dk dev status
Show local service status. No local flags.
dk dev seed [package-dir]
Seed local datasets from dev.seed sections.
Flags: --clean=false; --force=false; --dataset; --profile.
dk dev dashboard
Open the dev services dashboard.
Flags: --no-tls=false; --domain.
dk run [package-dir]
Run a package locally or scan a project.
Flags: repeatable --env, -e; --network; --timeout=30m; --dry-run=false; --detach, -d false; --attach=true; repeatable --set; repeatable --values, -f; --cell; --context; repeatable --scan-dir; --lineage=false; --lineage-endpoint.
dk test [package-dir]
Run package tests.
Flags: --data; --timeout=5m; --duration=30s; --startup-timeout=60s; --integration=false.
dk show [path]
Render the effective manifest after applying overrides.
Flags: repeatable --set; repeatable --values, -f; local --output, -o = yaml (yaml|json).
dk status [package]
Show local project summary or cell/package status.
Flags: --all=false; --cell; --kube-context; repeatable --scan-dir.
dk logs <package>
Show local Docker logs or cluster logs.
Flags: --follow, -f false; --run; --environment, -e dev; --tail=100; --since; --timestamps, -t false.
dk dbt [dbt-args...]
Pass through to dbt with DataKit store resolution.
The command disables normal Cobra flag parsing. It recognizes a package path and
optional --cell prefix before forwarding the remaining args to dbt.
Build and deploy
dk build [package-dir]
Build an OCI artifact.
Flags: --tag, -t; --push=false; --dry-run=false; --no-cache=false.
dk publish [package-dir]
Publish an OCI artifact.
Flags: --registry; --tag, -t; --insecure=false; --plain-http=false; --dry-run=false; --source-url.
dk promote <package-dir> <version>
Create or update a GitOps promotion PR.
Flags: required --to; --cell; --digest; --registry; --dry-run=false; --auto-merge=false; --update-pr=0.
dk promote status <pr-number>
Check the state of a promotion PR. No local flags.
dk rollback <package>
Create a rollback PR.
Flags: required --to; --cell; --to-version; --dry-run=false.
Validation
dk lint [package-dir]
Validate package manifests.
Flags: --strict=false; --skip-pii=false; --skip-schema-lock=false; repeatable --set; repeatable --values, -f; repeatable --scan-dir.
dk lock [package-dir]
Resolve schemaRef values and write dk.lock.
Flags: --verify=false; --upgrade=false.
dk pipeline show [dir]
Render the reactive graph derived from manifests.
Flags: local --output, -o = text (text|mermaid|json|dot); --destination; repeatable --scan-dir.
Data commands
dk dataset
Parent group for dataset contract management.
dk dataset create <name>
Flags: --force=false; --store.
dk dataset add <schema-ref>
Flags: --store; --force=false.
dk dataset validate [path]
Flags: --offline=false.
dk dataset list
Flags: local --output, -o = table (table|json).
dk dataset show <name>
Flags: local --output, -o = yaml (yaml|json).
dk dataset import pg
Import PostgreSQL schemas.
Flags: --dsn; --store; repeatable --table; --schema=public; --dir=.; --namespace, -n default; --cell; --context; --host-override.
dk dataset import ch
Import ClickHouse schemas.
Flags: --dsn; --store; repeatable --table; --database=default; --dir=.; --namespace, -n default; --cell; --context; --host-override.
dk dataset import kafka
Import Schema Registry subjects.
Flags: --registry; repeatable --subject; --store; --format; --dir=.; --namespace, -n default.
dk store create <name>
Scaffold a store manifest.
Flags: --connector; --force=false; --secret-name; --secret-namespace; repeatable --secret-key; repeatable --set; --host-override; --no-detect-cluster=false.
dk store kafka-ch-table [table-name]
Generate ClickHouse Kafka-ingestion SQL or CRs.
Flags: --store; --topic; --format; --database=default; --dataset; --engine=MergeTree; --partition-by=toYYYYMM(timestamp); --shard-by; --order-by=timestamp; --ttl; --on-cluster=false; --replicated=false; --vanilla=true; --kafka-schema; --consumers=1; --threads=1; --max-block-size=65536; --output-dir; --force=false; local --output=sql (sql|cr).
dk store kafka-ch-migrate [table-name]
Generate additive schema-migration DDL for a Kafka→ClickHouse pipeline.
Flags: required --store; required --dataset; --database=dk; --force=false; --dry-run=false; --extra-sql.
About dk store resolve
The current source tree does not define a dk store resolve subcommand.
Store resolution is performed implicitly by dk run, dk dataset import {pg|ch},
dk status --cell, dk dbt, and controller reconciliation.
Additional data-related groups
For completeness, the tree also includes:
dk connector create <name>— flags:--type;--force=falsedk cell list|show|stores— parent persistent flag:--context
Schema
dk schema search <query>
Search the APX catalog. No local flags.
dk schema show <module[@version]>
Show schema details. No local flags.
dk schema check [module]
Compare locked schemas with the catalog. No local flags.
Semantic
dk semantic init [name]
Flags: --target=cube; --namespace, -n default; --team=my-team.
dk semantic validate
Flags: --dir=..
dk semantic list <models|metrics|dimensions>
Flags: --dir=..
dk semantic generate
Flags: --dir=.; --target=cube; --out; --datasource.
dk semantic import
Flags: --dir=.; repeatable --dataset.
dk semantic deploy
Flags: --dir=.; --store; --no-restart=false; --context=k3d-dk-local; --namespace=dk-local.
Additional semantic commands
For completeness, the tree also includes:
dk semantic datasource create— flags:--dir=.;--store;--name;--type;--host;--port;--database;--user;--secret-name;--secret-keydk semantic runtime create— flags:--target=cube;--namespace,-ndefault;--dir=.
Utilities
dk doctor
Flags: --verbose, -v false.
dk config
Parent group for hierarchical config management.
dk config set <key> <value>—--scope=userdk config get <key>— no local flagsdk config unset <key>—--scope=userdk config list—--scope(empty means effective merged view)dk config add-mirror <registry>—--scope=userdk config remove-mirror <registry>—--scope=user
dk docs
Generate CLI docs.
Flags: local --output, -o = text (text|md|llm).
dk version
Print the CLI version. No local flags.