Skip to main content

Overview

Supported formatsv2.0.0

In moon, you can define configuration files in a variety of formats. We currently support the following:

  • JSON (.json)
  • JSON with comments (.jsonc)
  • HCL (.hcl)
  • Pkl (.pkl)
  • TOML (.toml)
  • YAML (.yml, .yaml)
info

In moon v1, only YAML (.yml) and Pkl (.pkl) configuration files were supported.

Schema validationv1.33.0

We support schema validation for all configuration files through JSON Schema, even for formats that are not JSON (depends on tool/editor support). To reference the schema for a specific configuration file, configure the $schema property at the top of the file with the appropriate schema found at .moon/cache/schemas.

.moon/workspace.yml
$schema: './cache/schemas/workspace.json'
info

The schemas are automatically created when running a task. If they do not exist yet, you can run moon sync config-schemas to generate them manually.

danger

In older versions of moon, the schema files were located at https://moonrepo.dev/schemas. These URLs are now deprecated, as they do not support dynamic settings. Please update your $schema references to point to the local schema files in .moon/cache/schemas.