CLI Reference

The IronLayer CLI (ironlayer) provides commands for planning, executing, and managing your transformation workflow.

Project Setup

ironlayer init

Initialize a new IronLayer project. Creates a config file, example models, and .env.

ironlayer init [--non-interactive] [--name NAME] [--state-store local|postgres] [--no-ai] [--no-git]

ironlayer dev

Start a local development server with SQLite state store and DuckDB execution.

ironlayer dev [--port 8000] [--ai-port 8001] [--no-ai] [--no-ui] [--reload]

Authentication

ironlayer login

Authenticate with an IronLayer API instance. Stores credentials in ~/.ironlayer/credentials.json.

ironlayer login --api-url https://api.ironlayer.app --email you@company.com
FlagDescription
--api-urlAPI base URL (prompted if not provided)
--emailLogin email (prompted if not provided)
--passwordAccount password (prompted securely if not provided)

ironlayer logout

Remove stored credentials.

ironlayer whoami

Show the current authenticated user, tenant, and role.

Planning

ironlayer plan

Generate a deterministic execution plan from a git diff.

ironlayer plan <repo_path> <base_ref> <target_ref>
Argument / FlagDescription
repo_pathPath to the git repository containing SQL models
base_refBase git ref (e.g. HEAD~1)
target_refTarget git ref (e.g. HEAD)
--out, -oOutput path for plan JSON (default: plan.json)
--as-of-dateReference date for date arithmetic (YYYY-MM-DD)

ironlayer show

Display a human-readable summary of a plan file.

ironlayer show <plan_path>
ArgumentDescription
plan_pathPath to the plan JSON file (e.g. plan.json)

Execution

ironlayer apply

Execute a previously generated plan against your Databricks workspace (or DuckDB locally).

ironlayer apply <plan_path> --repo <repo_path> [--auto-approve] [--override-cluster <name>]
Argument / FlagDescription
plan_pathPath to the plan JSON file
--repoPath to the git repository (required)
--auto-approveSkip manual approval prompt
--approve-byName of the person approving this execution
--override-clusterOverride the cluster/warehouse used for execution

Backfills

ironlayer backfill

Run a targeted backfill for a single model over a date range.

ironlayer backfill --model <name> --start 2026-01-01 --end 2026-02-01 --repo <path>
FlagDescription
--model, -mCanonical model name to backfill
--startStart date (YYYY-MM-DD, inclusive)
--endEnd date (YYYY-MM-DD, inclusive)
--repoPath to the git repository (required)
--clusterOverride cluster/warehouse

Discovery

ironlayer models

List all SQL models discovered in a repository.

ironlayer models <repo_path>

ironlayer lineage

Display upstream and downstream lineage for a model. Use --column for column-level tracing.

ironlayer lineage <repo_path> --model <name> [--column <col>] [--depth N]
Argument / FlagDescription
repo_pathPath to the repository containing SQL models
--model, -mCanonical model name to trace lineage for
--column, -cColumn name for column-level lineage (optional)
--depthMaximum traversal depth (default: 50)

Migration

ironlayer migrate from-dbt

Import models from an existing dbt project into IronLayer format.

ironlayer migrate from-dbt <project_path>

ironlayer migrate from-sqlmesh

Import models from a SQLMesh project.

ironlayer migrate from-sqlmesh <project_path>

ironlayer migrate from-sql

Import plain SQL files.

ironlayer migrate from-sql <sql_directory>

MCP Server

ironlayer mcp serve

Start an MCP (Model Context Protocol) server for AI assistant integration.

ironlayer mcp serve [--transport stdio|sse] [--host 127.0.0.1] [--port 3001]

Global Flags

FlagDescription
--jsonOutput machine-readable JSON to stdout
--metrics-fileWrite execution metrics to a JSON file
--envTarget environment (default: dev)

Environment Variables

VariableDescriptionDefault
IRONLAYER_API_URLAPI base URLStored from login
IRONLAYER_API_TOKENAuth token (overrides stored credentials)