Skip to main content

Validate Command

The validate command checks your dottie.yaml configuration for errors before applying changes.

Usage

> dottie validate <profile>

Options

OptionShortDescription
--config-cPath to configuration file (default: dottie.yaml)

Examples

Validate a specific profile

> dottie validate default

Validate with custom config path

> dottie validate default -c /path/to/dottie.yaml

List available profiles

Run without specifying a profile to see available options:

> dottie validate

Output

Valid Configuration

Configuration is valid.
Profile 'default' contains:
- 5 dotfile entries
- 3 APT packages
- 2 GitHub releases

Invalid Configuration

Configuration validation failed:
• Line 12: Unknown field 'soruce' - did you mean 'source'?
• Line 15: Target path '~/.config/nvim' must start with ~/

What Gets Validated

  • YAML syntax correctness
  • Required fields are present (source, target for dotfiles)
  • Profile inheritance chains are valid (no circular references)
  • Referenced files exist in the repository
  • Install block entries have required fields

Best Practices

  1. Always validate before applying - Run validate before link or install
  2. Validate in CI - Add validation to your CI pipeline to catch config errors early
  3. Validate after edits - Re-validate whenever you modify your configuration