README 未给出安装命令,需查阅官方文档 moonrepo.dev 获取;README 注明部分功能尚未支持,应以文档中的功能列表为准
moon
moonrepoMIT活跃维护用 Rust 写的前端 monorepo 构建与任务编排工具,统一管理多包仓库的依赖、缓存和 CI 流程,替代散落的脚本配置。
A build system and monorepo management tool for the web ecosystem, written in Rust.
用 Rust 写的 Web 生态 monorepo 构建与任务编排工具,统一管理仓库、工具链和构建流程
用 Rust 写的前端 monorepo 构建与任务编排工具,统一管理多包仓库的依赖、缓存和 CI 流程,替代散落的脚本配置。
核心能力
- 用智能哈希收集多源输入,保证构建确定可复现
- 支持远程缓存,在团队成员和 CI 之间共享构建产物
- 自动下载安装指定版本工具链,统一工作区环境
- 生成项目图与依赖图,按依赖顺序并行执行任务
- 基于哈希做增量构建,只重建有变更的项目
容易踩的坑
- v2.6.52.6.5最新正式版2026-10-29 · 2026-10-29 19:36 UTC
Release Notes
🐞 Fixes
- Fixed an issue where the file groups docs stated that a project-level file group overrides an
inherited file group of the same name. Since v2, they are merged together, with project-level
inputs appended last, and since v2.5,
workspace.mergeStrategies.fileGroupscan be used to replace instead. - Fixed an issue where every
moon runandmoon cifailed in a Git repository without any commits (aftergit init), asHEADcouldn't be resolved. Until the first commit, the$vcsRevisiontoken is empty, and there are no revisions to compare, so all uncommitted files are considered changed. - Fixed an issue where the daemon's memory grew without bound on Linux, and it couldn't be stopped
with
moon daemon stoporSIGTERM. Its file watcher registered a watch for every directory in the workspace, includingnode_modulesand VCS ignored directories, and followed symlinks, which revisits the same directories through every link to them, so in a pnpm workspace the registration never finished. The watcher now skips ignored directories and symlinks, and is registered on its own thread, so the daemon can shut down at any time. The same symlink walk on macOS and Windows has also been removed. - Fixed an issue where running tasks with
--affectedoutside of CI, like in a VCS hook, never installed dependencies, so the tasks failed in a fresh clone or worktree. Dependencies are now installed when the toolchain's vendor directory (likenode_modules) is missing or empty, but continue to be skipped when it exists.
Install moon_cli 2.6.5
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/moonrepo/moon/releases/download/v2.6.5/moon_cli-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/moonrepo/moon/releases/download/v2.6.5/moon_cli-installer.ps1 | iex"Download moon_cli 2.6.5
File Platform Checksum moon_cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum moon_cli-x86_64-apple-darwin.tar.xz Intel macOS checksum moon_cli-x86_64-pc-windows-msvc.zip x64 Windows checksum moon_cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum moon_cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum moon_cli-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum moon_cli-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux [checksum](https://github.com/moonrepo/moon/releases/download/v2.6.5/moon_cl - Fixed an issue where the file groups docs stated that a project-level file group overrides an
inherited file group of the same name. Since v2, they are merged together, with project-level
inputs appended last, and since v2.5,
- v2.6.42.6.42026-10-23 · 2026-10-23 17:52 UTC
查看更新说明
Release Notes
🚀 Updates
- The Pkl modules generated since v2.6.3 type lists and maps as Pkl's amendable
ListingandMappingonly, as Pkl recommends for configuration data. A config that amends its module, and assigns aList,Set, orMapto a setting, must convert it withtoListing()ortoMapping(), or create it withnew Listing { ... }instead. Updated the Pkl docs and examples to match. - moon now handles
SIGHUP, which is sent when the terminal is closed, likeSIGTERM. Running tasks receiveSIGHUP, and are force killed afterpipeline.killProcessThreshold, the pipeline is marked as terminated, and moon exits with code 129. Previously moon was killed immediately, so akill -HUPleft its tasks running. On Windows, closing the console window is handled the same way, instead of aborting the pipeline with code 131.
🐞 Fixes
- Fixed an issue where moon exited with code 1 and printed "Failed to flush buffered output to console" when the command reading its output exited early (a broken pipe), instead of exiting quietly with code 141.
- Fixed an issue where, with the daemon enabled, a task would fail with "Failed to make daemon RPC call" when its stdout/stderr, or its list of output files, was larger than 4 MiB. The daemon now accepts messages up to 256 MiB, and if archiving or hydrating outputs through the daemon fails, it's done in-process instead of failing the task.
- Fixed an issue where the daemon was silently never used in development containers (like VS Code Dev Containers), yet was used in CI environments that aren't Docker containers (like Kubernetes pods), where it outlived the run. The daemon is now used in development containers, is never used in CI, and the reason it was skipped is logged at the debug level.
- Fixed an issue where
hasher.ignorePatternsandhasher.ignoreMissingPatternswere matched against absolute file paths instead of workspace relative paths. A pattern that matched a parent directory of the workspace, like**/.worktrees/**for a git worktree nested in the repository, ignored every input, so tasks were always cached and restored stale outputs. Patterns without a**/prefix, likedocs/**, now match as well. - Fixed an issue where
.envfiles with multiple trailing comment markers (#) would not parse correctly.
⚙️ Internal
- Updated the npm release to publish
@moonrepo/cliafter the@moonrepo/core-*packages, and to skip versions that are already published, so a failed release can be re-ran. Previously a failure could publish a@moonrepo/cliversion whose binaries were never published.
Install moon_cli 2.6.4
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/moonrepo/moon/releases/download/v2.6.4/moon_cli-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/moonrepo/moon/releases/download/v2.6.4/moon_cli-installer.ps1 | iex"Download moon_cli 2.6.4
File Platform Checksum moon_cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum moon_cli-x86_64-apple-darwin.tar.xz Intel macOS checksum moon_cli-x86_64-pc-windows-msvc.zip x64 Windows checksum [moon_cli-aarch64-unk - The Pkl modules generated since v2.6.3 type lists and maps as Pkl's amendable
- v2.6.32.6.32026-10-22 · 2026-10-22 07:07 UTC
查看更新说明
Release Notes
🛡️ Security
- Distrusted the 8 compromised eMudhra intermediate CA keys, and removed the "emSign ECC Root CA -
G3" root from our bundled root certificates. Previously, anyone in a position to intercept a
connection could use these keys to forge a certificate for any host, and proto would accept it on
Linux, and on all platforms for plugins that make requests through Extism's built-in HTTP
functions.
- Hosts with certificates that chain to "emSign ECC Root CA - G3" will now fail TLS verification.
- Requests to OCI registries on Linux still rely on the system certificate bundle, so update your
ca-certificatespackage.
🐞 Fixes
- Fixed an issue where changing any setting in
.moon/workspace.*, likecodeowners, invalidated the cache of every task. Only.moon/extensions.*and.moon/toolchains.*are now implicit task inputs. - Fixed an issue where a task that stopped before running its command, because another task failed or a requirement check failed, would be cached on the next run, reusing outputs from its previous inputs.
- Fixed an issue where deleted
optional: truefile outputs were not restored on a cache hit, when the hash matched the task's last run. - Fixed an issue where outputs partially restored by a failed cache hydration could be reused as a cache hit on the next run.
Install moon_cli 2.6.3
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/moonrepo/moon/releases/download/v2.6.3/moon_cli-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/moonrepo/moon/releases/download/v2.6.3/moon_cli-installer.ps1 | iex"Download moon_cli 2.6.3
File Platform Checksum moon_cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum moon_cli-x86_64-apple-darwin.tar.xz Intel macOS checksum moon_cli-x86_64-pc-windows-msvc.zip x64 Windows checksum moon_cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum moon_cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum moon_cli-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum moon_cli-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum - Distrusted the 8 compromised eMudhra intermediate CA keys, and removed the "emSign ECC Root CA -
G3" root from our bundled root certificates. Previously, anyone in a position to intercept a
connection could use these keys to forge a certificate for any host, and proto would accept it on
Linux, and on all platforms for plugins that make requests through Extism's built-in HTTP
functions.
- v2.6.22.6.22026-10-14 · 2026-10-14 21:30 UTC
查看更新说明
Release Notes
🐞 Fixes
- Fixed an issue where
moon runexited 0 and counted a running task as skipped afterSIGINTorSIGTERM. The process now exits 130 or 143, and the summary no longer calls that task skipped. - Fixed an issue where a
waitdependency on an interactive task was allowed, instead of failing with an error, as an interactive task runs in isolation, so nothing can run alongside it. The error was only raised when theasyncGraphBuildingexperiment was disabled. - Fixed an issue where the task hasher logged "only files can be hashed" warnings for directories
(or symlinks to directories) that match
hasher.ignorePatterns.
🧰 Toolchains
- Python
- Fixed missing project dependencies for versioned requirements using
workspace = truein the project's[tool.uv.sources]with uv. - Prevented self-dependency cycles from optional requirements.
- Fixed missing project dependencies for versioned requirements using
- Rust
- Fixed
docker prunefailing with "unknown variantcustom-build" when a crate has a build script, example, bench, or other unsupported target kind. - Fixed
docker scaffoldleaving an emptysrc/main.rsin library crates, which failed builds with "mainfunction not found". Only the crate's existing lib and bin targets (includingsrc/bin) are now stubbed.
- Fixed
- TypeScript
- Fixed
pruneProjectReferencesremoving references from the roottsconfig.jsonwhen a root-level project uses it as its project config.
- Fixed
Install moon_cli 2.6.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/moonrepo/moon/releases/download/v2.6.2/moon_cli-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/moonrepo/moon/releases/download/v2.6.2/moon_cli-installer.ps1 | iex"Download moon_cli 2.6.2
File Platform Checksum moon_cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum moon_cli-x86_64-apple-darwin.tar.xz Intel macOS checksum moon_cli-x86_64-pc-windows-msvc.zip x64 Windows checksum moon_cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum moon_cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum moon_cli-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum moon_cli-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum - Fixed an issue where
- v2.6.12.6.12026-10-07 · 2026-10-07 16:34 UTC
查看更新说明
Release Notes
🐞 Fixes
- Fixed an MQL issue where a negated condition (
taskTag!=tag) was not working correctly with a list of values. - Fixed an unresponsive connection for the HTTP remote storage.
Install moon_cli 2.6.1
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/moonrepo/moon/releases/download/v2.6.1/moon_cli-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/moonrepo/moon/releases/download/v2.6.1/moon_cli-installer.ps1 | iex"Download moon_cli 2.6.1
File Platform Checksum moon_cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum moon_cli-x86_64-apple-darwin.tar.xz Intel macOS checksum moon_cli-x86_64-pc-windows-msvc.zip x64 Windows checksum moon_cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum moon_cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum moon_cli-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum moon_cli-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum - Fixed an MQL issue where a negated condition (
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
moon
moon is a repository management, organization, orchestration, and notification tool for the web ecosystem, written in Rust. Many of the concepts within moon are heavily inspired from Bazel and other popular build systems.
Why use moon?
Working in a developer ecosystem can be very involved, especially when it comes to managing a repository effectively. Which package manager to use? Which language version to use? How to import packages? How to build code? So on and so forth. moon aims to streamline this entire process and provide a first-class developer experience.
- Increased productivity - With Rust as our foundation, we can ensure robust speeds, high performance, and low memory usage. Instead of long builds blocking you, focus on your work.
- Exceptional developer experience - As veterans, we're well aware of the pain points and frustrations. Our goal is to mitigate and overcome these obstacles.
- Incremental adoption - At its core, moon has been designed to be adopted incrementally and is not an "all at once adoption". Migrate project-by-project, or task-by-task, it's up to you!
- Reduced scripts confusion -
package.jsonscripts can become unwieldy, very quickly. No more duplicating the same script into every package, or reverse-engineering which root scripts to use. With moon, all you need to know is the project name, and a task name. - Ensure correct versions - Whether it's Node.js or another language, ensure the same version of each tool is the same across every developer's environment. No more wasted hours of debugging.
- Automation built-in - When applicable, moon will automatically install
node_modules, or sync package dependencies, or even sync TypeScript project references. - And of course, the amazing list of features below!
Features
Not all features are currently supported, view the documentation for an accurate list!
Management
- Smart hashing - Collects inputs from multiple sources to ensure builds are deterministic and reproducible.
- Remote caching - Persists builds, hashes, and caches between teammates and CI/CD environments.
- Integrated toolchain - Automatically downloads and installs explicit versions of tools for consistency across the entire workspace or per project.
- Multi-platform - Runs on common development platforms: Linux, macOS, and Windows.
Organization
- Project graph - Generates a project graph for dependency and dependent relationships.
- Code generation - Easily scaffold new applications, libraries, tooling, and more!
- Dependency workspaces - Works alongside package manager workspaces so that projects have distinct dependency trees.
- Code ownership - Declare owners, maintainers, support channels, and more. Generate CODEOWNERS.
Orchestration
- Dependency graph - Generates a dependency graph to increase performance and reduce workloads.
- Action pipeline - Executes actions in parallel and in order using a thread pool and our dependency graph.
- Action distribution - Distributes actions across multiple machines to increase throughput.
- Incremental builds - With our smart hashing, only rebuild projects that have been changed since the last build.
Notification
- Flakiness detection - Reduce flaky builds with automatic retries and passthrough settings.
- Webhook events - Receive a webhook for every event in the pipeline. Useful for metrics gathering and insights.
- Terminal notifications - Receives notifications in your chosen terminal when builds are successful... or are not.
- Git hooks - Manage Git hooks to enforce workflows and requirements for contributors.
Contributors
Special thanks to the wonderful people who have contributed to this project: