moon can be installed with bash:
curl -fsSL https://moonrepo.dev/install/moon.sh | bash
Or with npm, pnpm, or yarn.
yarn add --dev @moonrepo/cli
Once installed, initialize moon in your repository.
# Run `lint` in project `app` moon run app:lint # Run `lint` in all projects moon run :lint
Why use moon?
- 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.
- 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 npm, 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!
Not all features are currently supported, view the documentation for an accurate list!
- 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 Node.js and other tools for consistency across the entire workspace or per project.
- Multi-platform - Runs on common development platforms: Linux, macOS, and Windows.
- 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.
- 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 touched since the last build.
- 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.