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 | Flag | Description |
|---|---|
--api-url | API base URL (prompted if not provided) |
--email | Login email (prompted if not provided) |
--password | Account 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 / Flag | Description |
|---|---|
repo_path | Path to the git repository containing SQL models |
base_ref | Base git ref (e.g. HEAD~1) |
target_ref | Target git ref (e.g. HEAD) |
--out, -o | Output path for plan JSON (default: plan.json) |
--as-of-date | Reference date for date arithmetic (YYYY-MM-DD) |
ironlayer show
Display a human-readable summary of a plan file.
ironlayer show <plan_path> | Argument | Description |
|---|---|
plan_path | Path 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 / Flag | Description |
|---|---|
plan_path | Path to the plan JSON file |
--repo | Path to the git repository (required) |
--auto-approve | Skip manual approval prompt |
--approve-by | Name of the person approving this execution |
--override-cluster | Override 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> | Flag | Description |
|---|---|
--model, -m | Canonical model name to backfill |
--start | Start date (YYYY-MM-DD, inclusive) |
--end | End date (YYYY-MM-DD, inclusive) |
--repo | Path to the git repository (required) |
--cluster | Override 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 / Flag | Description |
|---|---|
repo_path | Path to the repository containing SQL models |
--model, -m | Canonical model name to trace lineage for |
--column, -c | Column name for column-level lineage (optional) |
--depth | Maximum 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
| Flag | Description |
|---|---|
--json | Output machine-readable JSON to stdout |
--metrics-file | Write execution metrics to a JSON file |
--env | Target environment (default: dev) |
Environment Variables
| Variable | Description | Default |
|---|---|---|
IRONLAYER_API_URL | API base URL | Stored from login |
IRONLAYER_API_TOKEN | Auth token (overrides stored credentials) | — |