moon.* configuration file is not required but can be used to define additional metadata for a project, override inherited tasks, and more at the project-level.
File Location
- Path:
moon.ymlormoon.json(in project root) - Format: YAML or JSON
- Required: No
Project Dependencies
dependsOn
Explicitly defines other projects that this project depends on, primarily when generating the project and task graphs.
moon.yml
moon.yml
production (default), development, build, peer
Metadata
id
Overrides the name (identifier) of the project.
moon.yml
All references to the project must use the new identifier, including project and task dependencies.
language
The primary programming language the project is written in. This setting is required for task inheritance, editor extensions, and more.
Supported values:
bash- Bash based project (Unix only)batch- Batch/PowerShell based project (Windows only)go- Go based projectjavascript- JavaScript based projectphp- PHP based projectpython- Python based projectruby- Ruby based projectrust- Rust based projecttypescript- TypeScript based projectunknown(default)- Custom language (converted to kebab-case)
moon.yml
owners
Defines ownership of source code within the current project, by mapping file system paths to owners.
paths
paths
Define ownership of source code. Supports two formats:Format 1: List (requires defaultOwner)Format 2: Map (multiple owners per path)
moon.yml
moon.yml
customGroups (Bitbucket)
customGroups (Bitbucket)
Define custom groups for Bitbucket Code Owners app.
moon.yml
optional (GitLab)
optional (GitLab)
Marks the project’s code owners section as optional. Defaults to
false.moon.yml
requiredApprovals (Bitbucket / GitLab)
requiredApprovals (Bitbucket / GitLab)
Requires a specific number of approvals. Defaults to
1.moon.yml
layer
The layer within a stack.
Supported values:
application- An application of any kindautomation- An automated testing suiteconfiguration- Configuration files or infrastructurelibrary- A self-contained, shareable, and publishable set of codescaffolding- Templates or generators for scaffoldingtool- An internal tool, CLI, one-off script, etc.unknown(default)
moon.yml
stack
The technology stack this project belongs to.
Supported values:
backend- Server-side APIs, etc.data- Data sources, database layers, etc.frontend- Client-side user interfaces, etc.infrastructure- Cloud/server infrastructure, Docker, etc.systems- Low-level systems programmingunknown(default)
moon.yml
tags
Tags for categorizing projects. Used for querying, enforcing boundaries, task inheritance, and more.
moon.yml
project
Defines metadata about the project itself.
moon.yml
title(required) - Human readable namedescription(required) - Description of what the project doeschannel- Slack, Discord, Teams channel nameowner- Team or organization that owns the projectmaintainers- List of people who maintain the project- Custom fields (any valid JSON value)
Environment Variables
env
Map of strings passed as environment variables to all tasks within the current project.
moon.yml
File Groups
fileGroups
Defines file groups to be used by local tasks.
moon.yml
moon.yml
Tasks
tasks
Tasks are actions that are ran within the context of a project.
moon.yml
extends
extends
Extend settings from a sibling task within the same project, or inherited from the global scope.
moon.yml
command
command
The command to execute for the task.
moon.yml
args
args
Additional arguments to append to the command.
moon.yml
script
script
One or many commands to execute, with support for pipes, redirects, and more.
moon.yml
deps
deps
List of other tasks that will be executed before this task.With args and env:
moon.yml
moon.yml
env
env
Environment variables passed when running the command.
moon.yml
inputs
inputs
List of sources that calculate whether to execute this task based on touched files.
moon.yml
outputs
outputs
List of files and folders created as a result of executing this task.
moon.yml
preset
preset
Applies a preset to the task.Available presets:
server- For long-running serversutility- For utility/interactive tasks
moon.yml
toolchains
toolchains
Defines the toolchain(s) the command runs on.
moon.yml
description
description
Human-readable description of what the task does.
moon.yml
Task Options
Theoptions field configures how a task is executed.
moon.yml
Key options
Key options
cache: Whether to cache the task. Accepts true (default), false, local, or remote.persistent: Marks the task as persistent (continuously running). Defaults to false.interactive: Marks the task as interactive (runs in isolation). Defaults to false.runInCI: Whether to run in CI. Accepts always, affected, true (default), false, only, or skip.runFromWorkspaceRoot: Use workspace root as working directory. Defaults to false.affectedFiles: Pass affected files as arguments. Accepts true, false, args, or env.allowFailure: Allow task to fail without failing the pipeline. Defaults to false.retryCount: Number of retry attempts. Defaults to 0.timeout: Maximum time in seconds for the task to run.shell: Whether to run in a shell. Defaults to true for system toolchain.outputStyle: Controls output display. Accepts buffer, buffer-only-failure, hash, none, or stream.priority: Priority level. Accepts critical, high, normal (default), or low.Docker Integration
docker
Configures Docker integration for the current project.
moon.yml
Toolchains
toolchains
Overrides toolchain settings at the project level.
moon.yml
Complete Example
moon.yml