Documentation Index Fetch the complete documentation index at: https://mintlify.com/moonrepo/moon/llms.txt
Use this file to discover all available pages before exploring further.
The moon.* configuration file defines project-level settings, metadata, tasks, and dependencies. This file is optional but recommended for customizing project behavior.
Configuration File
Location: <project-root>/moon.yml or <project-root>/moon.json
Type: ProjectConfig
Schema
Project Identity
Overrides the project identifier from the workspace projects setting. Added in v1.18.0
language
LanguageType
default: "unknown"
The primary programming language. Supports: bash, batch, go, javascript, php, python, ruby, rust, typescript, unknown, or custom values. If not defined, moon attempts to detect the language from configuration files.
layer
LayerType
default: "unknown"
The layer within a stack. Supports: application, automation, configuration, library, scaffolding, tool, unknown. Used for task inheritance and constraint enforcement.
stack
StackType
default: "unknown"
The technology stack. Supports: backend, data, frontend, infrastructure, systems, unknown. Added in v1.22.0
Tags for categorizing, querying, and task inheritance. tags :
- 'react'
- 'typescript'
Expanded information about the project. Human-readable project name.
Description of the project’s purpose.
Team or organization that owns the project.
Individual maintainers of the project.
Communication channel (must start with #). project :
channel : '#engineering'
Custom metadata fields are also supported: project :
title : 'Web Application'
description : 'Customer-facing web app'
deprecated : true
team : 'platform'
Custom fields added in v2.0.0
Dependencies
Other projects that this project depends on. Supports string IDs or objects with scope. # Simple format
dependsOn :
- 'design-system'
- 'api-client'
# Advanced format
dependsOn :
- id : 'design-system'
scope : 'production'
- id : 'test-utils'
scope : 'development'
Scopes: production (default), development, build, peer
Code Ownership
Defines ownership of source code within the project. Default owner for all paths. owners :
defaultOwner : '@frontend'
Maps file paths to owners. Supports list or object format. # List format (uses defaultOwner)
owners :
defaultOwner : '@team'
paths :
- 'src/**/*'
- 'tests/**/*'
# Object format (specific owners)
owners :
paths :
'**/*.ts' : [ '@frontend' ]
'**/*.rs' : [ '@backend' ]
'docs/' : [ '@docs' , '@frontend' ]
Required approvals for pull/merge requests (Bitbucket/GitLab only).
Marks code owners section as optional (GitLab only).
Custom groups for Bitbucket Code Owners app. owners :
customGroups :
'@@@backend' : [ '@user' , '@@team' ]
Added in v1.8.0
Tasks
Map of task identifiers to task configurations. tasks :
build :
command : 'vite build'
inputs :
- 'src/**/*'
outputs :
- 'dist'
test :
command : 'vitest'
deps :
- '~:build'
See Tasks Configuration for complete task schema.
Maps file group IDs to lists of globs, paths, or environment variables. fileGroups :
sources :
- 'src/**/*'
- 'types/**/*'
configs :
- '*.config.{js,ts}'
- '*.json'
tests :
- 'tests/**/*'
- '**/__tests__/**/*'
Reference in tasks using token functions: tasks :
lint :
inputs :
- '@group(sources)'
- '@group(configs)'
Environment variables inherited by all tasks in the project. env :
NODE_ENV : 'production'
API_URL : 'https://api.example.com'
Supports substitution: env :
APP_TARGET : '${REGION}-${ENVIRONMENT}'
Docker Integration
Docker integration settings for the project. Dockerfile generation configuration. Task to run for building before starting. docker :
file :
buildTask : 'build'
Task to run when starting (used as CMD).
Base Docker image. Defaults to toolchain-based image.
Run moon docker prune after building. Added in v2.0.0
Run moon docker setup after scaffolding. Added in v2.0.0
Custom Dockerfile template path (Tera powered). Added in v2.0.0
Scaffolding configuration. Globs for copying files to configs skeleton.
Globs for copying files to sources skeleton.
Added in v1.27.0
Overrides workspace-level toolchain settings. Default toolchain for all tasks in this project. toolchains :
default : 'node'
Added in v1.31.0 Toolchain-specific overrides (e.g., node, rust, bun). toolchains :
node :
version : '20.0.0'
typescript :
syncProjectReferences : false
Added in v2.0.0
Workspace Overrides
Overrides workspace-level settings for this project. Controls which inherited tasks are included or excluded. workspace :
inheritedTasks :
exclude : [ 'lint' , 'format' ]
include : [ 'build' , 'test' ]
rename :
test : 'test-unit'
Complete Example
id : 'web-app'
language : 'typescript'
stack : 'frontend'
layer : 'application'
tags :
- 'react'
- 'vite'
project :
title : 'Web Application'
description : 'Customer-facing web application'
owner : '@frontend-team'
maintainers :
- 'alice@example.com'
- 'bob@example.com'
channel : '#frontend'
dependsOn :
- id : 'design-system'
scope : 'production'
- id : 'api-client'
scope : 'production'
owners :
defaultOwner : '@frontend'
paths :
'**/*.tsx' : [ '@frontend' , '@ui-team' ]
'src/api/' : [ '@backend' ]
fileGroups :
sources :
- 'src/**/*'
- 'index.html'
configs :
- '*.config.{js,ts}'
- 'tsconfig.json'
env :
NODE_ENV : 'production'
VITE_API_URL : '${API_BASE_URL}'
tasks :
dev :
command : 'vite'
preset : 'server'
build :
command : 'vite build'
inputs :
- '@group(sources)'
- '@group(configs)'
outputs :
- 'dist'
deps :
- 'design-system:build'
test :
command : 'vitest'
deps :
- '~:build'
preview :
command : 'vite preview'
deps :
- '~:build'
docker :
file :
buildTask : 'build'
startTask : 'preview'
image : 'node:20-alpine'
toolchains :
default : 'node'
node :
version : '20.0.0'