Type object
File match moon.yml
Schema URL https://catalog.lintel.tools/schemas/schemastore/moon-yml/latest.json
Source https://raw.githubusercontent.com/moonrepo/moon/master/website/static/schemas/project.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Configures information and tasks for a project. Docs: https://moonrepo.dev/docs/config/project

Properties

$schema string
Default: "https://moonrepo.dev/schemas/project.json"
dependsOn ProjectDependsOn[]

Other projects that this project depends on.

docker

Configures Docker integration for this project.

All of: ProjectDockerConfig object
env Record<string, string>

A mapping of environment variables that will be set for all tasks within the project.

fileGroups Record<string, Input[]>

A mapping of group IDs to a list of file paths, globs, and environment variables, that can be referenced from tasks.

id Id | null

Overrides the ID within the project graph, as defined in the workspace projects setting.

language

The primary programming language of the project.

Default: "unknown"
All of: LanguageType const: "bash" | const: "batch" | const: "go" | const: "javascript" | const: "php" | const: "python" | const: "ruby" | const: "rust" | const: "typescript" | const: "unknown" | string
layer

The layer within the project stack, for categorizing.

Default: "unknown"
All of: LayerType string
owners

Defines ownership of source code within the current project, by mapping file paths and globs to owners. An owner is either a user, team, or group.

All of: OwnersConfig object
platform PlatformType | null

The default platform for all tasks within the project, if their platform is unknown.

Default: "unknown"
project ProjectMetadataConfig | null

Expanded information about the project.

stack

The technology stack of the project, for categorizing.

Default: "unknown"
All of: StackType string
tags Id[]

A list of tags that this project belongs to, for categorizing, boundary enforcement, and task inheritance.

tasks Record<string, object>

A mapping of tasks by ID to parameters required for running the task.

toolchain

Overrides top-level toolchain settings, scoped to this project.

All of: ProjectToolchainConfig object
type

The layer within the project stack, for categorizing.

Default: "unknown"
All of: LayerType string
workspace

Overrides top-level workspace settings, scoped to this project.

All of: ProjectWorkspaceConfig object

Definitions

DependencyScope string

The scope and or relationship of the dependency.

DependencySource string

The source where the dependency comes from. Either explicitly defined in configuration, or implicitly derived from source files.

FileGroupInput object

A file group input.

as

Format to resolve the file group into.

Default: "static"
All of: FileGroupInputFormat string
format

Format to resolve the file group into.

Default: "static"
All of: FileGroupInputFormat string
group

The file group identifier.

All of: Id string
FileGroupInputFormat string

Available formats to resolve the file group into.

FileInput object

A file path input.

content string | null

Regex pattern to match the file's contents against when determining affected status.

file string

The literal file path.

optional boolean | null

Mark the file as optional instead of logging a warning when hashing a task.

FileOutput object

A file path output.

file string

The literal file path.

optional boolean | null

Mark the file as optional instead of failing with an error after running a task and the output doesn't exist.

GlobInput object

A glob pattern input.

cache boolean

Cache the glob walking result for increased performance.

Default: true
glob string

The glob pattern.

GlobOutput object

A glob pattern output.

glob string

The glob pattern.

optional boolean | null

Mark the file as optional instead of failing with an error after running a task and the output doesn't exist.

Id string
Input string | FileInput | FileGroupInput | GlobInput | ProjectInput
LanguageType const: "bash" | const: "batch" | const: "go" | const: "javascript" | const: "php" | const: "python" | const: "ruby" | const: "rust" | const: "typescript" | const: "unknown" | string

Supported programming languages that each project can be written in.

LayerType string

The layer within the project stack, for categorizing.

Output string | FileOutput | GlobOutput
OwnersConfig object

Defines ownership of source code within the current project, by mapping file paths and globs to owners. An owner is either a user, team, or group.

customGroups Record<string, string[]>

Bitbucket only. A mapping of custom groups (prefixed with @@@), to a list of user and normal groups.

defaultOwner string | null

The default owner for paths.

optional boolean

GitLab only. Marks the code owners section as optional.

paths

A mapping of file paths and file globs to owners. When a list, the defaultOwner is the owner, and each item is a path. When an object, the key is a path, and the value is a list of owners.

All of: OwnersPaths string[] | object
requiredApprovals number | null

Bitbucket and GitLab only. The number of approvals required for the request to be satisfied. For Bitbucket, utilizes the Check() condition. For GitLab, marks the code owners section as required.

OwnersPaths string[] | object

A mapping of file paths and file globs to owners.

PlatformType string

Platforms that each programming language can belong to.

PluginLocator string

Strategies and protocols for locating plugins.

ProjectDependencyConfig object

Expanded information about a project dependency.

id

ID of the depended on project.

All of: Id string
scope

Scope of the dependency relationship.

Default: "production"
All of: DependencyScope string
source

Source of where the dependency came from.

Default: "explicit"
All of: DependencySource string
via string | null

Metadata about the source.

ProjectDependsOn Id | ProjectDependencyConfig

Expanded information about a project dependency.

ProjectDockerConfig object

Configures our Docker integration.

file

Configures aspects of the Dockerfile generation process.

All of: ProjectDockerFileConfig object
scaffold

Configures aspects of the Docker scaffolding process.

ProjectDockerFileConfig object

Configures Dockerfile generation.

buildTask Id | null

A task within the current project for building the project.

image string | null

The base Docker image.

startTask Id | null

A task within the current project for starting the project.

ProjectDockerScaffoldConfig object

Configures aspects of the Docker scaffolding process.

include string[]

List of glob patterns, relative from the project root, to include (or exclude) in the sources skeleton.

ProjectInput object

An external project input.

fileGroup Id | null

A file group identifier within the project in which to determine affected status.

filter string[]

A list of globs, relative from the project's root, in which to determine affected status.

group Id | null

A file group identifier within the project in which to determine affected status.

project string

The external project identifier.

ProjectMetadataConfig object

Expanded information about the project.

channel string | null

The Slack, Discord, etc, channel to discuss the project. Must start with a #.

description string

A description on what the project does, and why it exists.

maintainers string[]

The individual maintainers of the project. The format is unspecified.

metadata Record<string, boolean | object | array | number | string | integer>

Custom metadata fields.

name string | null

A human-readable name of the project.

owner string | null

The owner of the project. Can be an individual, team, or organization. The format is unspecified.

ProjectToolchainCommonToolConfig object

Overrides top-level toolchain settings.

version UnresolvedVersionSpec | null

Version of the tool this project will use.

ProjectToolchainConfig object

Overrides top-level toolchain settings, scoped to this project.

Overrides bun settings.

default Id | Id[] | null

The default toolchain(s) for all tasks within the project, if their toolchain is unknown.

defaults Id | Id[] | null

The default toolchain(s) for all tasks within the project, if their toolchain is unknown.

Overrides deno settings.

Overrides node settings.

plugins Record<string, null | boolean | ToolchainPluginConfig>

Overrides toolchains by their ID.

Overrides python settings.

Overrides rust settings.

ProjectToolchainEntry null | boolean | ToolchainPluginConfig
ProjectWorkspaceConfig object

Overrides top-level workspace settings, scoped to this project.

inheritedTasks

Controls how tasks are inherited.

ProjectWorkspaceInheritedTasksConfig object

Controls how tasks are inherited.

exclude Id[]

Excludes inheriting tasks by ID.

include Id[] | null

Only inherits tasks by ID, and ignores the rest. When not defined, inherits all matching tasks. When an empty list, inherits no tasks.

rename Record<string, string>

Renames inherited tasks to a new ID.

StackType string

The technology stack of the project, for categorizing.

TaskArgs null | string | string[]

Configures a command to execute, and its arguments.

TaskConfig object

Configures a task to be ran within the action pipeline.

args

Arguments to pass to the command when it's ran. Can be defined as a string, or a list of individual arguments.

All of: TaskArgs null | string | string[]
command

The command or command line to execute when the task is ran. Supports the command name, with or without arguments. Can be defined as a string, or a list of individual arguments.

All of: TaskArgs null | string | string[]
deps TaskDependency[] | null

Other tasks that this task depends on, and must run to completion before this task is ran. Can depend on sibling tasks, or tasks in other projects, using targets.

description string | null

A human-readable description about the task.

env object | null

A mapping of environment variables that will be set when the task is ran.

extends Id | null

Extends settings from a sibling task by ID.

inputs Input[] | null

Inputs and sources that will mark the task as affected when comparing against touched files. When not provided, all files within the project are considered an input. When an empty list, no files are considered. Otherwise, an explicit list of inputs are considered.

local boolean | null

Marks the task as local only. Local tasks do not run in CI, do not have options.cache enabled, and are marked as options.persistent.

options

Options to control task inheritance and execution.

All of: TaskOptionsConfig object
outputs Output[] | null

Outputs that will be created when the task has successfully ran. When cache is enabled, the outputs will be persisted for subsequent runs.

platform

The platform in which the task will be ran in. The platform determines available binaries, lookup paths, and more. When not provided, will be automatically detected.

Default: "unknown"
All of: PlatformType string
preset TaskPreset | null

The preset to apply for the task. Will inherit default options.

script string | null

A script to run within a shell. A script is anything from a single command, to multiple commands (&&, etc), or shell specific syntax. Does not support arguments, merging, or inheritance.

toolchain Id | Id[]

List of additional toolchain(s) in which the task will be ran in. The toolchain determines available binaries, lookup paths, and more. This list will be merged with detected toolchains.

toolchains Id | Id[]

List of additional toolchain(s) in which the task will be ran in. The toolchain determines available binaries, lookup paths, and more. This list will be merged with detected toolchains.

type TaskType | null

The type of task, primarily used for categorical reasons. When not provided, will be automatically determined.

Default: "test"
TaskDependency string | TaskDependencyConfig

Configures another task that a task depends on.

TaskDependencyConfig object

Expanded information about a task dependency.

args

Additional arguments to pass to this dependency when it's ran.

All of: TaskArgs null | string | string[]
env Record<string, string>

A mapping of environment variables specific to this dependency.

optional boolean | null

Marks the dependency is optional when being inherited from the top-level.

target string

The target of the depended on task.

TaskMergeStrategy string

The strategy in which to merge a specific task option.

TaskOperatingSystem string

The operating system in which to only run this task on.

TaskOptionEnvFile boolean | string | string[]
TaskOptionsConfig object

Options to control task inheritance and execution.

affectedFiles boolean | string | null

The pattern in which affected files will be passed to the task.

affectedPassInputs boolean | null

When affected and no files are matching, pass the task inputs as arguments to the command, instead of ..

allowFailure boolean | null

Allows the task to fail without failing the entire pipeline.

cache boolean | string | null

Caches the outputs of the task. Defaults to true if outputs are configured for the task.

cacheKey string | null

A custom key to include in the cache hashing process. Can be used to invalidate local and remote caches.

cacheLifetime string | null

Lifetime to cache the task itself, in the format of "1h", "30m", etc. If not defined, caches live forever, or until inputs change.

envFile TaskOptionEnvFile | null

Loads and sets environment variables from the .env file when running the task.

inferInputs boolean | null

Automatically infer inputs from file groups or environment variables that were utilized within command, script, args, and env.

interactive boolean | null

Marks the task as interactive, so that it will run in isolation, and have direct access to stdin.

internal boolean | null

Marks the task as internal, which disables it from begin ran from the command line, but can be depended on.

merge TaskMergeStrategy | null

The default strategy to use when merging args, deps, env, inputs, or outputs with an inherited task. Can be overridden with the other field-specific merge options.

Default: "append"
mergeArgs TaskMergeStrategy | null

The strategy to use when merging args with an inherited task.

Default: "append"
mergeDeps TaskMergeStrategy | null

The strategy to use when merging deps with an inherited task.

Default: "append"
mergeEnv TaskMergeStrategy | null

The strategy to use when merging env with an inherited task.

Default: "append"
mergeInputs TaskMergeStrategy | null

The strategy to use when merging inputs with an inherited task.

Default: "append"
mergeOutputs TaskMergeStrategy | null

The strategy to use when merging outputs with an inherited task.

Default: "append"
mutex string | null

Creates an exclusive lock on a virtual resource, preventing other tasks using the same resource from running concurrently.

os TaskOperatingSystem | TaskOperatingSystem[] | null

The operating system in which to only run this task on.

outputStyle TaskOutputStyle | null

The style in which task output will be printed to the console.

Default: "buffer"
persistent boolean | null

Marks the task as persistent (continuously running). This is ideal for watchers, servers, or never-ending processes.

priority TaskPriority | null

Marks the task with a certain priority, which determines the order in which it is ran within the pipeline.

Default: "normal"
retryCount number | null

The number of times a failing task will be retried to succeed.

runDepsInParallel boolean | null

Runs direct task dependencies (via deps) in sequential order. This does not apply to indirect or transient dependencies.

runFromWorkspaceRoot boolean | null

Runs the task from the workspace root, instead of the project root.

runInCI boolean | string | null

Whether to run the task in CI or not, when executing moon ci or moon run.

shell boolean | null

Runs the task within a shell. When not defined, runs the task directly while relying on PATH resolution.

timeout number | null

The maximum time in seconds that a task can run before being cancelled.

unixShell TaskUnixShell | null

The shell to run the task in when on a Unix-based machine.

Default: "bash"
windowsShell TaskWindowsShell | null

The shell to run the task in when on a Windows machine.

Default: "pwsh"
TaskOutputStyle string

The style in which task output will be printed to the console.

TaskPreset string

Preset options to inherit.

TaskPriority string

The priority levels a task can be bucketed into.

TaskType string

The type of task.

TaskUnixShell string

A list of available shells on Unix.

TaskWindowsShell string

A list of available shells on Windows.

ToolchainPluginConfig object

Configures an individual toolchain.

config Record<string, boolean | object | array | number | string | integer>

Arbitrary configuration that'll be passed to the WASM plugin.

disabled boolean
plugin PluginLocator | null

Location of the WASM plugin to use.

version UnresolvedVersionSpec | null

The version of the toolchain to download and install.

versionFromPrototools

Inherit the version from the root .prototools. When true, matches using the same ID, otherwise a string can be provided for a custom ID.

All of: ToolchainPluginVersionFrom boolean | string
ToolchainPluginVersionFrom boolean | string

Strategy in which to inherit a version from .prototools.

UnresolvedVersionSpec string

Represents an unresolved version or alias that must be resolved to a fully-qualified version.