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
| Option | Short | Default | Description |
|---|---|---|---|
--format | -f | Output format: text, json |
Global Options
| Option | Short | Default | Description |
|---|---|---|---|
--config | config file (default: ./leapsql.yaml) | ||
--database | Path to DuckDB database (empty for in-memory) | ||
--env | Environment name | ||
--macros-dir | Path to macros directory | ||
--models-dir | Path to models directory | ||
--output | -o | Output format (auto|text|markdown|json) | |
--project-dir | -C | Project root directory (auto-detected from models-dir or config file location) | |
--seeds-dir | Path to seeds directory | ||
--state | Path to state database | ||
--target | -t | Target environment to use (e.g., dev, staging, prod) | |
--verbose | -v | false | Verbose output |
Examples
bash
# Run health check
leapsql doctor
# Output as JSON
leapsql doctor --format json