Skip to content

doctor

Analyze your LeapSQL project for potential issues and best practices.

The doctor command runs all project health rules and provides a comprehensive report including:

  • Project summary (models, macros, seeds, DAG structure)
  • Health checks grouped by category (Modeling, Structure, Lineage)
  • Health score (0-100)
  • Actionable recommendations

Output adapts to environment:

  • Terminal: Styled output with colors
  • Piped/Scripted: Markdown format
  • JSON: Machine-readable format

Usage

bash
leapsql doctor [flags]

Options

OptionShortDefaultDescription
--format-fOutput format: text, json

Global Options

OptionShortDefaultDescription
--configconfig file (default: ./leapsql.yaml)
--databasePath to DuckDB database (empty for in-memory)
--envEnvironment name
--macros-dirPath to macros directory
--models-dirPath to models directory
--output-oOutput format (auto|text|markdown|json)
--project-dir-CProject root directory (auto-detected from models-dir or config file location)
--seeds-dirPath to seeds directory
--statePath to state database
--target-tTarget environment to use (e.g., dev, staging, prod)
--verbose-vfalseVerbose output

Examples

bash
# Run health check
leapsql doctor

# Output as JSON
leapsql doctor --format json

Released under the MIT License.