moon

moonrepoMIT活跃维护

用 Rust 写的前端 monorepo 构建与任务编排工具,统一管理多包仓库的依赖、缓存和 CI 流程,替代散落的脚本配置。

A build system and monorepo management tool for the web ecosystem, written in Rust.

v2.6.5发布于 2026-10-29 19:36 UTC4,184star +6 / 7 天258fork同步于 2026-11-10 23:39 UTC

怎么上手

由 README 提炼,执行前请确认
README 未说明
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用 Rust 写的 Web 生态 monorepo 构建与任务编排工具,统一管理仓库、工具链和构建流程

用 Rust 写的前端 monorepo 构建与任务编排工具,统一管理多包仓库的依赖、缓存和 CI 流程,替代散落的脚本配置。

核心能力

  • 用智能哈希收集多源输入,保证构建确定可复现
  • 支持远程缓存,在团队成员和 CI 之间共享构建产物
  • 自动下载安装指定版本工具链,统一工作区环境
  • 生成项目图与依赖图,按依赖顺序并行执行任务
  • 基于哈希做增量构建,只重建有变更的项目

容易踩的坑

README 未给出安装命令,需查阅官方文档 moonrepo.dev 获取;README 注明部分功能尚未支持,应以文档中的功能列表为准

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.6.5
  1. 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.fileGroups can be used to replace instead.
    • Fixed an issue where every moon run and moon ci failed in a Git repository without any commits (after git init), as HEAD couldn't be resolved. Until the first commit, the $vcsRevision token 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 stop or SIGTERM. Its file watcher registered a watch for every directory in the workspace, including node_modules and 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 --affected outside 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 (like node_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 | sh
    

    Install 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

    FilePlatformChecksum
    moon_cli-aarch64-apple-darwin.tar.xzApple Silicon macOSchecksum
    moon_cli-x86_64-apple-darwin.tar.xzIntel macOSchecksum
    moon_cli-x86_64-pc-windows-msvc.zipx64 Windowschecksum
    moon_cli-aarch64-unknown-linux-gnu.tar.xzARM64 Linuxchecksum
    moon_cli-x86_64-unknown-linux-gnu.tar.xzx64 Linuxchecksum
    moon_cli-aarch64-unknown-linux-musl.tar.xzARM64 MUSL Linuxchecksum
    moon_cli-x86_64-unknown-linux-musl.tar.xzx64 MUSL Linux[checksum](https://github.com/moonrepo/moon/releases/download/v2.6.5/moon_cl
  2. 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 Listing and Mapping only, as Pkl recommends for configuration data. A config that amends its module, and assigns a List, Set, or Map to a setting, must convert it with toListing() or toMapping(), or create it with new Listing { ... } instead. Updated the Pkl docs and examples to match.
    • moon now handles SIGHUP, which is sent when the terminal is closed, like SIGTERM. Running tasks receive SIGHUP, and are force killed after pipeline.killProcessThreshold, the pipeline is marked as terminated, and moon exits with code 129. Previously moon was killed immediately, so a kill -HUP left 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.ignorePatterns and hasher.ignoreMissingPatterns were 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, like docs/**, now match as well.
    • Fixed an issue where .env files with multiple trailing comment markers (#) would not parse correctly.
    ⚙️ Internal
    • Updated the npm release to publish @moonrepo/cli after 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/cli version 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 | sh
    

    Install 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

    FilePlatformChecksum
    moon_cli-aarch64-apple-darwin.tar.xzApple Silicon macOSchecksum
    moon_cli-x86_64-apple-darwin.tar.xzIntel macOSchecksum
    moon_cli-x86_64-pc-windows-msvc.zipx64 Windowschecksum
    [moon_cli-aarch64-unk
  3. 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-certificates package.
    🐞 Fixes
    • Fixed an issue where changing any setting in .moon/workspace.*, like codeowners, 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: true file 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 | sh
    

    Install 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

    FilePlatformChecksum
    moon_cli-aarch64-apple-darwin.tar.xzApple Silicon macOSchecksum
    moon_cli-x86_64-apple-darwin.tar.xzIntel macOSchecksum
    moon_cli-x86_64-pc-windows-msvc.zipx64 Windowschecksum
    moon_cli-aarch64-unknown-linux-gnu.tar.xzARM64 Linuxchecksum
    moon_cli-x86_64-unknown-linux-gnu.tar.xzx64 Linuxchecksum
    moon_cli-aarch64-unknown-linux-musl.tar.xzARM64 MUSL Linuxchecksum
    moon_cli-x86_64-unknown-linux-musl.tar.xzx64 MUSL Linuxchecksum
  4. v2.6.22.6.22026-10-14 · 2026-10-14 21:30 UTC
    查看更新说明

    Release Notes

    🐞 Fixes
    • Fixed an issue where moon run exited 0 and counted a running task as skipped after SIGINT or SIGTERM. The process now exits 130 or 143, and the summary no longer calls that task skipped.
    • Fixed an issue where a wait dependency 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 the asyncGraphBuilding experiment 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 = true in the project's [tool.uv.sources] with uv.
      • Prevented self-dependency cycles from optional requirements.
    • Rust
      • Fixed docker prune failing with "unknown variant custom-build" when a crate has a build script, example, bench, or other unsupported target kind.
      • Fixed docker scaffold leaving an empty src/main.rs in library crates, which failed builds with "main function not found". Only the crate's existing lib and bin targets (including src/bin) are now stubbed.
    • TypeScript
      • Fixed pruneProjectReferences removing references from the root tsconfig.json when a root-level project uses it as its project config.

    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 | sh
    

    Install 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

    FilePlatformChecksum
    moon_cli-aarch64-apple-darwin.tar.xzApple Silicon macOSchecksum
    moon_cli-x86_64-apple-darwin.tar.xzIntel macOSchecksum
    moon_cli-x86_64-pc-windows-msvc.zipx64 Windowschecksum
    moon_cli-aarch64-unknown-linux-gnu.tar.xzARM64 Linuxchecksum
    moon_cli-x86_64-unknown-linux-gnu.tar.xzx64 Linuxchecksum
    moon_cli-aarch64-unknown-linux-musl.tar.xzARM64 MUSL Linuxchecksum
    moon_cli-x86_64-unknown-linux-musl.tar.xzx64 MUSL Linuxchecksum
  5. 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 | sh
    

    Install 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

    FilePlatformChecksum
    moon_cli-aarch64-apple-darwin.tar.xzApple Silicon macOSchecksum
    moon_cli-x86_64-apple-darwin.tar.xzIntel macOSchecksum
    moon_cli-x86_64-pc-windows-msvc.zipx64 Windowschecksum
    moon_cli-aarch64-unknown-linux-gnu.tar.xzARM64 Linuxchecksum
    moon_cli-x86_64-unknown-linux-gnu.tar.xzx64 Linuxchecksum
    moon_cli-aarch64-unknown-linux-musl.tar.xzARM64 MUSL Linuxchecksum
    moon_cli-x86_64-unknown-linux-musl.tar.xzx64 MUSL Linuxchecksum

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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.json scripts 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:

    Contributors