Skip to main content

Adapter CLI Reference

ContractForge adapters expose a shared command vocabulary so users do not need to learn a different tool shape for each platform. Adapter-specific flags are allowed, but the main command names and meanings should stay consistent.

Use the adapter package for the target runtime:

PlatformCLI
Databrickscontractforge-databricks
AWScontractforge-aws
Snowflakecontractforge-snowflake
Fabriccontractforge-fabric
GCPcontractforge-gcp

Standard Commands

CommandPurpose
planLoad contracts, validate semantics and return adapter capability status.
renderGenerate native SQL, scripts, manifests or review artifacts without executing them.
deployPublish or register native runtime artifacts for a single contract when the adapter supports it.
deploy-projectRender and optionally deploy an ordered project from project.yaml.
runExecute an already deployed or directly runnable contract path when supported.
smokeRun a bounded adapter-owned validation scenario.
cost-reportRender or read platform cost evidence where available.
cleanup-planProduce a reviewed cleanup plan without deleting resources by default.
stabilization-reportReport stable-surface gates, review boundaries and remaining promotion gates.

Some adapters expose extra commands when the feature is genuinely native to that platform, such as sources, performance-report, source-promotion or governance apply/readback helpers. Those commands must not replace the standard planning, rendering, deployment and evidence vocabulary.

Common Flags

FlagMeaning
--environmentEnvironment contract that owns runtime, evidence, artifact and credential binding.
--output-dirDirectory for generated artifacts and review files.
--dry-runValidate/render without performing remote mutation.
--runExecute after deploy/render when the adapter command supports it.
--waitWait for remote execution to reach a terminal state.
--readbackQuery native evidence or metadata after execution.
--strict-finalFail when a stable-final gate is not closed.

Adapter Entry Points

contractforge-databricks stabilization-report --strict-final
contractforge-aws stabilization-report --strict-final
contractforge-snowflake stabilization-report --strict-final
contractforge-fabric stabilization-report --strict-final
contractforge-gcp stabilization-report --strict-final

Standard Workflow

Plan one contract:

contractforge-<adapter> plan path/to/contract.ingestion.yaml --environment path/to/environment.yaml

Render native artifacts:

contractforge-<adapter> render path/to/contract.ingestion.yaml --environment path/to/environment.yaml --output-dir .contractforge/out

Deploy or run an ordered project through the adapter-owned command path:

contractforge-aws deploy-project examples/real-world/usgs-earthquake-rest-medallion/project.yaml --run --wait
contractforge-gcp deploy-project examples/real-world/usgs-earthquake-rest-medallion/project.yaml --deploy-orchestration --run-orchestration --wait-orchestration --readback-orchestration

Project execution should use the project contract and adapter CLI, not hand-written runtime workarounds.

Rules

  • Keep source, target, write mode, quality and governance semantics in contracts.
  • Keep credentials, artifact locations, warehouses, pools and native IDs in environment files.
  • Do not silently downgrade unsupported semantics.
  • Prefer SUPPORTED_WITH_WARNINGS or REVIEW_REQUIRED over hiding platform differences.
  • Persist or read back evidence for real execution whenever the adapter claims runtime maturity.